Jump to content

Add Printer and authentication box


Drekko
 Share

Recommended Posts

hey guys

Is it possible to make a script to do the following:

Install an application

Start the application

Install a network share printer but also get a pop up box to ask the user their username and password

I made a VB script but  its using the local computer account to print instead of the domain username which i cannot get working

also i do not have any experience with AutoIT...

What are my options or can someone lend a hand

Link to comment
Share on other sites

So let me verify...you want to attempt to connect to a network printer after prompting for Domain user credentials?

Let's start with the first task: Getting user credentials. 

Really this is as simple as creating a form that accepts input which can then be passed to another function.  I realize that "as simple as" seems like a stretch for someone not familiar with the language, but once you get a little familiar you will see there are many tools available to make your job easier.  I would first suggest looking at the following functions:

_WinAPI_ShellUserAuthenticationDlg()
_WinAPI_ShellUserAuthenticationDlgEx()

They are part of the WinAPIEX UDF and present a "familiar UI" for user credential input.  Albeit, _WinAPI functions fall into the more advanced/sophisticated UDFs, but it solves having to create your own GUI, add controls and event handling. Depending on your future scripting needs, it may still worth learning about creating custom GUIs.  There are plenty of examples for that as well in the help file and included examples.

There's a starting direction for you.  After you learn about those functions and get them and how to use/pass the input you need to find a method/function to connect to the network printer and pass the entered credentials to it. 

Good luck and I look forward to seeing your progress.

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...