LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically install an EXE via Labview built installer in "run as admin" mode

Hi,

 

I have a LabVIEW built installer which I am distributing to some people. Sometimes, they might need to right click the "setup.exe" and run as adminstrator due to some admin restrictions in their login account. But at any time if they forget to right click and select "run as admin", nothing happens. To avoid this, whenever the user double clicks the "setup.exe", I would like it to be always 'run as admin' by popping up the User Account Control window and asking the user to select yes or no automatically. The User Account Control window should come up asking for admin previliges. Can we acheive this by setting/editing some key in the setup.ini which will be generated when we build the installer? or do we have any other alternative to do this?

 

Thanks in advance for your help.

 

Thanks,

Srinivas

Srinivas
0 Kudos
Message 1 of 3
(2,690 Views)

As per my knowledge, If we need to install Installer/Runtime Engine we required Admin Rights.

 

Some useful info:

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Set-exe-to-run-as-admin/idi-p/2347260

 

http://forums.ni.com/t5/LabVIEW/set-vi-or-exe-to-run-as-admin/td-p/2347350

Munna
0 Kudos
Message 2 of 3
(2,684 Views)

Hello Sri_v

 

I had same problem some time back and this is what I did, this solution does not give pop up screen as you wish for, but it runs your application in admin mode always. The popup screen depends on windows OS some OS may show some may not.

 

1. Create your executable file the way we generally create

2. Go to executable file right click on it and go to properties

3. Go to Compactibility tab

4.Click on "Change settings for all users" button

5. Check the compactibility mode check box and check the Privilege level check box

6. Now delete the executable file you have created

7. Now create the executable file again, this time there will be a small logo on executable file which implies this executable file will always run in admin mode.

With Regards

Miraz
Kudos is better option to thank somebody on this forum
------------------------------------------------------------------------------
Message 3 of 3
(2,642 Views)