Advertisement

07.20.2008 at 09:59AM PDT, ID: 23580245 | Points: 500
[x]
Attachment Details

Install MFD printer VBscript

Asked by rowfei in Drivers, Printers & Scanners, VB Script

I am using the following vbs codes to install our MFD printer. But now the codes won't works and I get a error message "Line: 56; Chart: 2; Error: The system cannot find the file specified. Code: 80070002." I have make sure the driver name & location are correct.

Please help.

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
PathToDLL = "\\whateverserver\whateverpath\PRNADMIN.DLL"
portloc = "1.1.1.1"
DriverName = "HP LaserJet IIISi"
PrintQueueName = "Printer Number 1"
 
 
 
 
set wshshell = wscript.createobject("wscript.shell")
set fso = createobject("scripting.filesystemobject")
 
fso.copyfile PathToDLL, "c:\Program Files\PRNADMIN.DLL", True
wshshell.run "regsvr32 /s ""c:\Program Files\PRNADMIN.DLL""", , True
wscript.sleep 1000
 
      dim oPort
      dim oMaster
      set oPort = CreateObject("Port.Port.1")
      set oMaster = CreateObject("PrintMaster.PrintMaster.1")
 
 
         portinput = "IP_" & portloc
      oPort.ServerName = ""
 
        sPortExist = False
      for each oPort in oMaster.Ports("")
        if oPort.PortName = portinput then
            sPortExist = True
          End If
      next
 
  If sPortExist = False then
        
      set oPort = CreateObject("Port.Port.1")
      oPort.PortName   = portinput
      oPort.PortType = 1
      oPort.HostAddress = portloc
      oPort.PortNumber = 9100
      oPort.SNMP = false
      oMaster.PortAdd oPort
      if Err <> 0 then
        msgbox "an error occurred"
      end if
 
  End If
 
 
      dim oPrinter
      set oPrinter = CreateObject("Printer.Printer.1")
      oPrinter.ServerName  = ""
        oPrinter.DriverPath  = "C:\Printer\Driver\Ricoh MP7000"
      oPrinter.InfFile     = "C:\Printer\Driver\Ricoh MP7000\RC67E12K.inf" 
      oPrinter.PrinterName = PrintQueueName 
      oPrinter.DriverName  = DriverName
      oPrinter.PortName    = portinput
      oMaster.PrinterAdd oPrinter
      if Err <> 0 then
         msgbox "an error occurred"
 
 
    set oport = nothing
    set oPrinter = nothing
    set oMaster = nothing
    set wshshell = nothing
    set fso = nothing
[+][-]07.22.2008 at 02:06AM PDT, ID: 22057386

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 09:56AM PDT, ID: 22061324

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 12:24PM PDT, ID: 22062721

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 01:25PM PDT, ID: 22063289

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 01:46PM PDT, ID: 22063507

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 01:48PM PDT, ID: 22063529

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 02:16PM PDT, ID: 22063763

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 03:00PM PDT, ID: 22064121

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 03:25PM PDT, ID: 22064269

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 03:30PM PDT, ID: 22064308

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 03:41PM PDT, ID: 22064359

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 04:30PM PDT, ID: 22064638

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 04:31PM PDT, ID: 22064648

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 04:41PM PDT, ID: 22064704

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 04:47PM PDT, ID: 22064742

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 04:48PM PDT, ID: 22064745

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 04:50PM PDT, ID: 22064758

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 05:14AM PDT, ID: 22078188

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 05:19AM PDT, ID: 22078230

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 02:58PM PDT, ID: 22083974

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 03:03PM PDT, ID: 22084016

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 03:56PM PDT, ID: 22084426

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 04:40PM PDT, ID: 22084750

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 05:03PM PDT, ID: 22084888

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.25.2008 at 08:44AM PDT, ID: 22089596

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.25.2008 at 08:48AM PDT, ID: 22089642

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.27.2008 at 04:33AM PDT, ID: 22098054

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628