Jump to content

Recommended Posts

Posted

After my GuiRunOnce installs all of my included software, I use the following line to clean up:

rd /s /q %systemdrive%\installtemp

I use /s to have it remove all files and subfolders within C:\installtemp. It would ask for Y/N confirmation, but /q (quiet mode) prevents that.

Or so I thought.

Even with that line as it is, it still gives me an "are you sure", halting everything until a response from the user. Also, I used CMDOW to disable the window so the user cannot close it and stop the process mid-way.

Require user input + window disabled with CMDOW == bad!!!

Of course, I worked around it by pressing ctrl+alt+del, going to "run", and doing cmdow "windows xp setup" /ena

but can anyone help me here? please?


Posted

RD /S /Q "%SystemDrive%\InstallTemp"

Should work, i ALWAYS put quotes around mine, whether there is a space or not :P

Posted

I'm not sure...

once I reenabled the window and entered Y, the script went on as normal, and C:\installtemp (and everything in it) was gone. The command was successful, just quiet mode isn't working. I will still try it, though...

Posted

how r u executing rd? threw a batch file? or using runoncex ?

REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v 1 /d "cmd.exe /c RD /S /Q %systemdrive%\InstallTemp" /f

try that :)

Posted

Astalavista, there is a pretty comprehensive website dealing with batch files and scripting. It has been mentioned here in the forums before.

Check out: http://www.robvanderwoude.com/

Zolcos, to get a Y or N to work in a batch file try:

echo Y|RD /S /Q %SYSTEMDRIVE%\INSTALLTEMP

You should not really need it as MCT suggests but if you can't get it to work, try the above line.

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