PDA

View Full Version : Execute DOS command from Custom Action



MasterYoda
06-03-2011, 01:48 PM
I want to execute a dos command in a custom action, like:

del file.txt

This behavior can be placed in a batch file and executed:

[SystemFolder]Cmd.exe /c "InstallService.bat"

But I'd like to avoid the batch file, if I can.
I've tried:

[SystemFolder]Cmd.exe /c "del file.txt"

but it fails.

moxi_g
06-14-2011, 01:34 PM
Try this
[SystemFolder]Cmd.exe /c del "[FileLocation]file.txt"

[FileLocation] = C:\Windows\xyz folder name