Jump to content
Sign in to follow this  
jquonce

Need runas printer script, please?

Recommended Posts

jquonce

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.

Share this post


Link to post
Share on other sites
FireFox

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.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
jquonce

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.

Share this post


Link to post
Share on other sites
jquonce

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)

Share this post


Link to post
Share on other sites
azure

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

Share this post


Link to post
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
Sign in to follow this  

×