views:

290

answers:

1

Hi guys, Thanks to all for the help in the past. I have another query for you guys. I'm hoping someone can solve my problem.

I have a .vbs script here. That changes the 'Visual Effects' in Windows. I've tested it on XP/Vista and it changes the settings, but doesn't 'apply' it. I've tried logout/login to no avail. What I mean by 'apply' is, like actually hitting the apply button, and havin' that lil grey box come up saying "Please Wait.." and then your settings are applied.

With the following script, it does change the settings, because I've confirmed this by going into Performance Options > Visual Effects.But doesn't apply them.

' Adjust for Best PerformanceScript Begining
Option Explicit
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002

Dim strComputer, oReg, strKeyPath,strValueName, dwValue

strComputer = "."

Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects"

' Sets a DWORD value
strValueName = "VisualFXSetting"
dwValue = 00000002
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue

' Sets a string value
'strValueName = "String Name"
'strValue = "String Value"
' oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
' End of script

And the Best Appearance Script follows:

' Script Begining
Option Explicit
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002

Dim strComputer, oReg, strKeyPath,strValueName, dwValue

strComputer = "."

Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects"

' Sets a DWORD value
strValueName = "VisualFXSetting"
dwValue = 00000001
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue

' Sets a string value
'strValueName = "String Name"
'strValue = "String Value"
' oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
' End of script

I hope I've worded my question right, so that all can understand.

A: 

Hey there, you probably might find your answer here:

http://www.msfn.org/board/lofiversion/index.php/t41008.html

Dread