Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"
- runas /user:computerNameUserName /savecred ”C:pathtoprogram.exe”
- Windows Registry Editor Version 5.00
- [HKEY_CLASSES_ROOT*shellforcerunasinvoker]
- @="Run without privilege elevation"
- [HKEY_CLASSES_ROOT*shellforcerunasinvokercommand]
- @="cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" "%1"""
- //save this file as .reg and try it for yourself. (it appears when you rightclick on exe's)
- void RunImportTool()
- {
- using (var process = new Process())
- {
- process.StartInfo = new ProcessStartInfo
- {
- FileName = String.IsNullOrEmpty(_path) ? _path : @"C:Program Files (x86)PathToExecutable.exe",
- CreateNoWindow = true,
- WindowStyle = ProcessWindowStyle.Hidden
- };
- process.Start();
- process.WaitForExit();
- }
- }
Add Comment
Please, Sign In to add comment