Jump to content

Printer Software


miller75

Recommended Posts


any other options?

why do ya need em?

Maybe OSes have already been deployed and he'd like to deploy a package with the printer's driver WITHOUT having to reinstall Windows everywhere. Can nLite do this ? No. Then, no need to be rude... :)

Miller, have a package copy files around the printer driver's .INF in a temp directory.

Then, call a VBS custom action to do something similar to this :

dim WshShell, KYOCERA, PPath, PUser, PPass
set WshShell = CreateObject("Wscript.Shell")

KYOCERA = Split(Session.Property("CustomActionData"), ";")(0)
PPath = Split(Session.Property("CustomActionData"), ";")(1)
PUser = Split(Session.Property("CustomActionData"), ";")(2)
PPass = Split(Session.Property("CustomActionData"), ";")(3)

'Install the drivers.
'
CMD = "rundll32 printui.dll,PrintUIEntry /ia /m " & chr(34) & "Kyocera Mita FS-1900" & chr(34) & " /h " & chr(34) & "Kyocera" & chr(34) & " /f " & chr(34) & KYOCERA & "oemsetup.inf" & chr(34)

'Dont keep the (of course non-keypath) source files installed
'by the package in a temp directory.
'
CMD = CMD & " & rd /S/Q " & chr(34) & KYOCERA & chr(34)

'Connect to the printer.
'
CMD = CMD & " & net use " & PPath & " /user:" & PUser & " " & PPass

'Install it locally.
'
CMD = CMD & " & rundll32 printui.dll,PrintUIEntry /ga /n" & PPath & " /j" & chr(34) & "LanMan Print Services" & chr(34)
CMD = CMD & " & net stop " & chr(34) & "print spooler" & chr(34)
CMD = CMD & " & net start " & chr(34) & "print spooler" & chr(34)
CMD = CMD & " & sleep 5"

'Open the Spool, so to open the printer queue.
'
CMD = CMD & " & rundll32 printui.dll,PrintUIEntry /o /n" & PPath
CMD = CMD & " & sleep 15"

'Close the printer queue window.
'
CMD = CMD & " & taskkill /F /im rundll32.exe"

'Uninstall the locally-installed printer --drivers and rights
'to reinstall, this printer as others using the same drivers,
'will remain for all the users of the station.
'
CMD = CMD & " & rundll32 printui.dll,PrintUIEntry /gd /n" & PPath
CMD = CMD & " & net stop " & chr(34) & "print spooler" & chr(34)
CMD = CMD & " & net start " & chr(34) & "print spooler" & chr(34)

'Remove the net mapping.
'
CMD = CMD & " & net use " & PPath & " /d"

'Background task to kill the printer queue window, whatever happens.
'
WshShell.run "cmd.exe /c sleep 60 & taskkill /F /IM rundll32.exe", 2, False
WshShell.run "cmd.exe /c sleep 600 & taskkill /F /IM rundll32.exe", 2, False

'Launch the commands, in the right order.
'
WshShell.run "cmd.exe /c " & CMD, 2, True

set WshShell = Nothing

As you can see, in the case of this driver, there was a need to REALLY install an existing printer. I did so, and wrote code to uninstall the printer afterwards. The drivers remain on the system; this works.

Regards,

Natan

http://winner.windowsdream.com -- Windows Is Not Necessary for Everyone's RIS

http://dvdgen.windowsdream.com -- Burn your own complete and unattended Windows installer on a DVD

http://updater.windowsdream.com -- Auto-update your PC with freeware/opensource

http://ping.windowsdream.com -- Partimage Is Not Ghost

http://www.windowsdream.com -- Corporate homepage.

Link to comment
Share on other sites

It would be better in this instance to run a script to map them off a print server much simpler.

Jim

If only drivers didn't have to be installed, or if only our users were all admins... printers are a real problem here in my company. I'd be interested in any working solution enabling standard users (no admin, no power user) to install any new printer on their XP computers, even if drivers have to be installed.

Have found no other working solution so far.

Regards

Natan

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...