常用批处理
rundll32 printui.dll,PrintUIEntry /if /b "HP LaserJet P2050 Series PCL6" /f ".\HP P2055\hppcp613.inf" /r "xxx" /m "HP LaserJet P2050 Series PCL6" /z
slmgr -skms a.b.c.d
slmgr -ato
注意事项
a.b.c.d是网络内的激活服务器
cscript "c:\Program Files\Microsoft Office\Office14\ospp.vbs" /sethst:a.b.c.d
cscript "c:\Program Files\Microsoft Office\Office14\ospp.vbs" /act
cscript "c:\Program Files\Microsoft Office\Office14\ospp.vbs"
注意事项
1.a.b.c.d是网络内的kms服务器
2.ospp.vbc根据安装目录的不同有所不同,如果缺失该文件,可以从其他电脑拷过来使用
Const FILE_SHARE = 0
Const MAXIMUM_CONNECTIONS = 10
'set max connections as 10
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewShare = objWMIService.Get("Win32_Share")
errReturn = objNewShare.Create ("H:\Soft", "Soft$", FILE_SHARE, MAXIMUM_CONNECTIONS, "software sharing")
将共享名为Soft$的共享关闭
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colShares = objWMIService.ExecQuery ("Select * from Win32_Share Where Name = 'Soft$'")
For Each objShare in colShares
objShare.Delete
Next