Archive: Shell Command


Shell Command
hi, i am using vss as codebase, now after installation i want to use following command to delete vssver.scc files from installed directories. So i need to execute the following command:

del vssver.scc /s/q

how to execute this from installer(without executing any bat file).


ReadEnvStr $0 COMSPEC
nsExec::Exec '$0 /C del vssver.scc /s/q'
Pop $0
But why not use Delete?

is it possible to delete directories recursively using Delete command.


No, for that you have RMDir.


sorry actually the question i asked wasn't so clear. wat i meant was that, is it possible to delete some file using Delete command from multiple directories as i'm using /s/q for the same/ And thanx the code u have provided is working fine.


It's possible using the Locate macro. However, if you install the files, there's a simpler method. I assume you have File /r somewhere in your script. If so, simply add /x vssver.scc to it:

File /r /x vssver.scc myprogram\*
This way it won't even install those files.

yup, its great.
would u plz explain me wat it is doin internally for this.means is it reading all files from dir myprogram excluding these files...?:weird:


Yes, that's exactly what it does. The /x switch tells it which files to ignore. You should already have a similar line in your script, if you need to delete files you install.


cool, nice work Mr. kichik....................:up: