LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatically launch executable after the installation of this executable

is there a way to automatically launch the EXE of a NI customized installer immediately after the end of the installation, as we can see in lots of common software installers?

I've test "installer properties->Advanced -> Run executable at the end of installation" but I realized it's a wrong way to do that.

 

thanks for your help

Pierre FCentum TNS, Grenoble
Certified LabVIEW Associated Developer
0 Kudos
Message 1 of 3
(657 Views)

You can enter your just installed exe into that field, but then it will run with elevated privileges.

 

To avoid that, you can create a bat file that is called after the installer runs. Give it "[INSTALLDIR]" (including quotation marks) as argument and then in the file something like this:

 

cd %1
runas /trustlevel:0x20000 "myapp.exe"

 

I have no prior experience with this, but maybe it helps 😄

0 Kudos
Message 2 of 3
(604 Views)

With the solution above, if the installer was run as a different user (i.e. one with admin privileges) then the application will be executed under that user's account.

 

Out of curiosity, I looked up how Notepad++ does it and their solution is basically:

 

"%windir%\explorer.exe" "myapp.exe"

 

Which apparently launches myapp.exe with the same privileges and as the same user as the explorer process. Drawback is that passing command line arguments does not work.

0 Kudos
Message 3 of 3
(581 Views)