DIM a
dim strip,strno
dim strprname,strDriverName
dim WshNetwork,strComputer
dim objWMIService,objPrinter
dim strPORTNAME
a = msgbox ("安裝與否",1,"印表機安裝")
'msgbox a
if a = 2 then wscript.quit
'Canon iR2200-3300 PCL6
'***********************************************************************
' print server IP PORT
'***********************************************************************
strip = "192.168.1.100" 'PRINTSERVER IP
strno = ""
strprname = "Canon2200"
strDriverName = "Canon iR2200-3300 PCL6"
'**************************************************************************
' dOS
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
strOS = objOperatingSystem.Caption
Next
'dO_ LPT1
IF strPORTNAME <> "Lpt1:" or strPORTNAME <> "Lpt2:" then
Call insprot
END IF
'**************************************************************************
'Installing a Printer
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_
objPrinter.DriverName = strDriverName
objPrinter.PortName = strPORTNAME
objPrinter.DeviceID = strprname & "_" & strip
objPrinter.Network = True
objPrinter.Put_
'*******************************************************************************
'wLPORT (insprot)
sub insprot
'Installing Printer Ports
strComputer = "."
strPORTNAME = strprname
Set objWMIService = GetObject("winmgmts:")
Set objNewPort = objWMIService.Get("Win32_TCPIPPrinterPort").SpawnInstance_
objNewPort.Name = strPORTNAME
objNewPort.Protocol = 1
objNewPort.Queue = strpid
objNewPort.HostAddress = strip
objNewPort.SNMPEnabled = False
objNewPort.Put_
end sub
'*******************************************************************************
'end
'*******************************************************************************
2007年11月28日 星期三
訂閱:
張貼留言 (Atom)
RHEL install EPEL
https://www.linuxtechi.com/install-epel-repo-on-rhel-system/ EPEL dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest...
-
下載 出處 下載網址: http://tinyurl.com/plodb56 Step 1 下載取得「Windows10TweakTool」並解壓縮,在壓縮出的「Windows10SettingTool.bat」上按一下滑鼠右鍵,點擊選單中的【以系統管理員身分...
-
作者:gamepool 本人是一個乒乓的愛好者,打球多年,技藝平平,不足掛齒,但仍然痴迷此道。 買XO有相當一部分原因是因為有《乒乓球》這款遊戲。這也是我在XO上通的第一款game。在過去一個月裡,經過日夜奮戰,live排名從15000名已升至5000名左右。在LIVE上能見到中...
-
最後那個結局,簡直妙呆了! 有個男人已經超厭煩他每天都要去公司上班,但他老婆卻可以成天待在家裡 於是,他向上帝禱告說 :「親愛的主,我每天上班投入八個鐘頭的時間, 但我的老婆只待在家裡,閒閒沒事做而已,我希望讓她知道我過的是怎麼樣的日子, 所以請讓我們的身體交換 ! 」上帝以祂無...
沒有留言:
張貼留言