WDS - Custom Batch File Post-Imaging

warcrow

Lifer
Jan 12, 2004
11,078
11
81
I'm currently deploying Win7 via WDS--no problems so far--but I'd like to add a couple more things to the process.

1) We have 11 printers in the office. Our print server is running Win2k8 R2 64-bit. Is there a automated way of getting several of these printers installed post-push?

2) I'd like to add a few icons to all users desktops. Can I have a batch file run after WDS is done pushing an image to the machine? How is this call made? Do I configure this int he workbench?
 

tomt4535

Golden Member
Jan 4, 2004
1,758
0
76
You can use Windows System Image Manager to add a part to the ImageUnattend.xml to run a command line on the first logon. I have it set to run the post processing batch file on our WDS setup for servers. It's under Components > Microsoft-Windows-Shell-Setup > FirstLogonCommands. I added it to the oobeSystem pass.
 

warcrow

Lifer
Jan 12, 2004
11,078
11
81
Ok great, thanks tomt4535.

When I go to add that component it wants to only add it to "oobesystem". Is that normal?

I added it and highlight FirstLogonCommand> Path and point that to my batch file that's on the network (\\server\\path\run.bat)?
 

tomt4535

Golden Member
Jan 4, 2004
1,758
0
76
Yeah, that's normal. Expand out FirstLogonCommands and add SynchronousCommand to the pass. In there, there's parameters in there for command line, description, order, and requires user input. Add your batch file to the Command line parameter. I think the rest is optional, but I have something in the description and order is 1, user input is blank.
 

warcrow

Lifer
Jan 12, 2004
11,078
11
81
Nice!! This is my first time messing around with the WSIM tool so it's sort of new territory for me.

It was already populated so someone else must have already built this, however when I go to save it it appears to be defaulting to Untitled.xml. Should I be saving this as unattendned.xml, and in deploymentshare$? Perhaps I didnt pull up the right file? How would I check to see what's currently being used for the push?
 

tomt4535

Golden Member
Jan 4, 2004
1,758
0
76
You are using Microsoft Deployment Toolkit? That's even easier than WinSIM, just add a step to the task sequence at the end. General > Run Command Line, type in your batch file there, and you should be good to go.
 

warcrow

Lifer
Jan 12, 2004
11,078
11
81
Yes, using MDT! Thanks for that tip. Do I need to rebuild the boot disks for the Task Sequences to take effect?
 

tomt4535

Golden Member
Jan 4, 2004
1,758
0
76
Nope, not unless you add new drivers in, change the customsettings.ini(rules tab) or anything like that. Couldn't hurt to do it, but it just wont do anything unless something major has changed :)
 

warcrow

Lifer
Jan 12, 2004
11,078
11
81
Again, thanks for the help tomt4535, you're awesome! If you dont mind, if I have any other questions I'll keep posting them here.
 

warcrow

Lifer
Jan 12, 2004
11,078
11
81
I'm trying to install a bunch of printers with a post-batch file. This doesnt seem to be working. Suggestions?


rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
rundll32 printui.dll,PrintUIEntry /ga /c\\%COMPUTERNAME% /n\\server\printer
 

DrGreen2007

Senior member
Jan 30, 2007
748
0
76
do yo have a 2008R2 domain controller?, you could setup a printer GPO to deploy the printers instead.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
I'm currently deploying Win7 via WDS--no problems so far--but I'd like to add a couple more things to the process.

1) We have 11 printers in the office. Our print server is running Win2k8 R2 64-bit. Is there a automated way of getting several of these printers installed post-push?

2) I'd like to add a few icons to all users desktops. Can I have a batch file run after WDS is done pushing an image to the machine? How is this call made? Do I configure this int he workbench?

You can push them out via AD. (both 1 and 2)