Hi All,
I wanted to share my solution for saving default printers under View 4.
After a recompose, these settings were lost, and it was creating a lot of issues for our helpdesk.
You will need two files, DEFSET.EXE and SLEEP.EXE, and a file share to save the settings.
http://ctrl-alt-del.com.au/CAD_TSUtils.htm
http://www.microsoft.com/en-us/download/details.aspx?id=17657
On your master image, create a folder containing a batch file and the DEFSET/SLEEP.EXE files.
Paste the following into the batch file
C:\ITFOLDER\SLEEP 120
c:\ITFOLDER\defset.exe /ini:\\fileserver\printersettings\%username%.txt /min
Now create a .VBS file in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup and paste the following into it
CreateObject("Wscript.Shell").Run "C:\ITFOLDER\YOURBAT.BAT", 0 , TRUE
This will save your users default printer to \\fileserver\printersettings\MYNAME.txt at logon
After a recompose the setting is pulled from this file.
The VBS file is used instead of a batch file to hide the DOS window that pops up - our users were closing this at startup.
I added "SLEEP 120" to wait 2 minutes, allowing time for printers to be applied via GPO after a recompose - adjust accordingly for your environment.