主题:求把我这段VB脚本翻译成其他编程语言
求高手把我这段VB脚本程序翻译成其他编程语言,VB,VC,C#什么的都行。主要是为了把这个脚本内容做成控件。不胜感激。
本人QQ 22731153,希望详谈,敬请赐教!有报酬的哦~~
Dim WSUSREG
Set WSUSREG=WScript.CreateObject("WScript.Shell")
RegPath="HKLM\Software\Policies\Microsoft\windows\windowsupdate\"
name1="WUServer"
name2="WUStatusServer"
name3="TargetGroup"
name4="TargetGroupEnabled"
name5="ElevateNonAdmins"
type1="REG_SZ"
type2="REG_DWORD"
MsgBox("Microsoft Update 服务安装过程开始...")
WSUSREG.Run("Net Stop wuauserv")
WScript.Sleep 100
WSUSREG.RegWrite RegPath,Default
WSUSREG.RegWrite RegPath&name1,"http://10.252.0.27","REG_SZ" 'WSUS服务器ip地址
WSUSREG.RegWrite RegPath&name2,"http://10.252.0.27","REG_SZ" 'WSUS 建立的组名
WSUSREG.RegWrite RegPath&name3,"workgroup","REG_SZ"
WSUSREG.RegWrite RegPath&name4,"1","REG_DWORD" '1允许客户端自动加入到组,0 不允许
WSUSREG.RegWrite RegPath&name5,"0","REG_DWORD"
'MsgBox("Success!")
Dim AU
Set AU=WScript.CreateObject("WScript.Shell")
RegPath="HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\"
keyname1="NoAutoUpdate"
keyname2="AUOptions"
keyname3="ScheduledInstallDay"
keyname4="ScheduledInstallTime"
keyname5="NoAutoRebootWithLoggedOnUsers"
keyname6="AutoInstallMinorUpdates"
keyname7="RebootRelaunchTimeoutEnabled"
keyname8="RebootRelaunchTimeout"
keyname9="RescheduleWaitTimeEnabled"
keyname10="RescheduleWaitTime"
keyname11="DetectionFrequencyEnabled"
keyname12="RebootWarningTimeoutEnabled"
keyname13="RebootWarningTimeout"
keyname14="UseWUServer"
keyname15="NoAUShutdownOption"
keyname16="NoAUAsDefaultShutdownOption"
keytype="REG_DWORD"
AU.RegWrite RegPath,Default
AU.RegWrite RegPath&keyname1,"0",keytype
AU.RegWrite RegPath&keyname2,"4",keytype
AU.RegWrite RegPath&keyname3,"0",keytype
AU.RegWrite RegPath&keyname4,"18",keytype
AU.RegWrite RegPath&keyname5,"1",keytype
AU.RegWrite RegPath&keyname6,"1",keytype
AU.RegWrite RegPath&keyname7,"1",keytype
AU.RegWrite RegPath&keyname8,"60",keytype
AU.RegWrite RegPath&keyname9,"1",keytype
AU.RegWrite RegPath&keyname10,"16",keytype
AU.RegWrite RegPath&keyname11,"1",keytype
AU.RegWrite RegPath&keyname12,"1",keytype
AU.RegWrite RegPath&keyname13,"30",keytype
AU.RegWrite RegPath&keyname14,"1",keytype
AU.RegWrite RegPath&keyname15,"0",keytype
AU.RegWrite RegPath&keyname16,"0",keytype
WSUSREG.Run("Net Start wuauserv")
WScript.Sleep 100
WSUSREG.Run("wuauclt /detectnow")
MsgBox("Microsoft Update 服务已安装成功!")
本人QQ 22731153,希望详谈,敬请赐教!有报酬的哦~~
Dim WSUSREG
Set WSUSREG=WScript.CreateObject("WScript.Shell")
RegPath="HKLM\Software\Policies\Microsoft\windows\windowsupdate\"
name1="WUServer"
name2="WUStatusServer"
name3="TargetGroup"
name4="TargetGroupEnabled"
name5="ElevateNonAdmins"
type1="REG_SZ"
type2="REG_DWORD"
MsgBox("Microsoft Update 服务安装过程开始...")
WSUSREG.Run("Net Stop wuauserv")
WScript.Sleep 100
WSUSREG.RegWrite RegPath,Default
WSUSREG.RegWrite RegPath&name1,"http://10.252.0.27","REG_SZ" 'WSUS服务器ip地址
WSUSREG.RegWrite RegPath&name2,"http://10.252.0.27","REG_SZ" 'WSUS 建立的组名
WSUSREG.RegWrite RegPath&name3,"workgroup","REG_SZ"
WSUSREG.RegWrite RegPath&name4,"1","REG_DWORD" '1允许客户端自动加入到组,0 不允许
WSUSREG.RegWrite RegPath&name5,"0","REG_DWORD"
'MsgBox("Success!")
Dim AU
Set AU=WScript.CreateObject("WScript.Shell")
RegPath="HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\"
keyname1="NoAutoUpdate"
keyname2="AUOptions"
keyname3="ScheduledInstallDay"
keyname4="ScheduledInstallTime"
keyname5="NoAutoRebootWithLoggedOnUsers"
keyname6="AutoInstallMinorUpdates"
keyname7="RebootRelaunchTimeoutEnabled"
keyname8="RebootRelaunchTimeout"
keyname9="RescheduleWaitTimeEnabled"
keyname10="RescheduleWaitTime"
keyname11="DetectionFrequencyEnabled"
keyname12="RebootWarningTimeoutEnabled"
keyname13="RebootWarningTimeout"
keyname14="UseWUServer"
keyname15="NoAUShutdownOption"
keyname16="NoAUAsDefaultShutdownOption"
keytype="REG_DWORD"
AU.RegWrite RegPath,Default
AU.RegWrite RegPath&keyname1,"0",keytype
AU.RegWrite RegPath&keyname2,"4",keytype
AU.RegWrite RegPath&keyname3,"0",keytype
AU.RegWrite RegPath&keyname4,"18",keytype
AU.RegWrite RegPath&keyname5,"1",keytype
AU.RegWrite RegPath&keyname6,"1",keytype
AU.RegWrite RegPath&keyname7,"1",keytype
AU.RegWrite RegPath&keyname8,"60",keytype
AU.RegWrite RegPath&keyname9,"1",keytype
AU.RegWrite RegPath&keyname10,"16",keytype
AU.RegWrite RegPath&keyname11,"1",keytype
AU.RegWrite RegPath&keyname12,"1",keytype
AU.RegWrite RegPath&keyname13,"30",keytype
AU.RegWrite RegPath&keyname14,"1",keytype
AU.RegWrite RegPath&keyname15,"0",keytype
AU.RegWrite RegPath&keyname16,"0",keytype
WSUSREG.Run("Net Start wuauserv")
WScript.Sleep 100
WSUSREG.Run("wuauclt /detectnow")
MsgBox("Microsoft Update 服务已安装成功!")