Seite 1 von 1

GetRegistryStringValue

Verfasst: 08 Nov 2011, 12:01
von Lo5t
Ein program hat graphische fehler wenn meine graphic karte hardware acceleration unterstuetzt. Ich muss daher im Registry Acceleration.Level zu 5 setzten. Aber da der fadt zu Acceleration.Level nicht fest ist muss ich die Video ID aus HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\PCI\VEN_10DE&DEV_0658&SUBSYS_063B10DE&REV_A1\4&1f7cc614&0&0008\Device Parameters lesen. Beim unten gelistetem code bekomme ich dann aber folgende fehler:
openkey expected
Just realised this is the english help section so here goes:
I am trying to retrive a value of a veriable from Registry but if i use GetRegistryStringValue, I get the following error
openkey expected

Any help would be greatly appricitaed

Code: Alles auswählen

[Initial]
Message=Installing and Configuring of the Grsphics Carddriver and settings
LogLevel=2
ExitOnError=false
ScriptErrorMessages=true
TraceMode=off

[Aktionen]
DefVar $scriptpath$
DefVar $RegKeyVideoId$
Set $scriptpath$="%scriptpath%"

WinBatch_install
Registry_noHdwrExceleration

[WinBatch_install]
$scriptpath$\276.14-quadro-tesla-winxp-32bit-international-whql.exe /s /noreboot /noeula

[Registry_noHdwrExceleration]
Set $RegKeyVideoId$ = GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\PCI\VEN_10DE&DEV_0658&SUBSYS_063B10DE&REV_A1\4&1f7cc614&0&0008\Device Parameters]VideoID")
openkey [HKLM\SYSTEM\ControlSet001\Control\Video\$RegKeyVideoId$\0000]
add  "Acceleration.Level"=REG_DWORD:5

Re: GetRegistryStringValue

Verfasst: 08 Nov 2011, 15:44
von d.oertel
Hi,

set is only allowed in primary sections.

try

Code: Alles auswählen

[Aktionen]

DefVar $RegKeyVideoId$


WinBatch_install
Set $RegKeyVideoId$ = GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\PCI\VEN_10DE&DEV_0658&SUBSYS_063B10DE&REV_A1\4&1f7cc614&0&0008\Device Parameters] VideoID")

Registry_noHdwrExceleration

[WinBatch_install]
"%scriptpath%\276.14-quadro-tesla-winxp-32bit-international-whql.exe" /s /noreboot /noeula

[Registry_noHdwrExceleration]
openkey [HKLM\SYSTEM\ControlSet001\Control\Video\$RegKeyVideoId$\0000]
add  "Acceleration.Level"=REG_DWORD:5
d.oertel

Re: GetRegistryStringValue

Verfasst: 08 Nov 2011, 16:31
von Lo5t
Yup that did the trick

Thank you very much.
Much appriciated.