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: Elevated Program Shortcut - Create for Standard User

09 Nov 2011   #10
patronanejo

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by JerometheGiraff View Post
Quote:
Windows will often give you a clue when things go awry--you just have to keep the CLI open. Try creating a batch file that looks like:

runas /user:ComputerName\AdministratorAccountName /savecred "Full path to program's exe file"

pause
Here is the results from the batch file.

Quote:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\<AccountName>>C:\Users\<AccountName>\Desktop\programadmin.bat

C:\Users\<AccountName>>C:\Windows\System32\runas.exe /user: <AccountName>-PC\<account name>
er_Admin /savecred "C:\SpaceSn
RUNAS USAGE:

RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ]
/user:<UserName> program

RUNAS [ [/noprofile | /profile] [/env] [/savecred] ]
/smartcard [/user:<UserName>] program

RUNAS /trustlevel:<TrustLevel> program

...

/savecred to use credentials previously saved by the user.
This option is not available on Windows 7 Home or Windows 7
Starter Editions
and will be ignored.


...


Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

NOTE: Enter user's password only when prompted.
NOTE: /profile is not compatible with /netonly.
NOTE: /savecred is not compatible with /smartcard.

C:\Users\<AccountName>>
Since you're familiar with the command line, enter

dism/online /get-currentedition

to find out which edition of Windows 7 you have installed--Version 6.1.7601 reveals only that your OS is Windows 7.

Quote   Quote: Originally Posted by Brink View Post
Doing what Patronanejo posted above will allow the command prompt to stay open to see what if any error message that you are getting to help ID what the problem may be.
As the system has indicated, you may be using -Starter or -Home editions...in which case you will want to open your Start menu, right-click on Computer, and select Properties.


My System SpecsSystem Spec
09 Nov 2011   #11
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Nice catch Patronanejo. That's got to be the issue.
My System SpecsSystem Spec
09 Nov 2011   #12
patronanejo

Windows 7 Ultimate x64
 
 
Aww, shucks...

Quote   Quote: Originally Posted by Brink View Post
Nice catch Patronanejo. That's got to be the issue.
Thank you! Windows did all the work, though.

I guess programmers expect their error messages to be directed to a debug log--the whole world might run a little smoother if those windows were allowed to stay open.
My System SpecsSystem Spec
10 Nov 2011   #13
JerometheGiraff

Windows 8.1 Pro
 
 

The command prompt asks me for the password which I supply, then I get this error and the program doesn't run ?

Quote:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\<folder>>C:\Users\<folder>\Desktop\Book.bat

C:\Users\<folder>runas.exe /user:<folder>-PC\<folder> /savecred "C:\Space
Sniffer\SpaceSniffer.exe"
Attempting to start C:\Space\SpaceS.exe as user "<folder>-PC\<accountname>" ...
Enter the password for <folder>-PC\<folder>:
Attempting to start C:\Space\SpaceS.exe as user "<folder>-PC\<accountname>" ...
RUNAS ERROR: Unable to run - C:\Space\SpaceS.exe
-2147467259: Unspecified error

C:\Users\<folder>>
My System SpecsSystem Spec
.


10 Nov 2011   #14
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Jerome,

What edition of Windows 7 do you have?

If running from a standard user account, are you able to run the SpaceS.exe file normally by double clicking on it and providing the administrator's password in the UAC prompt?
My System SpecsSystem Spec
10 Nov 2011   #15
JerometheGiraff

Windows 8.1 Pro
 
 

Quote:
What edition of Windows 7 do you have?
Windows7 Home Premium.

Quote:
If running from a standard user account, are you able to run the SpaceS.exe file normally by double clicking on it and providing the administrator's password in the UAC prompt?
Yes.
My System SpecsSystem Spec
10 Nov 2011   #16
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Jerome,

I downloaded SpaceSniffer to test this on my system to see what may be wrong. I see that SpaceSniffer does not "Run as administrator" (elevated) by default when you run it, so a standard user should be able to run SpaceSniffer without having to use this tutorial to do so.

If you manually set the SpaceSniffer.exe file to Run this program as an administrator in compatibility mode, then that would be why you are getting this error. You would need to uncheck the Run this program as an administrator box so that the standard user will be able to run it without using this tutorial instead.

This is why you are having this issue since it's not natively running elevated, and you manually set it to.

Hope this sorts it for you.
My System SpecsSystem Spec
10 Nov 2011   #17
Capt.Jack Sparrow

Windows 7 Ultimate - 64-bit | Windows 8 Pro - 64-bit
 
 

Great Tutorial ... It will be really helpful Thanks Shawn
My System SpecsSystem Spec
10 Nov 2011   #18
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Thank you Shyam.
My System SpecsSystem Spec
11 Nov 2011   #19
JerometheGiraff

Windows 8.1 Pro
 
 

Quote:
Jerome,

I downloaded SpaceSniffer to test this on my system to see what may be wrong. I see that SpaceSniffer does not "Run as administrator" (elevated) by default when you run it, so a standard user should be able to run SpaceSniffer without having to use this tutorial to do so.

If you manually set the SpaceSniffer.exe file to Run this program as an administrator in compatibility mode, then that would be why you are getting this error. You would need to uncheck the Run this program as an administrator box so that the standard user will be able to run it without using this tutorial instead.

This is why you are having this issue since it's not natively running elevated, and you manually set it to.

Hope this sorts it for you.
SpaceSniffer requires Administrator account when you are sniffing the drives otherwise a series of errors come up. You can run it as is in Standard but when you are sniffing the drives you need Admin access.
My System SpecsSystem Spec
Comment

 Elevated Program Shortcut - Create for Standard User




Tutorial Tools





Similar help and support threads
Windows 7 Tutorial Category
Elevated Program Shortcut without UAC Prompt - Create
How to Create an Elevated Program Shortcut without a UAC Prompt in Windows This will show you how to create an elevated "Run as administrator" shortcut of any installed program using Task Scheduler so that it will not give you a UAC prompt for permission when you start it while still having...
Tutorials
Standard user requires admin PW when using elevated command
I have a file to clear the print spooler when it has an error. I based this file on Brinks tutorial. Thanks Brink. I placed this file in C:\windows\system32 folder so all users would have access. The file must be run in a elevated cmd window. I then created a shortcut to the file and put the...
General Discussion
Creating an Elevated Program Shortcut for Search Everything Program.
I`ve done this successfully for SpeedFan, but I`m having a problem with doing the same for the Search Everything program. I`ve been through the tutorial steps several times now, the task executes successfully,( I checked it with command prompt box) but nothing happens. /c start "SpeedFan"...
Software
Task Manager - Create Elevated Shortcut
How to Create an Elevated Task Manager Shortcut in Windows 7 This will show you how to create a elevated Task Manager shortcut that will "run as an administrator" in Windows 7 when opened. It will open as if you clicked Show processes from all users in the default Task Manager. You will...
Tutorials
Run as Different User Shortcut - Create for Specified Program and User
How to Create a Shortcut to Run a Program as a Specified User This will show you how to create a Run as different user shortcut that will run a program specified by you as a specified user on the Windows 7 and Vista computer. The user account that you want to run the program as must be...
Tutorials
Question on "How to Create a Elevated Program Shortcut ..."
The solution (Shawn) in the thread How to Create a Elevated Program Shortcut without a UAC Prompt (http://www.sevenforums.com/tutorials/11949-elevated-program-shortcut-without-uac-prompt-create.html) ends with 24. When you run this new elevated shortcut, you will now no longer have...
System Security

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 14:28.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App