Run as Different User

Page 4 of 4 FirstFirst ... 234

  1. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #30

    "Run as" requires a password credential to work.
      My Computer


  2. Posts : 5
    windows 7
       #31

    I am trying to write a batch file. I want to run the batch file as Administrator. I know I can put "runas /userUserNameHere) CMD.exe" In the batch file but It ask me to put the Administrator password In. Is there anyway I can put the password In the batch file too? I am writing the batch file for someone else and don't want to give them the batch file.
      My Computer


  3. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #32

    Hello Bill,

    If you like, users could just right click on the .bat file, and click on "Run as administrator" to do so.

    Hope this helps some, :)
    Shawn
      My Computer


  4. Posts : 5
    windows 7
       #33

    run as Administrator


    I can't put this In a batch file? I would like to make It as easy as I can since I am making this for someone else. I know I can do "runas" but that ask for password and I don't know how to add the password to the batch file.
      My Computer


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

    How is the batch file going to be used?

    Would you be able to do what you are wanting to do in the .bat file with a .vbs script file instead? I have a method that will have the .vbs prompt with UAC to elevate using a script.

    If you have a password included in the batch, then it will only work on the computer that has the account and password you used for the batch.
      My Computer


  6. Posts : 5
    windows 7
       #35

    Brink said:
    How is the batch file going to be used?

    Would you be able to do what you are wanting to do in the .bat file with a .vbs script file instead? I have a method that will have the .vbs prompt with UAC to elevate using a script.

    If you have a password included in the batch, then it will only work on the computer that has the account and password you used for the batch.
    'I am helping my Sister-In-Law with her computer. She can't change her password from her user account. I don't want to give her the Administrator password. I was thinking of writing a batch file for her to change her account With the runas Administrator and password than make It a executable so she can just click and run It. I have the batch file writing already. She does just learning computers. This Is her first computer. I am just learning batch file and vbscipt. It should just be run on her computer not on on any other computer.
      My Computer


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

    Bill,

    This may be able to work for what you are wanting.

    Elevated Program Shortcut - Create for Standard User
      My Computer


  8. Posts : 5
    Windows 7 7000 x32
       #37

    Hi Brink
    is it possible to create a context menu option example "run with elevated permissions" where it would automatically insert my administrator user and pass.
    We all switched to standard user in my company but we in IT have domain admin accounts that we use when prompted and it would make it easier if i could automate it with a script than make a batch file for every app i need.
      My Computer


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

    Hello Zloduh,

    It's a good idea, but the only problem I see with using a context menu like that is it would be available for all users to use to "Run as administrator" with your account.
      My Computer


  10. Posts : 5
    Windows 7 7000 x32
       #39

    Yes but in my case no one uses my pc but me.
    I will have to look if it is even possible to script around this security measure.
    Thx for reply Brink its ancient topic.
      My Computer


 
Page 4 of 4 FirstFirst ... 234

  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 11:21.
Find Us