This script will Enable CD AutoRun for XP Home. (VBScript)

'Enable CD Auto Run in XP Home
Dim WSHShell, PmBox
Message = "This script will Enable CD Auto Run." & vbCr
Message = Message & "To work correctly, the script will close" & vbCr
Message = Message & "and restart the Windows Explorer shell." & vbCr
Message = Message & "This will not harm your computer." & vbCr & vbCr
Message = Message & "Continue?"

X = MsgBox(Message, vbYesNo + vbQuestion, "Paul's XP and Vista Tweaks")

If X = 6 Then

Set WSHShell = WScript.CreateObject("WScript.Shell")

WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\policies\Explorer\NoDriveTypeAutoRun", 3, "REG_DWORD"

For Each Process in GetObject("winmgmts:"). _
ExecQuery ("select * from Win32_Process where name='EXPLORER.EXE'")
Process.terminate(0)

Next
PmBox = MsgBox("CD AutoRun is now Enable!" & vbCr & vbCr & "This script was downloaded from www.paulsxp.com", 48, "Enable")
End If

Download


Back to Line 29