Conditional file install - 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!

dferreira
Posts: 3
Joined: Sat Jul 28, 2007 2:30 am
Location: Denver, CO
Contact: Website

Conditional file install

Is this possible in the Enterprise version of Advanced Installer?

I have 2 .NET services, one targeted at v1.1 and the other at v2. Both are named exactly the same (MyService.exe). I have set the prerequisite for the framework at 1.1, thus ensuring that the customer's machine will have at least that version.

Now, when it comes time to install, I want the MSI to pick which of the 2 files named MyService.exe to install based on which framework version the client has. I have no problem renaming the files (MyService1_1.exe and MyService2.exe) to get them into the installer.

So what I want to do is have the installer copy MyService1_1.exe and rename it to MyService.exe for those clients with the 1.1 framework. Similar thing for the 2.0 framework.

So, is this possible and how do I accomplish it? Temporary files and custom actions or? And how can I tell which framework is installed (installer variable?)?

Thanks in advance for any help you can offer.
dferreira
Posts: 3
Joined: Sat Jul 28, 2007 2:30 am
Location: Denver, CO
Contact: Website

Ok, so I solved that problem - I created a search in the registry to determne if the appropriate version of the framework is present. With the use of organizational groups, I can conditionally turn off the installation of the wrong framework version. Mission accomplished and all that.

Next problem: under Windows Vista, I can't get any service to install. I get an error message about permissions, even though I am running the install as an administrator. If I ignore the message, the code installs but the service does not. Retry just continually errors out, and we all know what cancel does.

I have not tried this on another platform. Just wanted to know if anyone else has seen this...

-Dave Ferreira
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Dave,
I can't get any service to install. I get an error message about permissions, even though I am running the install as an administrator.
Maybe your service requires some dependencies that are not present on the target computer. To view/add what dependences are required by your service, switch to "Files and Folders" page, select the service file and choose "Add Dependencies..." from the context menu.

Additionally try to reproduce the problem on other computer. Let us know if the problem persist.

Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
dferreira
Posts: 3
Joined: Sat Jul 28, 2007 2:30 am
Location: Denver, CO
Contact: Website

Thanks - the behavior was the same on two other machines, but it was not a fault of the installer. For some reason, all three machines had to be rebooted in order to see the service. This is purely .NET (no COM), so for the life of me I can't figure that one out.

I removed the attempt to start the service from the installer and now alert the user to reboot the computer on completion. It appears now that everything is working as expected.

Thanks again for the response!

-Dave Ferreira

[edit]
The permission error was coming from the start request in the installer, not from installing the service. Just wanted to clear that up.

Return to “Common Problems”