cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MasterYoda
Level 2

Execute DOS command from Custom Action

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.
Labels (1)
0 Kudos
(1) Reply
moxi_g
Level 2

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

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