automating tasks in sysprep

M

moto

Hello
Iam trying to automate a task in sysprep for Win XP using a vbs
script. The vbs script pulls the computername from the bios and inputs
it in the sysprep.inf file under "ComputerName". The script works
manually, but in trying to start it during mini setup it does not work.
It appears sysprep gets to computername before the script runs and asks
for a computername. Tried running from registry as "RunOnce", in the
inf file as a "GuiRunOnce" , in sysprep.bat and tried using the
-factory method to no avail. Is there anyone who can help me on this.
Thanks, Moto
 
A

Adam Leinss

Hello
Iam trying to automate a task in sysprep for Win XP using a vbs
script. The vbs script pulls the computername from the bios and
inputs it in the sysprep.inf file under "ComputerName". The script
works manually, but in trying to start it during mini setup it
does not work. It appears sysprep gets to computername before the
script runs and asks for a computername. Tried running from
registry as "RunOnce", in the inf file as a "GuiRunOnce" , in
sysprep.bat and tried using the -factory method to no avail. Is
there anyone who can help me on this.

You can try cmdlines.txt (http://support.microsoft.com/?kbid=238955),
but I doubt there is VB script support during mini-setup. That is, you
can do this with Windows Vista in Windows PE, but not XP.

Adam
 
G

Guest

I recently did something very similiar.

I wrote a vbscript that reads through the sysprep.inf and replaces a few
lines based on WMI queries before mini-setup starts. One such line is
computername which I wanted to contain the BIOS SerialNumber.

You cannot run WMI during mini-setup. If you are are already successfully
inserting code before mini-setup then all you should need to do is set
HKLM\System\Setup\SystemSetupInProgress to "0", run your WMI (it will work
now)/write your changes, change HKLM\System\Setup\SystemSetupInProgress back
to "1" and execute mini-setup.

It took me days to figure this out but it works awesome now.


Nate
 

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