[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.setup

Exclude custom action .exe

Lonifasiko

7/20/2006 11:21:00 AM

Hi, after my setup project copies all necessary files to the target
directory selected by the user, I'm launching a little Console
application that moves some files to %USERPROFILE% directory. Besides,
I write application's configuration file (application.exe.config) with
the new path of these moved files.

I think this is the only way I can move these files to %USERPROFILE%
directory. But this should depend on what radiobutton user selects
during installation (install "Just for me" or "For all users").
That is, sometimes I should copy these files to %USERPROFILE% whereas
sometimes I should copy them to %aALLUSERSPROFILE%. How can I do this?
Can I use any environment variable in a Custom Folder that lets me do
this? What properties should I change then?

Well, back to my current situation, where I launch a .exe as a custom
action. The executable I'm launching during installation, is copied to
the target directory of the application, that is, I can see the .exe.
This way installation works fine. I've tried with "Exclude=true" in
order to launch my cutom action but do not copy the console
application, but this way installation crashes.

Besides, when launching the console application, I can see the console
window for some seconds. Is there a way to avoid this during
installation process?

I would really appreciate any light on this. Thanks very much in
advance.

6 Answers

Phil Wilson

7/21/2006 1:13:00 AM

0

The property ALLUSERS has a value of 1 when installing per-machine, so the
condition on your custom action that you want to run for a per-machine
install is ALLUSERS=1. Use ALLUSERS<>1 for the opposite condition.
--
Phil Wilson [MVP Windows Installer]
----
"Lonifasiko" <mloichate@gmail.com> wrote in message
news:1153394443.144878.176980@s13g2000cwa.googlegroups.com...
> Hi, after my setup project copies all necessary files to the target
> directory selected by the user, I'm launching a little Console
> application that moves some files to %USERPROFILE% directory. Besides,
> I write application's configuration file (application.exe.config) with
> the new path of these moved files.
>
> I think this is the only way I can move these files to %USERPROFILE%
> directory. But this should depend on what radiobutton user selects
> during installation (install "Just for me" or "For all users").
> That is, sometimes I should copy these files to %USERPROFILE% whereas
> sometimes I should copy them to %aALLUSERSPROFILE%. How can I do this?
> Can I use any environment variable in a Custom Folder that lets me do
> this? What properties should I change then?
>
> Well, back to my current situation, where I launch a .exe as a custom
> action. The executable I'm launching during installation, is copied to
> the target directory of the application, that is, I can see the .exe.
> This way installation works fine. I've tried with "Exclude=true" in
> order to launch my cutom action but do not copy the console
> application, but this way installation crashes.
>
> Besides, when launching the console application, I can see the console
> window for some seconds. Is there a way to avoid this during
> installation process?
>
> I would really appreciate any light on this. Thanks very much in
> advance.
>


Lonifasiko

7/21/2006 11:22:00 AM

0

Thanks very much. I'll try then, but I also needed to know if it's
possible to exclude the executable file I run in my custom action. That
is, execute it but not copy it in to the application's folder. I'm
afraid it's impossible.....am I wrong?

Regards.

Phil Wilson

7/21/2006 4:28:00 PM

0

If you add the exe as a custom action in the application folder it will also
show up in the solution explorer view. Right-click->Properties there will
show you an Exclude you can set. Note that it will run from a temp folder,
not your application folder.
--
Phil Wilson [MVP Windows Installer]
----
"Lonifasiko" <mloichate@gmail.com> wrote in message
news:1153480893.374692.175130@m79g2000cwm.googlegroups.com...
> Thanks very much. I'll try then, but I also needed to know if it's
> possible to exclude the executable file I run in my custom action. That
> is, execute it but not copy it in to the application's folder. I'm
> afraid it's impossible.....am I wrong?
>
> Regards.
>


Phil Wilson

7/21/2006 9:04:00 PM

0

As ar as I can tell, a setup with managed code custom action exes won't
build if Exclude is true, but if it's an unmanaged exe it will build with
Exclude=True. I have no idea why managed custom action exes are different
here.
--
Phil Wilson [MVP Windows Installer]
----
"Phil Wilson" <Phil.Wilson@unisys.spamcom> wrote in message
news:%233jBrKOrGHA.3856@TK2MSFTNGP02.phx.gbl...
> If you add the exe as a custom action in the application folder it will
> also show up in the solution explorer view. Right-click->Properties there
> will show you an Exclude you can set. Note that it will run from a temp
> folder, not your application folder.
> --
> Phil Wilson [MVP Windows Installer]
> ----
> "Lonifasiko" <mloichate@gmail.com> wrote in message
> news:1153480893.374692.175130@m79g2000cwm.googlegroups.com...
>> Thanks very much. I'll try then, but I also needed to know if it's
>> possible to exclude the executable file I run in my custom action. That
>> is, execute it but not copy it in to the application's folder. I'm
>> afraid it's impossible.....am I wrong?
>>
>> Regards.
>>
>
>


Lonifasiko

8/2/2006 6:04:00 AM

0

Thanks Phil for your replies.

As you say, my auxiliar console application (managed code) has no
success when setting Exclude=True. Therefore, I'll have to let it in
the application folder "forever", or have to remove it manually later
on, after installation.

A little bit "dirty" but seems to be the unique way for avoiding having
this additional .exe in the application's directory.

Thanks very much.

Phil Wilson

8/2/2006 9:02:00 PM

0

If you remove it after installation keep in mind that if the product install
goes into repair mode it will just get reinstalled.

--
Phil Wilson [MVP Windows Installer]
----
"Lonifasiko" <mloichate@gmail.com> wrote in message
news:1154498635.362219.40770@s13g2000cwa.googlegroups.com...
> Thanks Phil for your replies.
>
> As you say, my auxiliar console application (managed code) has no
> success when setting Exclude=True. Therefore, I'll have to let it in
> the application folder "forever", or have to remove it manually later
> on, after installation.
>
> A little bit "dirty" but seems to be the unique way for avoiding having
> this additional .exe in the application's directory.
>
> Thanks very much.
>