Help - Search - Members - Calendar
Full Version: sfx Presetup
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   


Google Internet Forums Unattended CD/DVD Guide
sugargenius
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:

CODE
Path=C:\myapp
Presetup=cmd /c rmdir /s /q C:\myapp
Setup=temp\run.cmd
Silent=2
Overwrite=1
Title=Myappp


It doesn't delete the c:\myapp folder. What am I missing? I tried this too:

Path=C:\myapp
Presetup="cmd /c rmdir /s /q C:\myapp"
Setup=temp\run.cmd
Silent=2
Overwrite=1
Title=Myappp
ajua
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.
kif
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:

CODE
Presetup=%ComSpec% /c rmdir /s /q C:\myapp




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.