Windows 10: Sending password from a script for runAs command

Discus and support Sending password from a script for runAs command in AntiVirus, Firewalls and System Security to solve the problem; Hello, Currently working on a code to stop and start a windows services with administrator credentials from a java programming language. Was... Discussion in 'AntiVirus, Firewalls and System Security' started by Subrahmanyam Venkataraman, Feb 19, 2019.

  1. Sending password from a script for runAs command


    Hello,


    Currently working on a code to stop and start a windows services with administrator credentials from a java programming language.

    Was researching on runAs command but couldn't pass send password either through piping the command or by reading the password through a file.


    Is there a possibility to send the password for runAs from java programming language.


    Thanks!

    :)
     
    Subrahmanyam Venkataraman, Feb 19, 2019
    #1
  2. Borad Win User

    runas command won't recognize administrator password


    I tried the runas command to configure some software I just updated, as the directions said, but my administrator password was rejected. Then I tested the runas command on a pdf file that I know for sure is in the current directory (it can open from the command line), but my administrator password is still rejected.

    Settings > Accounts says:

    Seka
    Local Account
    Administrator

    And I'm able to confirm my current password and change it (I change it to the same password). But here's the problem:
    C:\Users\Seka\Desktop>runas /u:administrator Lightworks_v12.5.0_User_Guide.pdf
    Enter the password for administrator:
    Attempting to start Lightworks_v12.5.0_User_Guide.pdf as user "SEKA-PC\administrator" ...
    RUNAS ERROR: Unable to run - Lightworks_v12.5.0_User_Guide.pdf
    1326: The user name or password is incorrect.
    C:\Users\Seka\Desktop>

    Any tips? Ways to confirm my password works or that I'm the administrator or anything? It's too late for me to go back to Windows 7.

    EDIT: I was surprised with a log on screen when I turned my computer on this morning. I had to enter my password. It worked though.
     
    Borad, Feb 19, 2019
    #2
  3. runas command for username with spaces

    Hi,

    Thank you for posting your query in Microsoft Community.

    I understand the issue that you are currently facing, we will try the best we can to resolve your issue.

    Since this command may run under both elevated and non-elevated privileges. I would suggest you do a SFC Scan and see if everything is working properly in your system.

    Follow the steps to run the System File Checker

    • On the Search bar type “cmd” and click ctrl + shift + Enter to open the Elevated Command Prompt. (If prompted for a password, type the password and click Allow)
    • Type “sfc /scannow” and hit Enter.
    • Exit Command Prompt.
    For more information about SFC Scan click on the link below:

    https://support.microsoft.com/en-us/kb/929833

    Hope the information helps. Please let us know if the issue persist and we will be happy to assist you further.
     
    Nachappa C K, Feb 19, 2019
    #3
  4. Sending password from a script for runAs command

    Logon script to install software to run w/o admin priviledges

    I'm trying to get a script to work from Group policy to install a photo editing software from google called picasa.

    My script currnetly looks like:

    IF EXIST C:\picasainstalled-dont-delete.txt exit ELSE start \\timothyclass\Data\picasa35-setup.exe /S /L

    echo.>C:\picasainstalled-dont-delete.txt


    and a parameter when placed in group policy of: runas /user:student.timothy.com\Administrator

    Although im guessing it wants the password and doesnt prompt for it *Frown Sending password from a script for runAs command :(.

    Any suggestions on how i can do this?
     
    Hybrid_theory, Feb 19, 2019
    #4
Thema:

Sending password from a script for runAs command

Loading...
  1. Sending password from a script for runAs command - Similar Threads - Sending password script

  2. Runas File Explorer

    in Windows 10 Ask Insider
    Runas File Explorer: Hello All, Is there a way to open file explorer as another user in windows 10? Thanks, submitted by /u/aspiretoinspire7 [link] [comments] https://www.reddit.com/r/Windows10/comments/hnj0zs/runas_file_explorer/
  3. Unable to start CMD from command line using switch -verb runas

    in AntiVirus, Firewalls and System Security
    Unable to start CMD from command line using switch -verb runas: I was able to start cmd as administrator from cmd/powershell using the following command: start cmd -verb runas I am no longer do so. The command fires up a new cmd window but without admin privelege. I am not aware which update or changes blocked this functionality....
  4. Unable to find "runas" and other commands!

    in Windows 10 Installation and Upgrade
    Unable to find "runas" and other commands!: Windows 10 - I think my system variable path is messed up! because I'm not able to run any commands such as powershell or runas from the command prompt after booting to a bootable disk and going to command prompt for troubleshooting. Error - Runas or Powershell is not...
  5. Runas as administrator without plain password

    in AntiVirus, Firewalls and System Security
    Runas as administrator without plain password: Hello Everyone, I would like to run "psexec.exe" or "runas.exe" without entering password in command line. Meaning is to call password via text file or redirect the password like what psexec -u .\administrator calc.exe -accepteula -nobanner < password.txt...
  6. How to use RunAs without password prompt?

    in Windows 10 Support
    How to use RunAs without password prompt?: Hi! I tried to use RunAs to start and program as admin. After entering this command: RunAs.exe /user:Administrator "regedit.exe" it shows prompt to enter password. Is possible to override password prompt by any way? Or enter password in command? Thank you for help. Miro...
  7. RunAs Taskbar

    in Windows 10 Software and Apps
    RunAs Taskbar: Hello! I wrote my first tool and i would like to present it here. short description: RunAs Taskbar is a free windows software to make your admin-tools easier to organize! If you run RunAs Taskbar as Administrator you will have all programs you are created in a tool...
  8. Script or command to update time

    in Windows 10 Support
    Script or command to update time: I would like to update the time once a day by way of the Task Scheduler. Is there a command to do this? 24135
  9. runas command won't recognize administrator password

    in Windows 10 Support
    runas command won't recognize administrator password: I tried the runas command to configure some software I just updated, as the directions said, but my administrator password was rejected. Then I tested the runas command on a pdf file that I know for sure is in the current directory (it can open from the command line), but my...
  10. Unregistering shell DLL's from command script

    in Windows 10 Support
    Unregistering shell DLL's from command script: Is it possible to unregister shell extension DLL's from a command script? Whenever I run "rundll32 /u path\to\whatever.dll" command lines from a script, I always get the error: The module "path\to\whatever.dll" was loaded but the call to DllUnregisterServer failed with...