MSFN Forum: Batch file and UAC in Windows 7 ? - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Batch file and UAC in Windows 7 ? Rate Topic: -----

#1 User is offline   ZYklon 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 07-November 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 03 February 2013 - 12:59 PM

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 !

Enable
 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



Disable
 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 ?


#2 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 5,019
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 03 February 2013 - 01:59 PM

create a scheduled task for each CMD file:

http://www.msfn.org/...-the-uac-part2/

#3 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,578
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 03 February 2013 - 02:19 PM

Get higher privileges:
http://www.msfn.org/...ustedinstaller/

jaclaz

#4 User is offline   allen2 

  • Not really Newbie
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,754
  • Joined: 13-January 06

Posted 03 February 2013 - 02:53 PM

In pure Batch, you just need to add "set __COMPAT_LAYER=RunAsInvoker " in the begining of your batch file to bypass uac.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy