Solved How to automatically run a shortcut with "RunAs" w/ credentials

JustWatching

New member
Member
Local time
4:36 PM
Messages
71
How to automatically run a shortcut with "RunAs" w/ credentials

WHat would I need to put in the target field of a shortcut properties in order to automatically run as a diff user? (Instead of holding down shift and right clicking on shortcut and selecting RunAs different user.) I am trying to run remote assistance as a diff user and I added /runas /user:username %windir%\systm32\msra.exe /offerra but nothing comes up, i see a window flash for a moment but nothing happens. also tried adding /password:(password) and that did not work either.


thanks.
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i5-3350P Ivy Bridge Quad-Core 3.1GHzz
Motherboard
Asus P8H77-v
Memory
HyperX XMP 10th Anniversary Series 16GB
Graphics Card(s)
EVGA GeForce GTX 970 4GB
Sound Card
Onboard
Monitor(s) Displays
Acer S241HL 24", ASUS V238h 23"
Screen Resolution
1920x1080
Hard Drives
Kingston SSD 240GB
Samsung 2TB
PSU
XION AXP-700K14XE 700W ATX
Case
HEC 6C28BBX585 Black Steel ATX Mid Tower
Cooling
ZALMAN CNPS9500 AT 2 Ball CPU Cooling Fan/Heatsink
Keyboard
Logitech G710+
Mouse
Anker Wireless Vertical Mouse
Internet Speed
220/20
Antivirus
Webroot
Browser
Chrome

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Appreciate the reply. I do that, enter the password when it prompts and nothing happens msara,exe /offerra does not open. i tried removing the /offerra switch, still nothing opened.
I just don't get it
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i5-3350P Ivy Bridge Quad-Core 3.1GHzz
Motherboard
Asus P8H77-v
Memory
HyperX XMP 10th Anniversary Series 16GB
Graphics Card(s)
EVGA GeForce GTX 970 4GB
Sound Card
Onboard
Monitor(s) Displays
Acer S241HL 24", ASUS V238h 23"
Screen Resolution
1920x1080
Hard Drives
Kingston SSD 240GB
Samsung 2TB
PSU
XION AXP-700K14XE 700W ATX
Case
HEC 6C28BBX585 Black Steel ATX Mid Tower
Cooling
ZALMAN CNPS9500 AT 2 Ball CPU Cooling Fan/Heatsink
Keyboard
Logitech G710+
Mouse
Anker Wireless Vertical Mouse
Internet Speed
220/20
Antivirus
Webroot
Browser
Chrome
I used this below in a .bat file to test and debug with, and appears that it's failing because it requires elevation.

Code:
runas /savecred /user:[B][COLOR=red]USER-NAME[/COLOR][/B] "C:\Windows\System32\msra.exe"
 
pause

command.jpg

I've tried every possible way to run it elevated from the shortcut to setting msra.exe itself to "Run as administrator" when opened, but they all failed to run. :(
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Well that is unfortunate.
Thank you for all the help.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i5-3350P Ivy Bridge Quad-Core 3.1GHzz
Motherboard
Asus P8H77-v
Memory
HyperX XMP 10th Anniversary Series 16GB
Graphics Card(s)
EVGA GeForce GTX 970 4GB
Sound Card
Onboard
Monitor(s) Displays
Acer S241HL 24", ASUS V238h 23"
Screen Resolution
1920x1080
Hard Drives
Kingston SSD 240GB
Samsung 2TB
PSU
XION AXP-700K14XE 700W ATX
Case
HEC 6C28BBX585 Black Steel ATX Mid Tower
Cooling
ZALMAN CNPS9500 AT 2 Ball CPU Cooling Fan/Heatsink
Keyboard
Logitech G710+
Mouse
Anker Wireless Vertical Mouse
Internet Speed
220/20
Antivirus
Webroot
Browser
Chrome

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Well thats very cool and i works perfect except for one thing. My msra.exe /offerra is pinned to my taskbar, Always lots of windows open so its quicker than trying to use a shortcut on the desktop. The modified right click menu does not work when the item is pinned to to the taskbar. I can right click on it once, and it will give me 'unpin from taskbar' and the exe, i then right click on that exe and it just give me the default right click menu
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i5-3350P Ivy Bridge Quad-Core 3.1GHzz
Motherboard
Asus P8H77-v
Memory
HyperX XMP 10th Anniversary Series 16GB
Graphics Card(s)
EVGA GeForce GTX 970 4GB
Sound Card
Onboard
Monitor(s) Displays
Acer S241HL 24", ASUS V238h 23"
Screen Resolution
1920x1080
Hard Drives
Kingston SSD 240GB
Samsung 2TB
PSU
XION AXP-700K14XE 700W ATX
Case
HEC 6C28BBX585 Black Steel ATX Mid Tower
Cooling
ZALMAN CNPS9500 AT 2 Ball CPU Cooling Fan/Heatsink
Keyboard
Logitech G710+
Mouse
Anker Wireless Vertical Mouse
Internet Speed
220/20
Antivirus
Webroot
Browser
Chrome
Ah, yeah I forgot that it didn't affect the context menu of an icon on the taskbar.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Well I appreciate all the help anyways. Very odd that I cannot' force' it to run even with elevated privileges. I don't suppose ti would be possible to have a power-shell script make it auto 'runas' with the credentials? I guess if it won't work manually, it won't work with a PS script either. Oh well. I guess you can close this :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i5-3350P Ivy Bridge Quad-Core 3.1GHzz
Motherboard
Asus P8H77-v
Memory
HyperX XMP 10th Anniversary Series 16GB
Graphics Card(s)
EVGA GeForce GTX 970 4GB
Sound Card
Onboard
Monitor(s) Displays
Acer S241HL 24", ASUS V238h 23"
Screen Resolution
1920x1080
Hard Drives
Kingston SSD 240GB
Samsung 2TB
PSU
XION AXP-700K14XE 700W ATX
Case
HEC 6C28BBX585 Black Steel ATX Mid Tower
Cooling
ZALMAN CNPS9500 AT 2 Ball CPU Cooling Fan/Heatsink
Keyboard
Logitech G710+
Mouse
Anker Wireless Vertical Mouse
Internet Speed
220/20
Antivirus
Webroot
Browser
Chrome
I'm afraid I don't know much about PowerShell scripts. :(
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Built
OS
Windows 10 Pro
CPU
AMD Ryzen 5 2400G Processor with Radeon RX Vega 11 Graphics
Motherboard
ASRock X470 Master SLI/AC AM4 AMD Promontory X470 SATA 6Gb/s
Memory
G.SKILL Ripjaws V Series 16GB (2 x 8GB) 288-Pin DDR4 SDRAM D
Graphics Card(s)
2047MB NVIDIA GeForce GTX 1060 6GB (EVGA)
Sound Card
Motherboard Built in
Monitor(s) Displays
Acer R240HY bidx 23.8-Inch IPS HDMI DVI VGA (1920 x 1080) Wi
Screen Resolution
1920 x 1080
Hard Drives
1TB Sandisk SSD PLUS (Main drive)
500 GB Seagate 7200 RPM (Games)
500 GB Western Digital 7200 RPM (Virtual Machines)
PSU
CORSAIR TX Series TX650M 650W 80+ Gold Modular Power Supply
Case
CORSAIR CARBIDE SPEC-02 Mid-Tower Gaming Case, Red LED Fan
Cooling
220mm, two 120mm, and four 60mm fans
Keyboard
Wired Dell keyboard
Mouse
Wireless Logitech mouse
Internet Speed
250mb down, 30mb up
Antivirus
Panda Cloud Antivirus
Browser
Chrome-ish x64
Other Info
Your awesome for reading this.
Back
Top