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!

negro.andrea
Posts: 8
Joined: Fri Apr 10, 2015 1:16 pm
Location: Turin, Italy

Launch if notebook

Hi everyone,
I have to create a package with the ability to choose whether to install it only on laptops.
This package is an msi that install a chained msi and do some configuration.
How can I set the launch conditions so that checks if there is a battery or something like that?
Andrea Negro - ECM Consultant
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Launch if notebook

Hi Andrea,

In order to check if the machine type where the installation package is a notebook or a desktop, you can create a custom action which will perform this search. Please take a look on the How to check the machine type? laptop or desktop? thread which debates a similar subject.

For example, you can create your custom action as a custom action written in C# or a custom action written in C++.

Then you can go in the “Custom Actions” page and add a predefined Launch attached file custom action with sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.

Also, please take a look on the Options to integrate and debug custom actions article which may be useful to you.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”