saitoh183 Posted January 13, 2005 Posted January 13, 2005 At the end of my runonceex.cmd, i run my clean.cmd which is the following:cmdow @ /HIDnet user aspnet /deleteRD /S /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing"RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start"DEL "%systemroot%\*.bmp"DEL "%systemroot%\Web\Wallpaper\*.jpg"DEL "%systemroot%\system32\dllcache\*.scr"DEL "%systemroot%\system32\*.scr"DEL "%AllUsersProfile%\Start Menu\Windows Update.lnk"DEL "%AllUsersProfile%\Start Menu\Set Program Access and Defaults.lnk"DEL "%AllUsersProfile%\Start Menu\Windows Catalog.lnk"shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."EXITbut it doesn't reboot my Pc at the end. The screen just stays blue and i have to do a ctrl-alt-del and run explorer so i can do a reboot(after the reboot everything works). The last app to install in my runonce is PC Anywhere and it needs the Pc to reboot in order to finish the installation...could that be related to me problem? Here is the code for my runonceex.cmd for PC anywhere and my clean.cmd:REG ADD %KEY%\042 /VE /D "Pc Anywhere 10.5" /fREG ADD %KEY%\042 /V 1 /D "%cdrom%\Apps\pcanywhere\pcanywhere10.5.msi /qb- REBOOT=ReallySuppress" /fREG ADD %KEY%\042 /V 2 /D "taskkill /F /IM pca_run.exe" /fREG ADD %KEY%\043 /VE /D "Cleanup" /fREG ADD %KEY%\043 /V 1 /D "%cdrom%\Apps\Clean\clean.cmd /fEXITWhat could be the problem? and on another note, I have a wallpaper folder that i wanted to copy to My Documents\My Pictures\Wallpapers. I put my folder in $OEM$\$DOCS\Saitoh\My Documents\My Pictures\Wallpapers but it doesn't copy. I also tried to copy with $OEM$\1$\Wallpaper but it still doesn't copy....
webmedic Posted January 13, 2005 Posted January 13, 2005 what app did you use to edit your cmd files. I love pspad but it defaults to unicode for everything (cmd files require ansi) and when I create cmd files with it or even if I edit my cmd files using pspad it will trash them. I have to copy the text out of it and past it into plain old notepad then save it again with notepad. I spent quite a few days trying to figure out why my scritps kept failing. The scipts whould start but they would jsut stop running and quit. It was quite frustrating.
saitoh183 Posted January 13, 2005 Author Posted January 13, 2005 I use Notepad2 and the files are in ANSI. The runconceex.cmd runs fine, it the clean.cmd thats the prob. It removes the shorcuts but doesnt reboot. Here is another version of my clean.cmd filecmdow @ /HIDnet user aspnet /deleteRD /S /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing"RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start"DEL "%systemroot%\*.bmp"DEL "%systemroot%\Web\Wallpaper\*.jpg"DEL "%systemroot%\system32\dllcache\*.scr"DEL "%systemroot%\system32\*.scr"DEL "%AllUsersProfile%\Start Menu\Windows Update.lnk"DEL "%AllUsersProfile%\Start Menu\Set Program Access and Defaults.lnk"DEL "%AllUsersProfile%\Start Menu\Windows Catalog.lnk"DEL "%AllUsersProfile%\Start Menu\Programs\Windows Movie Maker.lnk"DEL "%AllUsersProfile%\Desktop\Java Web Start.lnk"DEL "%AllUsersProfile%\Desktop\Adobe Reader 6.0.2 lnk"DEL "%allusersprofile%\start menu\WinZip.lnk"DEL "%allusersprofile%\desktop\WinZip.lnk"DEL "%allusersprofile%\start menu\Programs\WinZip\Uninstall WinZip.lnk"DEL "%allusersprofile%\start menu\Programs\WinZip\Help Manual.lnk"DEL "%allusersprofile%\start menu\Programs\WinZip\ReadMe.txt.lnk"DEL "%allusersprofile%\start menu\Programs\WinZip\What's New.lnk"DEL "%systemdrive%\tmpgenc.log"RD "%systemdrive%\Program Files\Movie Maker\"RD "%systemdrive%\Program Files\Microsoft Frontpage\"RD "%systemdrive%\Program Files\Complus Applications\"RD /S /Q "%systemroot%\Cache\Adobe Reader 6\"DEL "%UserProfile%\My Documents\Creativity_Pack_ReadMe.htm"deltree "%systemdrive%\Program Files\Online Services\"copy "%cdrom%\Apps\wallpaper\GW\*.*" "%UserProfile%\My Documents\My Pictures\wallcopy "%cdrom%\Apps\wallpaper\wall\*.*" "%UserProfile%\My Documents\My Pictures\wallshutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."EXIT Is there anything wrong with it? I even tried putting this shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..." at the beginning and it changes nothing.
webmedic Posted January 13, 2005 Posted January 13, 2005 one more thing does notetab2 do tabs for having multiple documents open?
saitoh183 Posted January 13, 2005 Author Posted January 13, 2005 dunno...but i think you just clear things up for my shutdown prob. does the shutdown.exe have to be in my $oem$/$$/system32 ?
bmn Posted January 13, 2005 Posted January 13, 2005 (edited) if u want to copy ur wallpapers.then u shld place them at root\$OEM$\$$\Web\Wallpaper\bliss.jpg.and abt ur shutdown command it is right.have a look at my install.cmdCMDOW @ /HID@ECHO OFFstart /wait %cdrom%\install\wpi\WPI.htastart /wait shutdown.exe -r -f -t 30 -c "This System Must Reboot now. This Is necessary for applications to complete installation, shortcuts to updated"exiti just tested ur cleanup.cmd.its working nice for me.i think ur calling it wrong.check once again. Edited January 13, 2005 by bmn
Tsunami Posted January 13, 2005 Posted January 13, 2005 shutdown.exe is already provided with XP and sits in %SystemRoot%\system32 ready to be used from any location you want. So your command should work.
saitoh183 Posted January 13, 2005 Author Posted January 13, 2005 @bmnIn my cleanup.cmd there is a line to del all jpg in the \web\wallpaper. Is it possible to add a line in my clean.cmd to copy the folder over to the directory of my choosing and if so what is the syntax? Also which of my cmd did you try?@TsunamiDo i have to copy the shutdown.exe to my \$OEM$\$$\system32 folder on my CD
Gagorian Posted January 13, 2005 Posted January 13, 2005 Do i have to copy the shutdown.exe to my \$OEM$\$$\system32 folder on my CDIf you want it to be copied to windows\system32 directory and then being able to use it without specifying absolute paths. You could of course copy it to any location on your HD and then specify its path in the cmd-file but it's easier if you just place it in that folder.So, in short, yes.*EDIT*Does the program work if you start it manually with that commandline? If so, then the cmd-file probably can't just find it and it will be remedied by the solution above.
Tsunami Posted January 13, 2005 Posted January 13, 2005 @saitoh183 & Gagorian: No, you DON'T have to copy the file to $OEM$\$$\system32, simply because the file is already there when you install Windows XP. If you don't believe me, look for shutdown.ex_ in the I386 dir.
saitoh183 Posted January 13, 2005 Author Posted January 13, 2005 ok...well why doesnt my clean.cmd work then...
Gagorian Posted January 13, 2005 Posted January 13, 2005 @saitoh183 & Gagorian: No, you DON'T have to copy the file to $OEM$\$$\system32, simply because the file is already there when you install Windows. If you don't believe me, look for shutdown.ex_ go to your I386 dir.Windows 2000 doesn't have it. So, no I don't believe you. (Yeah, I didn't really pay notice that he was using XP.)Okay, if shutdown.exe doesn't work (did you try running it from the start -> run?) you could try a few of the other alternatives you have. I personally use poweroff.exe (it doesn't look like an error message!)I use the following commandline with it:poweroff.exe reboot -force -nocancel -warn -warntime 25 -msg "Windows 2000 will now restart in 25 seconds for the installation to be complete."You can get it from http://users.pandora.be/jbosman/poweroff/poweroff.htmPlace the poweroff.exe to the $OEM$\$$\system32 folder and then make your batch run that commandline. It should work.
gunsmokingman Posted January 13, 2005 Posted January 13, 2005 Try This It Might WorkAdd This To The End Of The RunOnce Cmd[codeSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Preparing Final Clean up ..." /fREG ADD %KEY%\970 /V 1 /D "PLACE YOUR CMD HERE" /f
saitoh183 Posted January 13, 2005 Author Posted January 13, 2005 @GagorianPoweroff.exe Work! ....@allIs it possible to add a line to my clean.cmd to copy my wallpaper folder to my web\wallpaper because i already have a line that del all jpgs from the folder.
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