HP DesignJet T3500 System Administrator s Guide - Page 34

Shell.RegRead HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir x86

Page 34 highlights

HP DJ UPD SAG ' - hostAddress: The printer IP address ' - strParamPath: The optional path where the installation files are located function ParseCommandLine(hostAddress, strParam, local, portName) Dim oArgs, iIndex, pos set oArgs = wscript.Arguments If oArgs.Count = 0 then local = 1 exit function ElseIf oArgs.Count = 1 then if (oArgs(0) = "/?") then ShowHelp exit function ElseIf (InStrRev(oArgs(0), "\")) then local = 1 portName = oArgs(0) CheckPortName(portName) else local = 0 hostAddress = oArgs(0) end if ElseIf oArgs.Count = 2 then If (InStrRev(oArgs(0), "\")) then local = 1 portName = oArgs(0) strParam = oArgs(1) CheckPortName(portName) else local = 0 hostAddress = oArgs(0) strParam = oArgs(1) end if end if end function This function check the system bits ' Input Params: ' - N/A ' Output Parms: ' - platform: The computer platform function GetPlatform(platform) dim Shell, Is64BitOs set Shell = CreateObject("WScript.Shell") on error resume next Shell.RegRead "HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir (x86)" Is64BitOs = Err.Number = 0 on error goto 0 if Is64BitOs then platform = "x64" else platform = "x86" end if 34

  • 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

HP DJ UPD SAG
34
' - hostAddress: The printer IP address
' - strParamPath: The optional path where the installation files are located
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function ParseCommandLine(hostAddress, strParam, local, portName)
Dim oArgs, iIndex, pos
set oArgs = wscript.Arguments
If oArgs.Count = 0 then
local = 1
exit function
ElseIf oArgs.Count = 1 then
if (oArgs(0) = "/?") then
ShowHelp
exit function
ElseIf (InStrRev(oArgs(0), "\")) then
local = 1
portName = oArgs(0)
CheckPortName(portName)
else
local = 0
hostAddress = oArgs(0)
end if
ElseIf oArgs.Count = 2 then
If (InStrRev(oArgs(0), "\")) then
local = 1
portName = oArgs(0)
strParam = oArgs(1)
CheckPortName(portName)
else
local = 0
hostAddress = oArgs(0)
strParam = oArgs(1)
end if
end if
end
function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' This function check the system bits
' Input Params:
' - N/A
' Output Parms:
' - platform: The computer platform
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function GetPlatform(platform)
dim Shell, Is64BitOs
set Shell = CreateObject("WScript.Shell")
on error resume next
Shell.RegRead "HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir (x86)"
Is64BitOs = Err.Number = 0
on error goto 0
if Is64BitOs then
platform = "x64"
else
platform = "x86"
end if