'Change Display Settings
'© Doug Knox - rev 02/08/2000
'From a suggestion by Bert Kinney MS MVP

Option Explicit

'Declare variables
Dim WSHShell, Caption, MyBox, p, p1, t, mustboot, errnum
Dim enab, disab, jobfunc, Reboot
Reboot = "C:\Windows\RUNDLL32.EXE shell32.dll" & Chr(44) & "SHExitWindowsEx 2"

Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKEY_LOCAL_MACHINE\Config\0001\Display\Settings\Resolution"
mustboot = "Restart your pc to" & vbCR & "effect the changes"

Caption = "Set Resolution to 800x600?" & vbCR
MyBox = MsgBox(Caption, 4100, "800 x 600")
If MyBox = vbYes Then
	jobfunc = "Resolution is set to 800 x 600"
	p1 = "800" & Chr(44) & "600"
	WSHShell.RegWrite p, p1
	MyBox = MsgBox(jobfunc & vbCR & "Restart your computer?",4100, "Restart?")
	If MyBox = vbNo Then
		MyBox = MsgBox("Don't forget to reboot", 4096, "Reminder")
		WScript.Quit
	Else
		WSHShell.Run (Reboot)
	End IF
End If

