jquonce Posted January 14, 2009 Share 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. Link to comment Share on other sites More sharing options...
FireFox Posted January 14, 2009 Share 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. Link to comment Share on other sites More sharing options...
jquonce Posted January 14, 2009 Author Share 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. Link to comment Share on other sites More sharing options...
jquonce Posted January 14, 2009 Author Share 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) Link to comment Share on other sites More sharing options...
azure Posted January 14, 2009 Share 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! Link to comment Share on other sites More sharing options...
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