sugargenius Posted October 11, 2007 Share Posted October 11, 2007 I'm trying to create a winrar sfx that extracts to a directory and then runs a batch file. If the destination dir already exists, I want to delete it. I thought I could do this with Presetup:Path=C:\myappPresetup=cmd /c rmdir /s /q C:\myappSetup=temp\run.cmdSilent=2Overwrite=1Title=MyapppIt doesn't delete the c:\myapp folder. What am I missing? I tried this too:Path=C:\myappPresetup="cmd /c rmdir /s /q C:\myapp"Setup=temp\run.cmdSilent=2Overwrite=1Title=Myappp Link to comment Share on other sites More sharing options...
ajua Posted October 11, 2007 Share Posted October 11, 2007 i never came across with a need to delete some folder prior to extracting an sfx archive.try other commands to se if the presetup is working.remember that if you use overwrite=1 any file that exist will be overwritten, so if you are trying to delete the folder because of this, you are safe with overwrite=1. Link to comment Share on other sites More sharing options...
kif Posted May 24, 2009 Share Posted May 24, 2009 For future googlers...The Presetup step ignores the system's PATH, that's why simply using 'cmd' doesn't work.On the other hand, environment variables do get expanded, so you can write this instead:Presetup=%ComSpec% /c rmdir /s /q C:\myapp 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