October 11, 200718 yr 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
October 11, 200718 yr 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.
May 24, 200917 yr 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
Create an account or sign in to comment