Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to automatically run a shortcut with "RunAs" w/ credentials

16 Jan 2014   #1
JustWatching

Windows 7 Ultimate x64
 
 
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 /passwordpassword) and that did not work either.


thanks.


My System SpecsSystem Spec
.
16 Jan 2014   #2
Brink

64-bit Windows 10 Pro
 
 

Hello JustWatching,

This should be able to help you create a shortcut to run a program as a different user.

Run as Different User Shortcut - Create for Specified Program and User

You would want to use this command below. It will remember the password after you enter the password the first time it's opened.

runas /savecred /user:USER-NAME "C:\full\path\of\Program.exe"

Hope this helps,
Shawn
My System SpecsSystem Spec
17 Jan 2014   #3
JustWatching

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
.

17 Jan 2014   #4
Brink

64-bit Windows 10 Pro
 
 

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:USER-NAME "C:\Windows\System32\msra.exe"
 
pause
How to automatically run a shortcut with "RunAs" w/ credentials-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 System SpecsSystem Spec
17 Jan 2014   #5
JustWatching

Windows 7 Ultimate x64
 
 

Well that is unfortunate.
Thank you for all the help.
My System SpecsSystem Spec
17 Jan 2014   #6
Brink

64-bit Windows 10 Pro
 
 

If you like, you could still use the normal method to "Run as different user" with msra.exe, but you will still have to enter the other user's password each time. The tutorial below will help a bit by not having to press and hold Shift at least.

Run as Different User - With or Without Shift+Right Click Context Menu
My System SpecsSystem Spec
17 Jan 2014   #7
JustWatching

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
17 Jan 2014   #8
Brink

64-bit Windows 10 Pro
 
 

Ah, yeah I forgot that it didn't affect the context menu of an icon on the taskbar.
My System SpecsSystem Spec
18 Jan 2014   #9
JustWatching

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
18 Jan 2014   #10
Brink

64-bit Windows 10 Pro
 
 

I'm afraid I don't know much about PowerShell scripts.
My System SpecsSystem Spec
Reply

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How can I disable this dumb "windows security" credentials prompts?
I'm running a program that checks for broken links on domain pages, its called xenu. I can't ever get it to run to 100% because every 5 minutes Im prompted to fill in the user/pass in boxes like this---> Screenshot by Lightshot I disabled the credentials manager here--> Screenshot by...
Network & Sharing
Internet Explorer - "Remember my Credentials" option
Hi all, I'm wondering if anyone can help me with this option. The school computers go through a proxy server which requires a username and password to access. On the pop-up menu that prompts for the username and password, there's an option to remember the login credentials. On some...
Browsers & Mail
No "Remember Credentials" choice in XP Mode Setup Wizard!
Hello, I've just freshly restored the Windows 7 Ultimate Edition image from the restore DVDs for my Thinkpad. Once I had completely installed all relevant Lenovo and Microsoft updates, I set up Windows XP mode while still logged in as the administrative user, an error. There was the option to...
Virtualization
Remove "Other Credentials" button from login screen
I would like to remove the "Other Credentials" button from the login screen for aesthetic reasons (I've already removed almost everything else). I run a .reg on startup to make sure that the password dialog is always open on the login screen and not the fingerprint reader dialog; since the...
Customization
Remote Desktop "Credentials Did Not Work"
Hey Everybody, I am a Graphic Designer with a company and I am having a problem using VPN and Remote Desktop to access my work computer from home. My Fiance will be having our baby in the next couple of weeks and I need to have access to my machine while I am out of the office. I use VPN and...
Network & Sharing


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 06:17.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App