5 pts.
 How to reboot a remote server using VB?
how to reboot a remote server using vb

Software/Hardware used:
ASKED: October 29, 2008  11:40 AM
UPDATED: October 30, 2008  1:14 PM

Answer Wiki:
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
Last Wiki Answer Submitted:  October 30, 2008  1:14 pm  by  Karl Gechlik   9,815 pts.
All Answer Wiki Contributors:  Karl Gechlik   9,815 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _