Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Batch file and UAC in Windows 7 ?

- - - - -

  • Please log in to reply
3 replies to this topic




  • Member
  • 16 posts
  • Joined 07-November 11
  • OS:Windows 7 x86
  • Country: Country Flag
Hey MSFN, Im working on a batch that installs silently programs, and its working very well on XP, but on Window 7, UAC (User Account Control) it's poping up asking 'Yes' or 'No' for every exe batch file installing !
Is there any trick that you can actually, bypass or something UAC ?
I know ninite.com that download apps then installs silently and no UAC problem, I checked ninite process with Process Explorer, and Im not sure but, I guess it uses iexplorer.exe process to inject and run, and bypasses UAC !

A solution I have for this problem is to edit registry keys to Disable UAC, but to take effect after disabling UAC, I must reboot PC !
I use this code to disable and enable UAC !

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

Any idea ?

How to remove advertisement from MSFN



    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,216 posts
  • Joined 28-August 05
  • OS:Windows 8 x64
  • Country: Country Flag


create a scheduled task for each CMD file:

Posted Image



    The Finder

  • Developer
  • 16,177 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
Get higher privileges:




    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,804 posts
  • Joined 13-January 06
In pure Batch, you just need to add "set __COMPAT_LAYER=RunAsInvoker " in the begining of your batch file to bypass uac.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users