all groups > dotnet setup > june 2007 >
You're in the

dotnet setup

group:

How to run cmd.exe or other exe on user's machine from a setup project?


How to run cmd.exe or other exe on user's machine from a setup project? Bogdan
6/4/2007 2:43:31 PM
dotnet setup:
I'm not sure if I got it right but according to the on-line docs Windows
installer allows you to run exe on user's machine (i.e. an exe that is not
included in a given setup project). I think that this is custom action type
50. I can't figure out how to add such exe to my setup project in VS. It
seems that I can only add files that are included in the project.

Any help will be appreciated.
Thanks,
Bogdan


Re: How to run cmd.exe or other exe on user's machine from a setup project? Phil Wilson
6/5/2007 1:32:13 PM
That's correct - Visual Studio offers a subset of what's in MSI, and that
particular built-in custom action isn't available (run an existing exe on
the target system) but you can write your own custom action to run it.
--
Phil Wilson
[MVP Windows Installer]

[quoted text, click to view]

Re: How to run cmd.exe or other exe on user's machine from a setup project? Tony Leung
6/20/2007 12:36:46 AM
Thank you.
But how can we run an existing exe on the target system?

[quoted text, click to view]
Re: How to run cmd.exe or other exe on user's machine from a setup project? Bogdan
6/20/2007 9:18:24 AM
As Phil suggested, you can create your own custom action (exe or dll) that
runs the existing exe. I use dll custom action because I need to interact
with msi. Exe custom action is somewhat easier because you do not need to
deal with msi at all and you can easily test it on its own. Your custom
action could be as simple as a single call to CreateProcess() or
ShellExecute().

Bogdan

[quoted text, click to view]

Re: How to run cmd.exe or other exe on user's machine ... Vinay Verma
7/17/2007 9:11:53 PM
Well don't ask me about how I found that..thats a long story :P....

The custom action to run an exe is as follows:

1) CustomAction 66

You won't find any documentation on this Custom Action, but it is there in visual studio to run an exe.

Regards,
AddThis Social Bookmark Button