Error when running a cmd prompt - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Mirax
Posts: 5
Joined: Wed Aug 29, 2007 7:57 pm

Error when running a cmd prompt

Is this possible. During the setup dialog boxes, i would like to have a button where the user can push it, and run a exe file, before going to the next step, is this possible? I have tried to do it, and the exe file only contains "Ping http://www.google.com" or "del c:\thisfile.txt"
The command is running and wither pinging or deleting the file, but the an error comes it says :
There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor"

The reason why i want to run it before i go futher in the setup, is to check a few things and so the user have the oppertunity to delete some files before starting the installations.
Daniela Petrescu
Posts: 30
Joined: Tue Aug 14, 2007 10:03 am

Hi,

In order to do this you should go in the Custom Action page and under UI Custom action you should add a new EXE with Working Dir custom action. Set the Working Dir to "WindowsVolume" and the Full Path to the command you want to execute, for example:

Code: Select all

"[%ComSpec]" /K "ping www.google.com"
The "[%ComSpec]" is a formatted value specifying an environment variable and at runtime it resolves to the full path of the command interpreter ("cmd.exe" on WinNT systems and command.com on Win9x systems).

Also make sure that you select the option "Synchronous execution, ignore return code".

Then in the Dialogs page define a DoAction Published Event for the your button, specifying the custom action as its Argument.

I hope this helps.

Regards,
Daniela

_________________
Daniela Petrescu
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”