Jump to content

Automatic Driver Install

ziogref

I am creating a webpage (internal) for my company i work at. My plan is to have the webpage display a floor plan and location of all the printers in the building (we have 11) and for the user to simply click on the desired printer and it will run some sort or script that will install the printer (and driver) from the print server, all automated.

 

as for the webpage side i can design it, the issues are with the driver install requiring admin privileges.

 

somethings to note:

I cant do this via Group Policy as i work in a smaller division of a country wide organisation.

There is a local admin account and password that is standard on the build of windows 7 computers

there script will only be used on Windows 7 64bit machines

users are domain users and DO NOT have admin rights.

I'm happy to use vbs, batch, powershell or any other native method

 

I have done hours of research and have hit dead end each time.

 

Any help would be appreciated.

 

Edit: The issue is when the driver goes to install and UAC is needed, im trying to bypass that.

Link to comment
Share on other sites

Link to post
Share on other sites

Are all the printers the same model? If so I would just roll out a mass update of print drivers overnight to eliminate a huge junk of code you'll have to spend time on. Assuming everyone's going to be printing this couldn't hurt.

Link to comment
Share on other sites

Link to post
Share on other sites

Are all the printers the same model? If so I would just roll out a mass update of print drivers overnight to eliminate a huge junk of code you'll have to spend time on. Assuming everyone's going to be printing this couldn't hurt.

Unfortunately not, we have 5 models of printers, all with there own drivers. Also we still have 32bit machines on the network, and that could cause issues, as the website is intended for 64bit users only.

Link to comment
Share on other sites

Link to post
Share on other sites

I am creating a webpage (internal) for my company i work at. My plan is to have the webpage display a floor plan and location of all the printers in the building (we have 11) and for the user to simply click on the desired printer and it will run some sort or script that will install the printer (and driver) from the print server, all automated.

 

as for the webpage side i can design it, the issues are with the driver install requiring admin privileges.

 

somethings to note:

I cant do this via Group Policy as i work in a smaller division of a country wide organisation.

There is a local admin account and password that is standard on the build of windows 7 computers

there script will only be used on Windows 7 64bit machines

users are domain users and DO NOT have admin rights.

I'm happy to use vbs, batch, powershell or any other native method

 

I have done hours of research and have hit dead end each time.

 

Any help would be appreciated.

 

Edit: The issue is when the driver goes to install and UAC is needed, im trying to bypass that.

Do you have the GPO 'Allow non-administrators to install drivers for these device setup classes' configured for users? This looks like the GPO you need, You really should have the printers configured by GPO (as then you don't need admin rights, and you can lock it down so sally doesn't bring her 25 year old dot matrix printer into the office and expect you to support it). You should also have location based printer deployment/discovery (i.e. everyone on this subnet gets printer x, y and z, but if your on the hobart manufacturing subnet you get the printer in the warehouse only).

 

It sounds like you don't have access to these things, so put a request in for this sort of thing. While you wait, use Powershell and/or Psexec to remote into each computer as the local administrator account and push all the printers to all the systems.

 

I'd also recommend staying away from this website idea, you will be forced to support it for the rest of your time at that organisation, and when you leave it'll be horrible for your replacement to support (as he didn't dev it). Seriously just get your enterprise/domain admins to develop a proper printer deployment (and by the sounds of it a SOE).

Link to comment
Share on other sites

Link to post
Share on other sites

Do you have the GPO 'Allow non-administrators to install drivers for these device setup classes' configured for users? This looks like the GPO you need, You really should have the printers configured by GPO (as then you don't need admin rights, and you can lock it down so sally doesn't bring her 25 year old dot matrix printer into the office and expect you to support it). You should also have location based printer deployment/discovery (i.e. everyone on this subnet gets printer x, y and z, but if your on the hobart manufacturing subnet you get the printer in the warehouse only).

 

It sounds like you don't have access to these things, so put a request in for this sort of thing. While you wait, use Powershell and/or Psexec to remote into each computer as the local administrator account and push all the printers to all the systems.

 

I'd also recommend staying away from this website idea, you will be forced to support it for the rest of your time at that organisation, and when you leave it'll be horrible for your replacement to support (as he didn't dev it). Seriously just get your enterprise/domain admins to develop a proper printer deployment (and by the sounds of it a SOE).

The reason why im doing the way im doing it is a temp solution (for a year or 2) for reasons i cant say online (due to company policy), any ideas how it can be done or do i need to push the drivers to each machine manually?

Link to comment
Share on other sites

Link to post
Share on other sites

The reason why im doing the way im doing it is a temp solution (for a year or 2) for reasons i cant say online (due to company policy), any ideas how it can be done or do i need to push the drivers to each machine manually?

I am assuming the files are msi files?

 

using powershell or a batchscript (and pstool's psexec) push the driver to the targetcomputer\C:\Drivers\, then run msiexec.exe with the silent install options for each driver.

 

Then wrap in a foreach loop, and feed the loop a list of computers to install to.

 

If you are a domain admin, i'd run it from that, as i'd assume the local admin password is different on each computer, yes?

foreach ($_ in $computers) {    #Copy drivers    Copy-Item -Path \\FileServer01\DeploymentShare\Drivers\Printers\*.*  -Destination \\$_\c$\Drivers\Printers\ -Recurse    #invoke command    Invoke-Command -ComputerName $_ -Credential $cred -ScriptBlock {        (Start-Process -FilePath "msiexec.exe" -args "\\$_\c$\Drivers\Printers\printer1.msi /q /whatever")    }}

or something like that. heck if I was in your shoes i'd maintain one script to maintain printer drivers on all client systems (i.e. delete old ones, move new ones out, etc) and another to install them automatically, and a final script that would ask for the printer you wan to install and then prompt for a host name, (i.e. if one of the helpdesk people get called about a printer not working, it's 95% the driver needs re-installing, just get them to run the script and then ask for the printer model and finally the hostname of the computer).

Link to comment
Share on other sites

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

×