set reg keys after 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!

isy83
Posts: 7
Joined: Thu Jun 30, 2011 2:36 pm

set reg keys after install

Hi Board,

I'm quiet new in MSI packageing, so thank you in advance for your patience!

I'd like to install pdf24Creator.exe and "integrated" the .exe file to my .msi package.
I need to set a couple of reg keys afterwards the installation.

At present all keys I made regarding pdf24creator will be overwritten, cause the registry settings were created in advance of the actual pdf24Creator installation.



Can I change the order or do I have to use a custom Action?

Thanks!
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: set reg keys after install

Hello and welcome to the Advanced Installer Forums,

I am not sure what you mean. Have you included the "pdf24Creator.exe" as a feature based prerequisite in your .MSI ?

Also, you may find this article helpful.

Can you please give us more details and exemplify the problem so we can further assist you.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
isy83
Posts: 7
Joined: Thu Jun 30, 2011 2:36 pm

Re: set reg keys after install

Hi Mihai,

okay, ipdf24Creator.exe is only available as a exe file.

To install it silent in my SCCM environment i have to build a msi package out of it.

The installation works fine, pdf24Creator.exe is installed properly with my pdf24Creator.msi package.

But, I have to edit some reg entries, that pdf24Creator is not shown in the system tray, receive no automatic updates...and so on...

If I set these entries in the reg section "resources -> registry" area, the settings will be overwritten by the pdf24Creator.exe setting during the installation.

If I had the chance to switch the order of the reg setting and the installation, everything would be fine.

all clarities eliminated? :D
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: set reg keys after install

Hello,

Unfortunately, if you use a .MSI wrapper the custom action that triggers the .EXE must be executed at the end of the installation. This is happening because two installer processes cannot run at the same time. It is executed right before InstallFinalize, because during that standard action the temporary files( including .EXE ) get removed.

This being the case, the only way to achieve this is by executing a custom action that modifies the registry after the InstallFinalize standard action.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
isy83
Posts: 7
Joined: Thu Jun 30, 2011 2:36 pm

Re: set reg keys after install

Hi Mihai,

thanks for your reply!
This is exactly my scenario, I'll try to set a custom action in the "commit" section to set the entries.
It is only possible to apply scripts via .js and .vbs files?
At present I have my problems in finding out which function of AI will be the best for my script, like "script inline" or "launch file or open URL".

Greetings!

Andreas
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: set reg keys after install

Hi Andreas,

Last sentence quoted from my previous post:
This being the case, the only way to achieve this is by executing a custom action that modifies the registry after the InstallFinalize standard action.
First sentence from you previous post:
This is exactly my scenario, I'll try to set a custom action in the "commit" section to set the entries.
Why do you want to schedule the custom action after the Commit standard action?
It is only possible to apply scripts via .js and .vbs files?
You can also have Win32 .DLL and .EXE files. For complete information about custom actions I recommend you follow this link from our user guide.
At present I have my problems in finding out which function of AI will be the best for my script, like "script inline" or "launch file or open URL".
These custom actions are detailed in the subarticles from the link above. What kind of script are you trying to run using these custom actions?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
isy83
Posts: 7
Joined: Thu Jun 30, 2011 2:36 pm

Re: set reg keys after install

hi Mihai,

Thanks for your reply!
I have to trigger a script after the pdf24.exe installation.
What I'm trying now is to create a .vbs script which sets my registry settings and place that into the commit section.

I'll try to implement that in a few hours, I'll give you a short feedback!


Thanks so far!
isy83
Posts: 7
Joined: Thu Jun 30, 2011 2:36 pm

Re: set reg keys after install

Hi Mihai,

can you please give me a short advise how to execute an existing .vbs script?
With "script inline" I'm already able to trigger a single .vbs line. But I'd like to execute a .vbs file. (the vbs file is already in the application folder)

Thanks in advanced!

Andreas
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: set reg keys after install

Hi Andreas,

If you don't need the .VBS file for your installed application's functionality but only for the installer, you can use a "New Attached Custom Action".

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
isy83
Posts: 7
Joined: Thu Jun 30, 2011 2:36 pm

Re: set reg keys after install

Hi Mihai,

Step by step we come closer to the goal!
I got two vbs files, one file deletes a desktop`icon, the other sets registry keys.
The first file is working well.

The second script which applies the reg settings needs to be executed with extended user permissions.
Is there a way to trigger the vbs script with extended user rights like "run as" ?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: set reg keys after install

Hello,

To elevate the permissions under which a custom action is executed , you must set it with "Deferred, with no impersonation" execution option. This way the custom action will run under the System account. Also please note that public properties are not available to deferred custom actions. Here is the article that explains more.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
isy83
Posts: 7
Joined: Thu Jun 30, 2011 2:36 pm

Re: set reg keys after install

Working! Thanks so far!

Return to “Common Problems”