Jump to content

Recommended Posts

Posted

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.

Posted

I just found out about this great program. I plan on learning it but was just wondering if someone already had a script or could give some pointers for it. If not then I will probably figure it out.

Posted

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)

Posted

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! :)

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
×
×
  • Create New...