/build/static/layout/Breadcrumb_cap_w.png

How to run a exe (shortcut exe) as administrator in windows XP without poping UAC

hi

i installed visual basic 6 on XP and it is working fine but it need to run as administrator everytime when we open visual basic. without admin rights some of the tools will not work. so is ther a way to run visual basic with admin rights in XP. i am using application compatibality toolkit for windows 7 but this one is not working for XP.

 

so any help should be appreciated.


1 Comment   [ + ] Show comment
  • UAC in WinXP? Not sure what you mean there...do you have a screenshot you can post? - Chris.Thomson@Sitel.Com 10 years ago

Answers (2)

Posted by: ekgcorp 10 years ago
10th Degree Black Belt
0

To my understanding, UAC did not start until Window's Vista.. So if you are trying to gain access to run as Admin in XP. All you do is open up permissions on Folders and Registries. At least when I build packages for XP, that is all we ever did. You can apply permissions a number of ways (xcacls, or Security Template files are the least error prone). You can even apply AD groups to these permissions so that only users who are part of a certain group can run that software as Admin.

Now, if you are talking about how to get around UAC while its still there, this is what I have found to get around it.

  1. Add System Environment Variable SEE_MASK_NOZONECHECKS=1 (does not always work)
  2. Add the following Registry via GPO or manually:
  3. HKU\.default\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains (add a new key with your local internet name ex: exxon.com, ge.com
  4. then add a DWORD called * with a value of (this was the best way and always worked for us)
  5. you can also add registry entry to HKLM or to HKCU because HKU\.default\ is for system account (sccm installs)

Comments:
  • I think we have only a handful of xp clients as I believe support for xp expires 8.2014. Ekgcorp is correct uac does not exist in xp - Jbr32 10 years ago
  • Thnaks for the reply... i got liitil idea about that tyo give permission to the folders but for example if i want to run this exe (C:\Program Files\Visual Studio\VB6.EXE) as administrator how can we give a administrator rights to this file? - enthusiasm 10 years ago
  • Manually just by going to the file, get the properties and change the security settings on the file or folder.
    But best way would be to go to your System Administrator, explain your issue and let him do it. He is educated in basic computer administration so it will be a small problem for him to help you. - EVEEN 10 years ago
  • If you're using VB (or any of the VS tools), you will probably be a developer, in which case you should be granted local administrator privileges. Get your System Administrator to add you to the locaL ''Administrators' group. - anonymous_9363 10 years ago
    • i am trying to build a silent package and push to users and users doesnt have any admin rights. so i need to give some script or some registry change to run exe as admin. is ther any way to do it? - enthusiasm 10 years ago
Posted by: BHC-Austin 10 years ago
4th Degree Black Belt
0

You can create a batch file that will use the "runas" command:

RUNAS USAGE:
RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
        /user:<UserName> program
RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
        /smartcard [/user:<UserName>] program
   /noprofile        specifies that the user's profile should not be loaded.
                     This causes the application to load more quickly, but
                     can cause some applications to malfunction.
   /profile          specifies that the user's profile should be loaded.
                     This is the default.
   /env              to use current environment instead of user's.
   /netonly          use if the credentials specified are for remote
                     access only.
   /savecred         to use credentials previously saved by the user.
                     This option is not available on Windows XP Home Edition
                     and will be ignored.
   /smartcard        use if the credentials are to be supplied from a
                     smartcard.
   /user             <UserName> should be in form USER@DOMAIN or DOMAIN\USER
   program         command line for EXE.  See below for examples
Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""
NOTE:  Enter user's password only when prompted.
NOTE:  USER@DOMAIN is not compatible with /netonly.
NOTE:  /profile is not compatible with /netonly.

The problem there is you are either prompted for a password or the password would be stored in plain text inside the batch file. Not really ideal in either case. My question would be, why aren't your software developers (who would be the only ones I can think of needing access to VB, really) granted local admin rights to the systems they're working from?

 
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