Stoner81 Posted August 25, 2008 Posted August 25, 2008 Ok guys here is the situation...I have made a XP Pro unattended DVD (due to the large amount of drivers in it) now it uses the driverpacks from driverpacks.net (thanks for these guys) and it also runs the WPI too. The problem I have is that the WPI installs NOD32 v2.7 but it requires a reboot after installing.Once the desktop is shown is there a way to intergrate a command into the setup which will run the reboot command once the desktop has loaded?Thank you in advance Stoner81
TranceEnergy Posted August 25, 2008 Posted August 25, 2008 here's a kind of fail safe wayOpen notepad enter copy paste following text into it:Start ShutDown /R /F /T 120del /F /q "%allusersprofile%\start menu\programs\start up\shutdown.bat"save it as shutdown.bat and copy it intoyour $oem$ folder and corresponding directory, cant remember path atm, but check msfn guide to unattended and find that $oem$ section, im sure somebody has it in their head.Please check it with something else then shutdown command so you are sure the file will auto delete itself.I use these kind of batch file approaches for a few things and works great.
Stoner81 Posted August 25, 2008 Author Posted August 25, 2008 (edited) here's a kind of fail safe wayOpen notepad enter copy paste following text into it:Start ShutDown /R /F /T 120del /F /q "%allusersprofile%\start menu\programs\start up\shutdown.bat"save it as shutdown.bat and copy it intoyour $oem$ folder and corresponding directory, cant remember path atm, but check msfn guide to unattended and find that $oem$ section, im sure somebody has it in their head.Please check it with something else then shutdown command so you are sure the file will auto delete itself.I use these kind of batch file approaches for a few things and works great.DUDE!!!!! Thank you so much for your quick response on this matter it has been driving me up the wall!!!! I will test it on and report back on what happens thanks again!!!!I think it just goes into the $OEM$ folder with no sub directory but i can't seem to find anything else to say otherwise????Stoner81 : Edited August 25, 2008 by Stoner81
Stoner81 Posted August 25, 2008 Author Posted August 25, 2008 (edited) Ah ha!! i think i have it sorted out now though still a little niggle is that the driverpacks finisher does not stat until after the WPI which is run from the $OEM$ folder in the commands.txt file so if i add this shutdown to it if i dont get the timing right the machine will shutdown and reboot before the driverpack finisher has finished.But still thanks for the help very much appreciated :Stoner81EDIT - i see now its due to the $OEM$ it copies it to the HHD i think the folder is $DOCS but not sure where to go from here. Edited August 25, 2008 by Stoner81
TranceEnergy Posted August 25, 2008 Posted August 25, 2008 (edited) okay just give me some seconds...Click me for reference$Docs - Documents and Settings$Progs - Program Files$$ - Windows Folder$1 - Root of hard drive where Windows is installed to partition.Textmode - Mass storage drivers and HAL files required during the text-mode portion of Setup.drive_letter - Represents the root of a particular volume on the system (e.g., \$OEM$\C represents the C: drive) and contains any files that WinXP Setup should copy to this partition during installation.So use a path of$OEM$\$Docs\All users\Start Menu\Programs\Startup\on your windows source folder on your harddrive ok which is what you of course burn as your windows install image.I think %allusersprofile%\start menu\programs\start up\shutdown.bat" is correct as i wrote previouslybut here's a heads up : some variables dont allow the " \ " directly after it, (slash symbol) %examplevariable%\test\example.exe and instead use it without so it becomes %examplevariable%test\example.exe (note the second \ is correct anyway(of course))Please let me know what works for you, and copy&paste it back here, so others can also benefit.Thanks. Edited August 25, 2008 by TranceEnergy
Stoner81 Posted August 30, 2008 Author Posted August 30, 2008 (edited) okay just give me some seconds...Click me for reference$Docs - Documents and Settings$Progs - Program Files$$ - Windows Folder$1 - Root of hard drive where Windows is installed to partition.Textmode - Mass storage drivers and HAL files required during the text-mode portion of Setup.drive_letter - Represents the root of a particular volume on the system (e.g., \$OEM$\C represents the C: drive) and contains any files that WinXP Setup should copy to this partition during installation.So use a path of$OEM$\$Docs\All users\Start Menu\Programs\Startup\on your windows source folder on your harddrive ok which is what you of course burn as your windows install image.I think %allusersprofile%\start menu\programs\start up\shutdown.bat" is correct as i wrote previouslybut here's a heads up : some variables dont allow the " \ " directly after it, (slash symbol) %examplevariable%\test\example.exe and instead use it without so it becomes %examplevariable%test\example.exe (note the second \ is correct anyway(of course))Please let me know what works for you, and copy&paste it back here, so others can also benefit.Thanks.Ok buddy thanks a lot for this so am i right in thinking that on my XP .iso image (once i make it) i should create the following folder structure;$OEM\$DOCS\All users\Start Menu\Programs\Startup\ then put shutdown.bat here (after creating seperate folders for each bit eg Start Menu).Thanks again for this m8 very much appreciatedStoner81 Edited August 30, 2008 by Stoner81
Kurt_Aust Posted August 30, 2008 Posted August 30, 2008 (edited) If you are getting timing issues with the DriverPacks then you should use the custom finisher option and place the finisher command:rem support Bashrat the Sneaky's Driver Packs%SystemDrive%\DPsFnshr.exeabove the "Start ShutDown ..." line in your batch file.The following is a good idea for the start of the batch file (2 minute delay, n-1):rem startup delay to allow disk thrashing to subside before proceedingPing -n 121 127.0.0.1>nul Edited August 30, 2008 by Kurt_Aust
Stoner81 Posted August 30, 2008 Author Posted August 30, 2008 If you are getting timing issues with the DriverPacks then you should use the custom finisher option and place the finisher command:rem support Bashrat the Sneaky's Driver Packs%SystemDrive%\DPsFnshr.exeabove the "Start ShutDown ..." line in your batch file.The following is a good idea for the start of the batch file (2 minute delay, n-1):rem startup delay to allow disk thrashing to subside before proceedingPing -n 121 127.0.0.1>nulYou see I have the WPI (Windows Post Installer) running which install NOD32 v2.7 (among other things) THEN the driverpacks finisher runs. I have used nLite to put the command for the finisher to begin in the unattended section in nLite. So i need it to reboot ONCE the desktop loads and only then since NOD32 needs it before it will start running.Thank you for your help Stoner81
Idontwantspam Posted August 30, 2008 Posted August 30, 2008 You don't need to bother with the batch file. Just have it run shutdown.exe -s -t 0when everything is done. That's all there is to it.
Stoner81 Posted August 31, 2008 Author Posted August 31, 2008 You don't need to bother with the batch file. Just have it run shutdown.exe -s -t 0when everything is done. That's all there is to it.When to run this and how? I need it to run once the desktop has loaded so as the WPI and the driverpacks finisher can both run then load the desktop then a reboot?Thanks for the helpStoner81
Idontwantspam Posted August 31, 2008 Posted August 31, 2008 Ah - I see the issue, Windows has to load first. Well, since shutdown.exe can be made to wait before shutting down, you could just run it from WPI (i've never used WPI - is this possible?) or else just using the RunOnce registry key, and instead of having it shut down immediately, have it wait however long you think it should. If you have it be the last thing that runs, then you might only need it to wait about 30 seconds. To make it wait, just do shutdown.exe -r -t xxx, where xxx is how many seconds to wait.
Stoner81 Posted August 31, 2008 Author Posted August 31, 2008 Ah - I see the issue, Windows has to load first. Well, since shutdown.exe can be made to wait before shutting down, you could just run it from WPI (i've never used WPI - is this possible?) or else just using the RunOnce registry key, and instead of having it shut down immediately, have it wait however long you think it should. If you have it be the last thing that runs, then you might only need it to wait about 30 seconds. To make it wait, just do shutdown.exe -r -t xxx, where xxx is how many seconds to wait.That may be possible m8 though im not sure, the finisher can take a while to sort itself out depending on system specs (ram. cpu etc) so getting the timing right would be difficult as it is i just do a manual reboot which sorts it out but would rather have it do it automatically Thanks for your help
TranceEnergy Posted August 31, 2008 Posted August 31, 2008 Kurt what if there exists no tcp-ip internet connection or no tcp installed, will it still be usable as a time counter? And why not just use shutdown, or timeout.
Martin H Posted August 31, 2008 Posted August 31, 2008 The thinking about (ab)using the 'ping' command for pausing purposses, is that 'ping' allready is available on all systems, and no third-party tools need to be added to the install-source...It will work no matter if there's network support available or not, as it dosen't matter if the pinging requests are answered or not...It's a sorta hackish solution, but nonetheless then it works great and avoids the need for extra third-party tools, so i always use it myself...
TranceEnergy Posted August 31, 2008 Posted August 31, 2008 Really? That's fantastic! I love universal solutions!But i kind of don't get it, aren't shutdown/timeout included in all windows version, sort of anyway?
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