Sysprep plus multiple commands and multiple reboots?

M

Mygposts

We need multiple commands to run after the machine is sysprepped, but we need
reboots between them.

We tried adding multiple commands to run when configuring sysprep, but the
all tried to run during the same boot session so only the first one completed
properly.

For instance, we need to first run a vbscript to run that queries the
machine serial number and then names the pc based on the serial number and
reboots.
After it comes back up after the reboot, we then need it join the domain
with a netdom command and reboot again.
How can we do this?
 
K

Klaus Jorgensen

Mygposts wrote :
We need multiple commands to run after the machine is sysprepped, but we need
reboots between them.

We tried adding multiple commands to run when configuring sysprep, but the
all tried to run during the same boot session so only the first one completed
properly.

For instance, we need to first run a vbscript to run that queries the
machine serial number and then names the pc based on the serial number and
reboots.
After it comes back up after the reboot, we then need it join the domain
with a netdom command and reboot again.
How can we do this?

On my RIS server I am calling a batch script via the GuiRunOnce and
AutoLogon sections in the answer file. If a command in that script
requires a reboot followed up by another script, I just call my
AutoLogon script:

Example:
@call autologon.cmd install2.cmd
@shutdown -r

After reboot it will autologon and run install2.cmd

----------AutoLogon.cmd-----------------------
@reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
/v AutoAdminLogon /t REG_SZ /f /d "1" >nul
@reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
/v AutoLogonCount /t REG_DWORD /f /d 1 >nul
@reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
/v DefaultPassword /t REG_SZ /f /d "yourpasswordhere" >nul
@reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v
RIS /t REG_SZ /f /d %SYSTEMDRIVE%\inst\%1 >nul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top