Guest User

Untitled

a guest
Aug 21st, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
  2.  
  3. runas /user:computerNameUserName /savecred ”C:pathtoprogram.exe”
  4.  
  5. Windows Registry Editor Version 5.00
  6.  
  7. [HKEY_CLASSES_ROOT*shellforcerunasinvoker]
  8. @="Run without privilege elevation"
  9.  
  10. [HKEY_CLASSES_ROOT*shellforcerunasinvokercommand]
  11. @="cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" "%1"""
  12. //save this file as .reg and try it for yourself. (it appears when you rightclick on exe's)
  13.  
  14. void RunImportTool()
  15. {
  16. using (var process = new Process())
  17. {
  18. process.StartInfo = new ProcessStartInfo
  19. {
  20. FileName = String.IsNullOrEmpty(_path) ? _path : @"C:Program Files (x86)PathToExecutable.exe",
  21. CreateNoWindow = true,
  22. WindowStyle = ProcessWindowStyle.Hidden
  23. };
  24. process.Start();
  25. process.WaitForExit();
  26. }
  27. }
Add Comment
Please, Sign In to add comment