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


25 Oct 2011   #9
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

How to Create an Elevated Program Shortcut Any User is able to Run in Vista, Windows 7, and Windows 8

...


My System SpecsSystem Spec
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 8.1 Enterprise
 
 

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 8.1 Enterprise
 
 

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 8.1 Enterprise
 
 

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 8.1 Enterprise
 
 

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




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 09:50 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33