[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

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

Bogdan

6/4/2007 6:44:00 PM

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



4 Answers

Phil Wilson

6/5/2007 8:32:00 PM

0

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]

"Bogdan" <nouser@nodomain.com> wrote in message
news:%23FkMMhtpHHA.960@TK2MSFTNGP03.phx.gbl...
> 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
>
>
>


Tony Leung

6/19/2007 3:37:00 PM

0

Thank you.
But how can we run an existing exe on the target system?

"Phil Wilson" <phil.wilson@wonderware.something.com> wrote in message
news:%23GPiaC7pHHA.4544@TK2MSFTNGP02.phx.gbl...
> 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]
>
> "Bogdan" <nouser@nodomain.com> wrote in message
> news:%23FkMMhtpHHA.960@TK2MSFTNGP03.phx.gbl...
>> 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
>>
>>
>>
>
>

Bogdan

6/20/2007 1:18:00 PM

0

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

"Tony Leung" <lianghf2000@hotmail.com> wrote in message
news:eCdHceosHHA.2268@TK2MSFTNGP05.phx.gbl...
> Thank you.
> But how can we run an existing exe on the target system?
>
> "Phil Wilson" <phil.wilson@wonderware.something.com> wrote in message
> news:%23GPiaC7pHHA.4544@TK2MSFTNGP02.phx.gbl...
>> 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]
>>
>> "Bogdan" <nouser@nodomain.com> wrote in message
>> news:%23FkMMhtpHHA.960@TK2MSFTNGP03.phx.gbl...
>>> 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
>>>
>>>
>>>
>>
>>
>


VinayVerma

7/18/2007 4:12:00 AM

0

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,