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?
Please log in to comment



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)
Answered 09/11/2013 by: ekgcorp
Tenth Degree Black Belt

  • 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
  • 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?
  • 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.
  • 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.
    • 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?
Please log in to comment

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

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
   /user             <UserName> should be in form USER@DOMAIN or DOMAIN\USER
   program         command line for EXE.  See below for 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?

Answered 09/12/2013 by: BHC-Austin
Fourth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity