Jump to content

RunAs command without asking for password


dufran3
 Share

Recommended Posts

I am trying to run this command

_RunDOS('runas /user:username@domain "C:\WINDOWS\IsUninst.exe -fC:\McKessonHBOC\Uninst.isu -a"')

I can manually go into command prompt and type the command in, of course using my actual username and domain. However it always asks for a password. Is there anyway to get around this? I am running this on several users computers automatically, and would like the command to run in the background without them having to type in the password. Since I don't want them to know it. Anyone know?

Edited by dufran3
Link to comment
Share on other sites

  • Developers

why not do:

RunAsSet(username,Domain,Password)
Run("C:\WINDOWS\IsUninst.exe -fC:\McKessonHBOC\Uninst.isu -a")

;)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Run("c:\.......

or is it

RunAs("c:\......

I will pretend you didn't ask and opened the Helpfile yourself to check if i made a typo or not ...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Your right...I didn't open the help file before asking that. However just by looking at it...I wasn't sure if the Run Command would run everything silently and with the parameters I want...that is why I asked, at first glance I also didn't see the command executed the runas...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...