Solid as a rock Posted July 13, 2004 Share Posted July 13, 2004 ECHO.ECHO Deleting Driver Installation Files...RD /S /Q %systemdrive%\DriversECHO.ECHO Restarting the PC in 5 seconds...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 5 seconds"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\installOR, you could prevent it another way. Move Install.cmd OUTSIDE your INSTALL folder. So instead of it being in $OEM$\$1\Install on your CD, move it to $OEM$\$1 and change the line in your WInnt.sif to %systemdrive%\Install.cmdGREAT!! i see my mistake!! my batch file exist in install root. thats why he never deleted and also never run psshutdown. you earns again a star super super super moderator damned i search for weeks why psshutdown dont work and also why the map wont be deleted. someone told me the map is in use so windows couldnt delete it. but i couldnt believe that map is at that moment is in use....really thanks!! but i have a small question , why first delete the driver root and then run the psshutdown and then delete the install root? Link to comment Share on other sites More sharing options...
Alanoll Posted July 13, 2004 Share Posted July 13, 2004 you could call shutdown before deleting drivers, you'll just have to also then add time to the shutdown to allow for the driver deletion. You could theoretically call the shutdown command as the first thing in your batch, and have like a 10 minute delay so everything install IF your install.cmd file is OUTSIDE the folders your deleting, it matters not what order you call the commands. As the batch file won't get deleted, so it will finish fully. If it IS inside the folders you're deleting, then it will terminate as soon as it's deleted, even if the directory is still not fully deleted.Think of it this way.....The batch file is running....As SOON as it's deleted it is terminated, even if it's running a command at that moment. It'd be just like killing a task in the Task Manager. Link to comment Share on other sites More sharing options...
snakefood Posted July 13, 2004 Author Share Posted July 13, 2004 Alanoll.....you is the man.. All working nicely now.....thanx for your help.To delete the cmd file after install would I write another batch file containng just a command to delete start.cmd, calling this new batch file from the last line of start.cmd, ie after the deletion of root install folder?If i place this new batch file into $OEM$ will it not be copied onto C? Link to comment Share on other sites More sharing options...
Solid as a rock Posted July 13, 2004 Share Posted July 13, 2004 Alanoll.....you is the man.. All working nicely now.....thanx for your help.To delete the cmd file after install would I write another batch file containng just a command to delete start.cmd, calling this new batch file from the last line of start.cmd, ie after the deletion of root install folder?If i place this new batch file into $OEM$ will it not be copied onto C?every in $OEM$ will be copied automatically, but ermm, i have a question. if u write a clean.cmd to delete the other cmd, what about that clean.cmd you have write? it wont be deleted. so it is a dead walking way....i am thinking to place the clean.cmd in the root windows, you will not noticed that file anymore..... Link to comment Share on other sites More sharing options...
snakefood Posted July 13, 2004 Author Share Posted July 13, 2004 every in $OEM$ will be copied automatically, but ermm, i have a question. if u write a clean.cmd to delete the other cmd, what about that clean.cmd you have write? it wont be deleted. so it is a dead walking way....I was thinking that only the contents of the folders inside the $OEM$ folder would be copied..if not, then yep i would be simply replacing the problem with another..What would be the correct method of calling a file located inside the $OEM$ folder, as if it NOT copied it will need to be called from it's location on the cd..? Link to comment Share on other sites More sharing options...
Alanoll Posted July 13, 2004 Share Posted July 13, 2004 actually, only the stuff INSIDE the FOLDERS INSIDE $OEM$ are copied, ie $1 $$ $docs and so forth. cmdlines.txt is never copied from the CD.Putting it in the WIndows directory is fine, but if you're going to end the batch anyway, have it delete itself. Put the batch file in $$, and then in your WINNT.SIF file change it to %systemroot%\install.cmd . Then as the VERY last line in your install.cmd file, have a DEL %systemroot%\install.cmdthen everything else is deleted, the shutdown is called, and then the batch terminates so the shell continues to load. Link to comment Share on other sites More sharing options...
snakefood Posted July 13, 2004 Author Share Posted July 13, 2004 Ahh...i c.I didn't know youcould have a file delete itself....nice.think my disk may well be finished.....*crossed fingers...*Once again...thanks for your time alanoll, no doubt you'll be seeing more of me around here.... Link to comment Share on other sites More sharing options...
Phyridean Posted July 13, 2004 Share Posted July 13, 2004 I had the same problem, but removing the comments (preceded by semicolon [;]) fixed it right away. (In the registry file), but then that appears to be a bit below your problem lol. Link to comment Share on other sites More sharing options...
anaZ Posted July 14, 2004 Share Posted July 14, 2004 Why must install.cmd be put in the $$ folder and not the $1 folder?Files in the $1 folder are not deleted after installation (only the folder map and drivers if you've put those in your install.cmd).So why in the $$ folder and not in $1? Link to comment Share on other sites More sharing options...
Alanoll Posted July 14, 2004 Share Posted July 14, 2004 simplicity?it can be ANYWHERE that you know the path to, as long as it's not in the folders you're deleting.... Link to comment Share on other sites More sharing options...
Solid as a rock Posted July 14, 2004 Share Posted July 14, 2004 simplicity?it can be ANYWHERE that you know the path to, as long as it's not in the folders you're deleting....ahhhh.... ok, i was also curious why in the $$ and not in the $1... but ok.... Link to comment Share on other sites More sharing options...
Solid as a rock Posted July 15, 2004 Share Posted July 15, 2004 actually, only the stuff INSIDE the FOLDERS INSIDE $OEM$ are copied, ie $1 $$ $docs and so forth. cmdlines.txt is never copied from the CD.Putting it in the WIndows directory is fine, but if you're going to end the batch anyway, have it delete itself. Put the batch file in $$, and then in your WINNT.SIF file change it to %systemroot%\install.cmd . Then as the VERY last line in your install.cmd file, have a DEL %systemroot%\install.cmdthen everything else is deleted, the shutdown is called, and then the batch terminates so the shell continues to load.it dont work, i get an error couldnt find batch.cmd , couldnt find cleanup.cmd yes i have place it in $$ and call them from winnt.sif [GuiRunOnce] Command0=%systemdrive%\batch.cmd Command1=%systemdrive%\cleanup.cmdbut i couldnt find them and use search dont give any result, so they arent being copied....in $1 it works but wont deleted themself. tommorow when i wake up i will take a look again.... but feel free to post whatever edit: i got a idea, i think it must be [GuiRunOnce] Command0=%cdromdrive%\batch.cmd Command1=%cdromdrive%\cleanup.cmdit is a idea but i am not sure if it works.... Link to comment Share on other sites More sharing options...
Alanoll Posted July 15, 2004 Share Posted July 15, 2004 $$ would be %systemdrive%\Windows or %systemroot%you put both files in $$? Link to comment Share on other sites More sharing options...
Solid as a rock Posted July 15, 2004 Share Posted July 15, 2004 $$ would be %systemdrive%\Windows or %systemroot%you put both files in $$?yes, to get an easy nice not difficulty overview.... (<----dont know if i say it good.) look, i dont like to put one batch there and other batch there and other batch there. then if i make a little change i maybe will get in trouble, so i put them all in the same map....but i will give your idea a trybrb Link to comment Share on other sites More sharing options...
Alanoll Posted July 15, 2004 Share Posted July 15, 2004 it wasn't an idea, it was a question You said you moved both files to $$yes i have place it in $$ and call them from winnt.sifIf you want it nice and easy, just put them in $1 but not in a folder under there, so they will copy over to just %systemdrive% instead of %systemdrive%\install. Link to comment Share on other sites More sharing options...
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