meph’s blog

2009/03/31

Changing paths to AutoCAD’s printer configuration in the Windows Registry

Filed under: Scripting — Tags: , , , — Michael @ 14:54

Call this VBS once from a user’s netlogon script:

Set Shell = CreateObject( "WScript.Shell" )
UserName = Shell.ExpandEnvironmentStrings("%Username%")
Shell.RegWrite "HKCU\Software\Autodesk\AutoCAD\R17.2\ACAD-7005:407\Profiles\
<<ACADMPP>>\General\PrinterConfigDir", "W:\VORLAGEN\plotters\" & 
Username, "REG_SZ"
Shell.RegWrite "HKCU\Software\Autodesk\AutoCAD\R17.2\ACAD-7005:407\Profiles\
<<ACADMPP>>\General\PrinterDescDir", "W:\VORLAGEN\plotters\" & 
Username & "\PMP Files", "REG_SZ"

The path “W:\VORLAGEN\plotters\” has to be changed to fit your environment.

By the way:
Modifying netlogon scripts by adding a line at their end is easily done with help of the Windows PowerShell.
Just copy the scripts to a temp folder on your local harddisk and type this line in the shell:

Add-Content c:\temp\netlogon\*.* "`r`n\\server\share\script.vbs"

`n stands for New line and `r for Carriage return (see this link)

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.