Jump to content

Stopping GUIRUNonce from running after reseal


Recommended Posts

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

Link to comment
Share on other sites


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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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%\install

RD /S /Q %systemdrive%\Drivers

ECHO.

ECHO Installing Sysprep

ECHO Please wait...

start /wait %systemdrive%\oem\sysprep.exe

ECHO.

EXIT

The 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 Sysprep

ECHO Please wait...

start /wait %systemdrive%\oem\sysprep.exe

ECHO.

ECHO Deleting Temp Installation Files...

RD /S /Q %systemdrive%\install

RD /S /Q %systemdrive%\Drivers

ECHO.

EXIT

and 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?

Link to comment
Share on other sites

maybe something like this

ECHO.

ECHO Deleting Temp Installation Files...

RD /S /Q %systemdrive%\Drivers

ECHO.

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

Link to comment
Share on other sites

I am assuming that this: "%systemdrive%\documets and settings\All users\start menu\ programs\startup\sysprep.cmd"

should be this: %systemdrive%\oem\sysprep.exe

That 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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...