CODE
'==========================================================================
'
' NAME: WMIon9x.vbs
'
' AUTHOR: Mark D. MacLachlan , itSynergy
' URL: http://www.itSynergy.com
' (c)2004 All Rights Reserved
' DATE : 1/29/2004
'
' COMMENT: Sets registry keys to enable WMI on Win9x computers.
'
'==========================================================================
on error resume next
Dim path
Set WSHShell = Wscript.CreateObject("WScript.Shell")
SET oFSO = Wscript.CreateObject("Scripting.FileSystemObject")
'set the key path here. IF you don't end with a '' then WSH assumes you are pathing to a value.
path = "HKLMSoftwareMicrosoft"
WSHShell.RegWrite path & "OLEEnableDCOM","Y","REG_SZ"
WSHShell.RegWrite path & "OLEEnableRemoteConnect","Y","REG_SZ"
WSHShell.RegWrite path & "WBEMcimomEnableAnonConnections","1","REG_SZ"
WSHShell.RegWrite path & "WBEMcimomAutostartWin9x","1","REG_SZ"
strSup = WshShell.SpecialFolders("Startup")
strshortcut = strSup & "WindowsManagement.lnk"
If Not oFSO.FileExists(strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut(strshortcut)
oUrlLink.TargetPath = "C:WINDOWSSYSTEMWBEMWINMGMT.EXE"
oUrlLink.Save
End If