Monday, September 06, 2010
   
Text Size

Search

hits.

purpleender

Rep

Gamerscore33992

ZoneUnderground

Technical Log

XP - Set Pagefile size

'****************************************
'****** Set The PC's Page File Size to 2xRAM For Min and Max
'****************************************
Sub Set_PageFile_Size()
 On Error Resume Next
 sPath = "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\"

 Set WMI = GetObject("WinMgmts:")
 Set objs = WMI.InstancesOf("Win32_OperatingSystem")
 For Each obj In objs
   sMem = sMem & obj.TotalVisibleMemorySize
  If sMem < objs.Count Then sMem = sMem & ","
 Next

 sInstalled = CLng(sMem) / 1024
 sInstalled = cInt(sInstalled / 16) * 16
 sInstalled = sInstalled * 2

 set objRegistry = GetObject("WinMgmts://./root/default:StdRegProv")

 sPageFile = "C:\pagefile.sys "
 sPageFile = sPageFile & CStr(sInstalled) & " " & CStr(sInstalled)
 sPageFile = Array(sPageFile)

 lRC = objRegistry.SetMultiStringValue(HKEY_LOCAL_MACHINE, sPath, "PagingFiles", sPageFile )

 If (lRC 0) or (Err.Number 0) Then
  'An Error Occured Setting The Page File Size
  OFILES.Write (chr(13) & chr(10) & "PAGEFILE SIZE         : ERROR, There was a problem setting the Page File Size.")
 End If
 On Error GoTo 0
 OFILES.Write (chr(13) & chr(10) & "PAGEFILE SIZE         : Pagefile Size set to twice RAM Size for Minimum and Maximum.")
End Sub

 

XP - MSI Installation States

'Sub Routine For Checking The Status Of An MSI Installation
Sub MSI_Status()
 Select Case MSI_Code
  Case 0
       MSI_State = "Success"
         Case 13
              MSI_State = "The Data Is Invalid"
         Case 87
              MSI_State = "One Of The Parameters Was Invalid"
         Case 1601
              MSI_State = "Installer Service Could Not Be Accessed"
         Case 1602
              MSI_State = "User Cancelled Installation"
         Case 1603
              MSI_State = "Fatal Error During Installation"
         Case 1604
              MSI_State = "Installation Suspended, Incomplete"
         Case 1605
              MSI_State = "This Action Is Invalid for Products That Are Currently Installed"
         Case 1606
              MSI_State = "Feature ID Not Recognised"
         Case 1607
              MSI_State = "Component ID Not Registered"
         Case 1608
              MSI_State = "Unknown Property"
         Case 1609
              MSI_State = "Handle Is An Invalid State"
         Case 1610
              MSI_State = "The Configuration Data For This Product is Corrupt"
         Case 1611
              MSI_State = "Component Qualifier Not Present"
         Case 1612
              MSI_State = "The Installation Source For This Product Is Not Available"
         Case 1613
              MSI_State = "Windows Installer Service is The Wrong Version"
         Case 1614
              MSI_State = "Product Is Uninstalled"
         Case 1615
              MSI_State = "SQL Query Syntax Invalid or Not Supported"
         Case 1616
              MSI_State = "Record Field Does Not Exist"
         Case 1618
              MSI_State = "Another Installation Is Already In Progress"
         Case 1619
              MSI_State = "Installation Package Could Not Be Opened.  Verify The Package Exists"
         Case 1620
              MSI_State = "Installation Package Could Not Be Opened.  Verify This Is A Valid Windows Installer Package"
         Case 1621
              MSI_State = "Error Starting The Windows Installer Service User Interface"
         Case 1622
              MSI_State = "Error Opening Installation Log File"
         Case 1623
              MSI_State = "The Language Of This Installation Package Is Not Supported By Your System"
         Case 1624
              MSI_State = "Error Applying Transforms.  Verify That The Paths Are Valid"
         Case 1625
              MSI_State = "This Installation Is Forbidden By System Policy"
         Case 1626
              MSI_State = "Function Could Not Be Executed"
         Case 1627
              MSI_State = "Function Failed During Execution"
         Case 1628
              MSI_State = "Invalid Or Unknown Table Specified"
         Case 1629
              MSI_State = "Data Supplied Is Of Wrong Type"
         Case 1630
              MSI_State = "Data Of This Type Is Not Supported"
         Case 1631
              MSI_State = "The Windows Installer Service Failed To Start"
         Case 1632
              MSI_State = "The Temp Folder Is Either Full Or Inaccessible"
         Case 1633
              MSI_State = "This Installation Package Is Not Supported On This Platform"
         Case 1634
              MSI_State = "Component Not Used On This Machine"
         Case 1635
              MSI_State = "This Package Could Not Be Opened.  Verify The Package Exists And You Have Rights To It"
         Case 1636
              MSI_State = "This Patch Package Could Not Be Opened"
         Case 1637
              MSI_State = "This Package Cannot Be Processed By The Windows Installer Service."
         Case 1638
              MSI_State = "Another Version Of This Product Is Already Installed"
         Case 1639
              MSI_State = "Invalid Command Line Arguement"
         Case 1640
              MSI_State = "Installation From ATerminal Server Client Session Is Not Permitted"
         Case 1641
              MSI_State = "The Instller Has Started A Reboot"
         Case 1642
              MSI_State = "The Installer Cannot Install The Patch Because The Program Being Upgraded Is Missing"
         Case 3010
              MSI_State = "A Restart Is Required to Complete The Installation"
         Case Else
              MSI_State = "Unknown MSI Status Code Reported"
 End Select
End Sub
 

XP - Media Player v9 Registry Keys

                'Registry Changes For Windows Media Player 9
                WshShell.RegWrite "HKCU\Software\Microsoft\MediaPlayer\Preferences\AcceptedPrivacyStatement", 1 , "REG_DWORD"
                WshShell.RegWrite "HKCU\Software\Microsoft\MediaPlayer\Preferences\LaunchIndex", 5 , "REG_DWORD"
                WshShell.RegWrite "HKCU\Software\Microsoft\MediaPlayer\Setup\UserOptions\DesktopShortcut", "No" , "REG_SZ"
                WshShell.RegWrite "HKCU\software\Microsoft\MediaPlayer\Setup\UserOptions\QuickLaunchShortcut", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\Software\Microsoft\Multimedia\WMPlayer\Extensions\.aif\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.aifc\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.aiff\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.asf\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.asx\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.au\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.avi\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.cda\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.m1v\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.m3u\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mid\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.midi\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mp2\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mp2v\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mp3\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mpa\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mpe\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mpeg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mpg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.mpv2\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.rmi\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.snd\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wav\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wax\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wm\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wma\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wmd\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wmv\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wmx\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wmz\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.wvx\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\application/x-mplayer2\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\application/x-ms-wmd\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\application/x-ms-wmz\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/aiff\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/basic\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/mid\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/midi\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/mp3\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/mpeg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/mpegurl\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/mpg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/wav\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-aiff\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-mid\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-midi\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-mp3\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-mpeg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-mpegurl\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-mpg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-ms-wax\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-ms-wma\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\audio/x-wav\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\midi/mid\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/avi\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/mpeg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/mpg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/msvideo\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-mpeg\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-mpeg2a\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-ms-asf\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-ms-asf-plugin\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-ms-wm\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-ms-wmv\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-ms-wmx\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-ms-wvx\UserApprovedOwning", "Yes" , "REG_SZ"
                WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Multimedia\WMPlayer\MIME Types\video/x-msvideo\UserApprovedOwning", "Yes" , "REG_SZ"
   

XP - Configure Firewall

 WshShell.Run ("netsh firewall reset"),,true
 WshShell.Run ("netsh firewall set opmode mode = ENABLE exceptions = ENABLE profile = DOMAIN"),,true
 WshShell.Run ("netsh firewall set opmode mode = ENABLE exceptions = DISABLE profile = STANDARD"),,true
 WshShell.Run ("netsh firewall set icmpsetting type = ALL mode = ENABLE profile = DOMAIN"),,true
 WshShell.Run ("netsh firewall set icmpsetting type = ALL mode = DISABLE profile = STANDARD"),,true
 WshShell.Run ("netsh firewall set icmpsetting type = 8 mode = ENABLE profile = STANDARD"),,true
 WshShell.Run ("netsh firewall set multicastbroadcastresponse mode = DISABLE profile = ALL"),,true
 WshShell.Run ("netsh firewall set notifications mode = DISABLE profile = ALL"),,true
 WshShell.Run ("netsh firewall set service type = FILEANDPRINT mode = ENABLE scope = CUSTOM addresses = 10.0.0.0/8,LocalSubnet profile = ALL"),,true
 WshShell.Run ("netsh firewall set service type = REMOTEADMIN mode = ENABLE scope = CUSTOM addresses = 10.0.0.0/8 profile = DOMAIN"),,true
 WshShell.Run ("netsh firewall set service type = REMOTEADMIN mode = DISABLE profile = STANDARD"),,true
 WshShell.Run ("netsh firewall set service type = REMOTEDESKTOP mode = ENABLE scope = CUSTOM addresses = 10.0.0.0/8 profile = DOMAIN"),,true
 WshShell.Run ("netsh firewall set service type = REMOTEDESKTOP mode = DISABLE profile = STANDARD"),,true
 WshShell.Run ("netsh firewall set service type = UPNP mode = ENABLE scope = CUSTOM addresses = 10.0.0.0/8 profile = DOMAIN"),,true
 WshShell.Run ("netsh firewall set service type = UPNP mode = DISABLE profile = STANDARD"),,true
 WshShell.Run ("netsh firewall add portopening UDP 33355 Landesk_TMC_TCP_33355 enable all"),, True
 WshShell.Run ("netsh firewall add portopening TCP 33355 Landesk_TMC_UDP_33355 enable all"),, True
 WshShell.Run ("netsh firewall add portopening UDP 33354 Landesk_TMC_TCP_33354 enable all"),, True
 WshShell.Run ("netsh firewall add portopening TCP 33354 Landesk_TMC_UDP_33354 enable all"),, True
 WshShell.Run ("netsh firewall add portopening UDP 38293 Landesk_RSD_TCP_38293 enable all"),, True
 WshShell.Run ("netsh firewall add portopening TCP 38292 Landesk_RSD_UDP_38292 enable all"),, True
 WshShell.Run ("netsh firewall add portopening TCP 1761 Landesk_RC_TCP_1761 enable all"),, True
 WshShell.Run ("netsh firewall add portopening UDP 1761 Landesk_RC_UDP_1761 enable all"),, True
 WshShell.Run ("netsh firewall add portopening TCP 1762 Landesk_RC_TCP_1762 enable all"),, True
 WshShell.Run ("netsh firewall add portopening UDP 1762 Landesk_RC_UDP_1762 enable all"),, True
 

VB SCripting - Set System Restore size depending on hard drive size

 '********Set System Restore size depending on hard drive size
 strComputer = "."
 Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
 Set colItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive",,48)
 For Each objItem in colItems
 objItem.size = objItem.size /1000000000 
 DiskSize = objItem.size
 DriveNumber = objItem.DeviceID
 Next

 If DriveNumber = "\\.\PHYSICALDRIVE0" Then
  WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\DisableSR" , 0 , "REG_DWORD"
   If DiskSize <= 15 Then
    WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\DiskPercent" , 5 , "REG_DWORD"
    WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\Cfg\DiskPercent" , 5 , "REG_DWORD"
   End If
   If DiskSize => 16 AND DiskSize <= 29 Then
    WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\DiskPercent" , 3 , "REG_DWORD"
    WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\Cfg\DiskPercent" , 3 , "REG_DWORD"
   End If  
   If DiskSize => 30 AND DiskSize <= 49 Then
    WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\DiskPercent" , 2 , "REG_DWORD"
    WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\Cfg\DiskPercent" , 2 , "REG_DWORD"
   End If
   If DiskSize => 50 Then
    WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\DiskPercent" , 1 , "REG_DWORD"
    WshShell.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\SystemRestore\Cfg\DiskPercent" , 1 , "REG_DWORD"
   End If
 Else
  MSGBOX("No Drive Detected") 
 End If

   

Page 10 of 12