jquonce Posted January 14, 2009 Posted January 14, 2009 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+printerThanks in advance for your help.
FireFox Posted January 14, 2009 Posted January 14, 2009 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+printerThanks in advance for your help. learn autoit before asking us to do the script for you... Cheers, FireFox.
jquonce Posted January 14, 2009 Author Posted January 14, 2009 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.
jquonce Posted January 14, 2009 Author Posted January 14, 2009 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)
azure Posted January 14, 2009 Posted January 14, 2009 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now