Jump to content

Aaargghhh. Help me. Reg phile not importing.


Recommended Posts

ECHO.
ECHO Deleting Driver Installation Files...
RD /S /Q %systemdrive%\Drivers

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

OR, 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.cmd

GREAT!! 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 :rolleyes: 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


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

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

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

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

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.cmd

then 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

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

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

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.cmd

then 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.cmd

but 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.cmd

it is a idea but i am not sure if it works....

Link to comment
Share on other sites

$$ 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 try

brb

Link to comment
Share on other sites

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.sif

If 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

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...