Thursday, 14 June 2012

TipZ#004:Bypass Annoying "Run as Admin" Option


  • You have got 2 or more user accounts in windows 7. one of them is Admin and the other is Standard user.
  • You normally use standard user account. and just put in the password when some app wants admin access. 
  • Now the problem is you run an app daily and it needs admin access. And you are annoyed of punching in the password everytime.
So here is the solution,
You need: 
  1. MiniRunAs.exe >> rename this to runn.exe   (this is a runas alternative)
  2. Elevate.exe   (this invokes elevation to highest Admin rights)
  3. Command or program to run.
Now put the runn.exe and Elevate.exe in one folder.

  • You have to run "AdmiN PaneL.msc" everyday as an admin.
  • Its path is  "C:\Users\User\Desktop\scratch\AdmiN PaneL.msc"
  • You put a copy of runn.exe and elevate.exe it the same path that is  "C:\Users\User\Desktop\scratch\"
  • Now create a shortcut with a target like this
    • C:\Users\User\Desktop\scratch\runn.exe <adminusername> <adminpassword> "C:\Users\User\Desktop\scratch\Elevate.exe" "C:\Users\User\Desktop\scratch\AdmiN PaneL.msc"
    • Note the above point is one single line.
  • Done. This shortcut will run  "AdmiN PaneL.msc"  using admin account and with elevated rights.
  • Similarly you can run a cmdline statement
    • C:\Users\User\Desktop\scratch\runn.exe  <adminusername> <adminpassword> C:\Users\User\Desktop\scratch\Elevate.exe C:\Users\User\Desktop\scratch\devcn.exe restart "PCI\VEN_10EC&DEV_8136&SUBSYS_1426103C&REV_02"
    • The above shortcut allows me to restsrt  my ethernet adapter. {devcn.exe is device console}
Note This method is unsecure. Your password is shown in plain text. Hide these shortcuts if necessary.

No comments:

Post a Comment