/build/static/layout/Breadcrumb_cap_w.png

Providing admin rights to application launching from start /menu

Hi I am working with an application which needs to be given admin rights while launching from start/menu. i have tried to use subinacl.exe but still it doesnot work. Any suggestions? Thanks in advance.

4 Comments   [ + ] Show comments
  • hi thanks for reply.. But as u suggested BHC-Austin instead of doing it, can we add any registry which will change the permissions for only that shortcut. In my case the path for start menu shortcut is "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\xxx\xxxx\xxxxxSoftware.lnk" and when i am trying to launch from standard user or other user account it asks me administrative password. - swap20june 9 years ago
  • i am trying to use this command line also. subinacl.exe /files "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\xxxxxxx\xxxxxx\xxxxxxxxxsoftware.lnk" /grant=users=f...is this right? - swap20june 9 years ago
  • and its for win 7 64 bit and 32 bit deployment... - swap20june 9 years ago
  • Thanks for reply. now i am able to repackage it and exctracted msi which at last launch fine. but still providing admin rights problem is there with standard users. where i can start for troubleshooting?

    thanks all - swap20june 9 years ago

Answers (4)

Answer Summary:
Posted by: Norpy 9 years ago
White Belt
0
This is what the registry entry looks like if you want to run Setup.exe as an administrator. 
Just edit the path in bold, with your path, remember to add the double slashes "\\". 
Open Notepad and copy/past in the information and save as .reg 
Add this line to your script, to add the entry silently "regedit /s "Path\name.reg" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\ibm_temp\\v9.7fp6_ntx64\\CLIENT\\setup.exe"="~ RUNASADMIN"


Comments:
  • hi thanks for comment,but it should run for any user. i am trying to deploy it silently on user's machines. so will it work with above key? - swap20june 9 years ago
    • Thanks for tips. it worked.... - swap20june 9 years ago
Posted by: EdT 9 years ago
Red Belt
0
Microsoft's Application Compatibiliity Toolkit's Standard User Analyser is ideal for finding these application areas where additional permissions are required.
Posted by: BHC-Austin 9 years ago
4th Degree Black Belt
0

You'll likely need to set the "Run as administrator" flag in the Compatibility settings of the executable. Just right click the shortcut, select Properties, then switch to the Compatibility tab and check the box "Run as administrator" near the bottom. You can also click the button to change the settings for all users.

You can also do this in the registry as part of the installation script. The key you would put it in for all users is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

or for just the current user

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

Create a string value, the name being the full path to the executable, then the data is just a space separated list of the flags. For Run as administrator, just add the flag:

RUNASADMIN

Here's a good link to some more info: http://www.intrntpirate.com/?tag=appcompatflags


Comments:
Posted by: SMal.tmcc 9 years ago
Red Belt
0
It may be you just need to give the users extra rights to a directory and/or Registry keys.  We have found 99% of the software that need to be run as admin just needs more access to certain things.

Comments:
  • Agreed. We run into this a lot with LOB apps, where the software vendor's support staff says "what do you mean your users aren't local admins? just make them a local admin." Then after we push back, or do some of our own digging, we figure out we just need to open up permissions on a certain file, folder or registry key. - BHC-Austin 9 years ago
    • hi sorry for opening this question again,but this key doesnot solve the problem. when tested as a local user/without admin rights the application again asks for admin user id and password. i observed when launching from start /menu programe it has run as admin option also. need immediate help. its urgent. thanks - swap20june 9 years ago
      • does shimming will work? - swap20june 9 years ago
      • quick and dirty method:

        use pstools psexec to run it as admin, just have a shortcut that points to an exe you compiled calling psexec with the proper parameters to call the exe.

        create a bat file like this:

        psexec -i -accepteula -u .\administrator -p password -d setup.exe

        then use something like "bat to exe" to compile so the password does not show.

        place all 3 exe's in same place and create shortcut on start menu to the compiled exe.

        you can also run a vb script to do this via a shortcut:

        https://www.google.com/search?q=vb+script+to+run+a+program+as+admin&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&channel=fflb#channel=fflb&q=vbscript+to+run+a+program+as+admin&rls=org.mozilla:en-US:official&spell=1 - SMal.tmcc 9 years ago
 
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