Ruby installer warning as prequisity - Advanced Installer Community
slavkovsky7
Posts: 4
Joined: Mon May 06, 2013 4:08 pm

Ruby installer warning as prequisity

Hello,
I've been trying to resolve the issue with warning during prerequisite installation.

http://cl.ly/image/3K1c1W3d0N3n see the image, this is from windows 7 . UAC is turn off, in fact UAC doesn't have any influence at this warning at all.

If user clicks on cancel my installer fails, and there is no reason why user should click cancel button

I spent too much time on trying to do the ruby installation manual, but I wasn't able to modify system variable PATH during the installation.
I tried almost anything. I even wrote simple c++ application to modify path. ( used RegSetKey, RegQueryKey winapi functions)
I need to have ruby path during installation in system variable because my scripts are using ruby bundler. Which needs to have 'Ruby\Bin' folder in PATH variable.

So I now can see that path is updated during installation , but installer doesn't seem to recognize newly updated path. So it cannot run binaries from 'Ruby\bin'
So my question is. Is there any possibility for installer to recognize updated PATH variable?

or

Is there any way to get rid off warning window?

EDIT: warning windows will of course pop up while installing prerequisites

Martin
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Ruby installer warning as prequisity

Hello Martin,

In order to avoid the warning message during prerequisite installation you can enable the “Run as administrator” option from the “Install Parameters” page. The benefit of elevating the bootstrapper application is that privileges are elevated only once (if necessary and at the beginning of the installation) and these privileges are inherited by all of the installation's prerequisites and the MSI file without requiring multiple elevation prompts.

Please note that modifications to the environment variables do not result in immediate change, so in order to have the newly updated path you can have a custom action that will force a refresh of the environment variables. Basically you need to broadcast a settings change message to all windows in the system so that any interested application can perform an update.

You can also take a look on How to propagate environment variables to the system article.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
slavkovsky7
Posts: 4
Joined: Mon May 06, 2013 4:08 pm

Re: Ruby installer warning as prequisity

Hello Dan,
Thanks for the response, but my installer contains administrative “Run as administrator” option.
Also I wrote the program in c++ that updates path int he system incidentally. I use SendMessage as it's in MS documentation
When my installer is running I can see that system variable is updated but installer won't launch .bat file in that path.
I can send you sample project that reproduces the issue.

Martin
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Ruby installer warning as prequisity

Hi Martin,

I'm not sure why you encountered this behavior.

Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

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

Return to “Common Problems”