Elevated Program Shortcut - Create for Standard User

Page 2 of 22 FirstFirst 123412 ... LastLast

  1. Posts : 5
    Windows 7 Ultimate x64
       #10

    JerometheGiraff said:
    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.

    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.

    Brink said:
    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 Computer


  2. Posts : 72,052
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #11

    Nice catch Patronanejo. That's got to be the issue. :)
      My Computer


  3. Posts : 5
    Windows 7 Ultimate x64
       #12

    Aww, shucks...


    Brink said:
    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 Computer


  4. Posts : 925
    Windows 10 Pro
       #13

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

    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 Computer


  5. Posts : 72,052
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #14

    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 Computer


  6. Posts : 925
    Windows 10 Pro
       #15

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

    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 Computer


  7. Posts : 72,052
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #16

    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 Computer


  8. Posts : 4,772
    Windows 7 Ultimate - 64-bit | Windows 8 Pro - 64-bit
       #17

    Great Tutorial ... It will be really helpful :) Thanks Shawn
      My Computer


  9. Posts : 72,052
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #18

    Thank you Shyam. :)
      My Computer


  10. Posts : 925
    Windows 10 Pro
       #19

    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 Computer


 
Page 2 of 22 FirstFirst 123412 ... LastLast

  Related Discussions
Our Sites
Site Links
About 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 22:17.
Find Us