phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Removing files in custom action

Hi,
I’m running a custom action which should remove some files on Uninstall.
I use “Launch File or Open URL” custom action which the following Command Line:
del /F "[Handbuecher_DIR]\*.pdf" (where [Handbuecher_DIR is a subfolder of [APPDIR].).
Unfortunately this approach doesn’t work. I always get an error message when uninstalling the software.
I looked at the verbose logging and found the following lines:
=== Verbose logging started: 02.11.2011 13:18:07 Build type: SHIP UNICODE 5.00.7601.00 Calling process: C:\ProgramData\Caphyon\Advanced Installer\{D3ACF53F-BBE9-4D69-BC62-71466DE16E2A}\setup_carlo.exe ===
Fehler 1722. Es liegt ein dieses Windows Installer-Paket betreffendes Problem vor. Ein Programm, das im Rahmen der Installation ausgeführt wurde, wurde nicht erfolgreich abgeschlossen. Wenden Sie sich an das Supportpersonal oder den Hersteller des Pakets. Aktion: viewer.exe.C50639F3_E56A_4737_9E1A_86E78F72D5A4, Pfad: C:\Windows\Installer\MSI30F.tmp, Befehl: del /F "C:\Program Files (x86)\Soloplan GmbH\CarLo\Handbuecher\\*.pdf"
Aktion beendet um 13:18:09: InstallExecute. Rückgabewert 3.
Aktion 13:18:09: Rollback.
I’m sure that the path is correct and the files exist. When execute the del command in a cmd-Window there are nor error (the files were removed without any message).
But executing the command via Custom Action always causes that error.
Can anybody help me?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Removing files in custom action

Hello,

I am not sure why you are getting this behavior. Why don't you use a file removal operation instead? This is the predefined way and should work as expected.

Also, since you require this on uninstall, maybe the Uninstall Cleanup wizard would better suit the scenario.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phlow666
Posts: 144
Joined: Thu Jan 27, 2011 8:10 am
Location: Germany

Re: Removing files in custom action

Hi,

the file removal operation seems to work corectly.

Thanks for your help.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Removing files in custom action

You're welcome, glad to assist.

Return to “Common Problems”