Coolsights2000 Posted October 27, 2005 Posted October 27, 2005 (edited) Hi! allI'm trying to work out some code to turn on the video accelerators and the other enhancers and I need to know what is the correct syntax to use to pull the value of the register string \Device\Video0 in the key VIDEO..just dropping the \Device\Video0 in the normal way the WshShell.RegRead( thinks it is looking in the device key for the Video0 reg stringI have tried the other programs posted but they just don't work in the silent install mode,, Not even close,,So it is time to dig a little and make one..Once I get past this I will be able to finish the rest of the code..I need this value so I can strip the /0000 off the end or what ever number gets put in there,,,I also think that I will be able to just delete the Axel.level key this way it will work for everyone..LOl I have the rest of the keys to finish the script it is just this is one spot I can't find the correct syntax for..On Error Resume NextDIM PNPDeviceID, VideoID, ClassGUID, Driver, Level,Acceler,Video0,BingostrComputer = "."Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery("Select * from Win32_VideoController")Wscript.Echo "Number of Video Controllers: " & colItems.CountFor Each objItem in colItems PNPDeviceID = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\" & objItem.PNPDeviceID Set WshShell = WScript.CreateObject("WScript.Shell") VideoID = WshShell.RegRead(PNPDeviceID & "\Device Parameters\VideoID") ClassGUID = WshShell.RegRead(PNPDeviceID & "\ClassGUID") Driver = WshShell.RegRead(PNPDeviceID & "\Driver") Level = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\" & VideoID & "\0000\Acceleration.Level" Acceler = WshShell.RegRead(Level) Video0 = WshShell.RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\VIDEO\ \Device\Video0") WScript.Echo Video0NextIf you are confused look in the register hereHKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\VIDEO\then look at the Reg string \Device\Videoyou will see it...I need to know how to make it look at the \Device\Video as the reg string and not a key called Device with a reg string called Video0..Once I get the correct syntax I can change the thread to read Silent InstallHow to turn Enable video accelerator to full and Enable directdraw , Direct3D and AGP texture Edited October 27, 2005 by Coolsights2000
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now