Jump to content

Need runas printer script, please?


jquonce
 Share

Recommended Posts

I was wondering if someone could right a script real fast that could hard coated user and password and would runas add printer wizard...

So basically I am trying to get a script that all they would have to do is hit the exe to start the printer wizard.

Kinda like this script but I only need the add local printer:

http://www.autoitscript.com/forum/index.ph...d+local+printer

Thanks in advance for your help.

Link to comment
Share on other sites

I was wondering if someone could right a script real fast that could hard coated user and password and would runas add printer wizard...

So basically I am trying to get a script that all they would have to do is hit the exe to start the printer wizard.

Kinda like this script but I only need the add local printer:

http://www.autoitscript.com/forum/index.ph...d+local+printer

Thanks in advance for your help.

:lmao: learn autoit before asking us to do the script for you... :)

Cheers, FireFox.

Link to comment
Share on other sites

For any one looking for the same thing here it is:

Global $adminuser, $adminpass, $admindomain

;===========================================

;Hard code the user and password put it here.

;===========================================

$adminuser = ""

$adminpass = ""

$admindomain = ""

Func _RunAsAdmin($cmd)

RunAs($adminuser, $admindomain, $adminpass, 1, $cmd)

EndFunc;==>_RunAsAdmin

$var = "rundll32 printui.dll,PrintUIEntry /il"

_RunAsAdmin($var)

Link to comment
Share on other sites

For any one looking for the same thing here it is:

Global $adminuser, $adminpass, $admindomain

;===========================================

;Hard code the user and password put it here.

;===========================================

$adminuser = ""

$adminpass = ""

$admindomain = ""

Func _RunAsAdmin($cmd)

RunAs($adminuser, $admindomain, $adminpass, 1, $cmd)

EndFunc;==>_RunAsAdmin

$var = "rundll32 printui.dll,PrintUIEntry /il"

_RunAsAdmin($var)

Just for future reference.. try to paste code on the forums within [ autoit ] tags. Much easier to read. Welcome to AutoIT! :)
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...