hevnbnd Posted September 12, 2003 Posted September 12, 2003 This question was asked once before in the forum and no one helped answer it. I reseal my install for my customers and when they first boot it up it runs guirunonce again. How do i prevent this? Any ideas? Thanks in advance. Brian
b0r3d Posted September 12, 2003 Posted September 12, 2003 So you're using your CD to install XP + extras .. and everything works fine, but when you reset the pc, it runs the batch files again? Is that correct?
webmedic Posted September 12, 2003 Posted September 12, 2003 I only saw that once when my batch file was not located in the right place and so it did not execute at all. After I moved it to the correct location the next time I rebooted it ran but it only did it once.
hevnbnd Posted September 12, 2003 Author Posted September 12, 2003 Yes i am installing windows with a winnt.sif cd. Not reset but RESEAL. It is a feature of the winpe. Sysprep When i reseal after the cd completes the install and my customer enters his name and product key and it logs him onto windows for the first time it runs the batchs again. Does this info help?
b0r3d Posted September 12, 2003 Posted September 12, 2003 if you could give me a link to where i can read about this resealing thing, ill check it out for you
webmedic Posted September 12, 2003 Posted September 12, 2003 this is a feature you use to remove the product id code so the cusomter has to enter thier prodiuct id code after you ship it to them. Now the problem is that it sets your system back to a state where it is like nobody has logged in. As such it will go through the guirunonce just like the user is logging in for the first time. the easiest way to fix this would be to make sure to delete your install files after install and make sure to leave a cmd file in startup folder that would delete the registry key that starts the script and also deletes itself when done. That is I assume it uses runonce to run the batch file. if not deleteing the install files will still stop them from running.
hevnbnd Posted September 12, 2003 Author Posted September 12, 2003 That is what i was thinking i tried this for the end of my application.cmd:ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\installRD /S /Q %systemdrive%\DriversECHO.ECHO Installing SysprepECHO Please wait...start /wait %systemdrive%\oem\sysprep.exeECHO.EXITThe problem is that sysprep needs to restart the computer before it is loaded. So when the above cmd ran it deleted the install folder that contained the applications.cmd file and the computer continued on into windows and sysprep did not run. I also tried it like this:ECHO.ECHO Installing SysprepECHO Please wait...start /wait %systemdrive%\oem\sysprep.exeECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\installRD /S /Q %systemdrive%\DriversECHO.EXITand the problem was it restarted after sysprep came up and never deleted the installation files? How would you suggest i set up the cmd to make this work?
webmedic Posted September 12, 2003 Posted September 12, 2003 maybe something like thisECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversECHO.ECHO Installing Sysprep >> "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd"ECHO Please wait... >> "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd"echo start /wait %systemdrive%\oem\sysprep.exe >> "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd"ECHO. >> "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd"ECHO del "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd" >> "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd"ECHO EXIT >> "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd"SHUTDOWN -r -t 60 -c " Rebooting now"EXIT
hevnbnd Posted September 12, 2003 Author Posted September 12, 2003 I am assuming that this: "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd"should be this: %systemdrive%\oem\sysprep.exeThat could work but i do not know how to automate sysprep.exe as it just brings up a window and asks me if i want to Start factory session after reboot. So i must manually select reboot. Does this make sense?
webmedic Posted September 12, 2003 Posted September 12, 2003 no I put it the way I intended. It will cause your system to have to reboot once more but on the last reboot it will use that sysprep.cmd to run oem\sysprep.exe
hevnbnd Posted September 12, 2003 Author Posted September 12, 2003 So do i need to create a sysprep.cmd?
webmedic Posted September 12, 2003 Posted September 12, 2003 no that bit of script i just gave you will make it for you.
hevnbnd Posted September 12, 2003 Author Posted September 12, 2003 What about deleting the temp directory install?
webmedic Posted September 12, 2003 Posted September 12, 2003 sorry I ment to leave the drivers and delete the temp. You never know when you will need those drivers again.
hevnbnd Posted September 12, 2003 Author Posted September 12, 2003 You mean leave the drivers and delete the install folder... Trying your script now.. Also i really am lost in your script can you better explain how it works? I am not usually one just to copy and say ok i want to know how it works. Thanks B
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now