Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / August 2006

Tip: Looking for answers? Try searching our database.

Exclude custom action .exe

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lonifasiko - 20 Jul 2006 12:20 GMT
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.
Phil Wilson - 21 Jul 2006 02:13 GMT
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.
Signature

Phil Wilson [MVP Windows Installer]
----

> Hi, after my setup project copies all necessary files to the target
> directory selected by the user, I'm launching a little Console
[quoted text clipped - 23 lines]
> I would really appreciate any light on this. Thanks very much in
> advance.
Lonifasiko - 21 Jul 2006 12:21 GMT
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 - 21 Jul 2006 17:28 GMT
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.
Signature

Phil Wilson [MVP Windows Installer]
----

> 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 - 21 Jul 2006 22:04 GMT
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.
Signature

Phil Wilson [MVP Windows Installer]
----

> 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
[quoted text clipped - 6 lines]
>>
>> Regards.
Lonifasiko - 02 Aug 2006 07:03 GMT
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 - 02 Aug 2006 22:02 GMT
If you remove it after installation keep in mind that if the product install
goes into repair mode it will just get reinstalled.

Signature

Phil Wilson [MVP Windows Installer]
----

> Thanks Phil for your replies.
>
[quoted text clipped - 7 lines]
>
> Thanks very much.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.