Call exe file with parameters with custom action - 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!

Vicente
Posts: 20
Joined: Sat Oct 08, 2011 12:21 am

Call exe file with parameters with custom action

Hi,

after my installer has copied some files, I'm trying to call an .exe file with some parameters, but I can't seem to set things right. I'm using the predefined action "Launch file or open URL" like this:

[ProgramFilesFolder]\Microsoft SQL Server\100\Tools\Binn\sqlcmd.exe -i "[Application_Files_Dir]\script.sql" -S .\SQLExpress
[#Microsoft.LightSwitch.SecurityAdmin.exe] /createadmin /user:Administrator /password:lalala /fullusername:Administrator /config:"../web.config"

But this doesn't seem to work. Any ideas on how to do this (or do I need to code a .NET custom action for this?). Regards,

Vicente
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Call exe file with parameters with custom action

The custom action select is the correct one, and since I assume the command line was tested outside the installer that is not the problem.

What could be a problem is the permissions required by the EXE to run, on Windows 7 or Vista this could silently fail. To make sure it has all the permissions required
you can set the custom action as "Deferred with on impersonation", this will make it run with full admin rights under the SYSTEM account.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Vicente
Posts: 20
Joined: Sat Oct 08, 2011 12:21 am

Re: Call exe file with parameters with custom action

That was it, thanks a lot! :)

Return to “Common Problems”