/build/static/layout/Breadcrumb_cap_w.png

Run as Admin on First Launch ONLY

Hi everyone

I just packaged an application which has a shortcut that runs an EXE from a network drive. The problem is, it requires to be run as admin for the first launch and the subsequent launches are fine.

I am trying to fix this issues with creating a shim using ACT but it's not working. I have never created shims before and this is my first time and am only following instructions I can find on the internet. 

I have tried the RunAsInvoker and RunAsAdmin both. If I use RunAsInvoker, I get the UAC prompt and the app launches fine if I click YES but with RunAsAdmin, I just get an error.

Any suggestions?


0 Comments   [ + ] Show comments

Answers (2)

Posted by: rileyz 11 years ago
Red Belt
0

Shim, yuck! Dont do it!

Why are you running it from the network drive? is this is the case you kinda shouldnt be putting it in a MSI... Anyway, do a gap capture to see if the exe is making any changes on first launch - it could be that. Or its the fact that its a exe running off the next work...

good luck!


Comments:
  • My Team Lead has asked me to resolve this issue with a shim. I need an MSI because the installation I captured installs bunch of DLLs and OCXs required for that remote EXE to run. The EXE is on a remote network drive and has to be run from there. - tellmehow 11 years ago
Posted by: vjaneczko 11 years ago
9th Degree Black Belt
0

First, shims are "only" for legacy apps that have compatibility issues with on OS.  Your Team Lead needs to allow the best method to be used, not point you towards a solution.  I nthis case, a shim is not the best solution.  SIDE NOTE: Even Microsoft suggests that shims should not be used since they are the last-ditch effort anyone should take.  Most vendors, if you contact them to verify, will not support an app that is shim'd.

If I read you correctly, launching the EXE causes files to be copied to the local drive, correct?  Also, is your package is an MSI?

I would create/modify the MSI that does the following;

Installs the shortcut.

Installs the DLL & OCX files, or at least some of them.

Modify the security of the folder where the EXE delivers the files so any future changes to that EXE will work without additional modification.

 

 

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ