blackey Posted August 31, 2006 Posted August 31, 2006 I am currently trying to read a registry key that is using the reg_multi_sz format and i'm having no luck, i checked out the example, but it's very vague on a clear example. Can anyone post a clear example for me? I've checked everywhere! here's the registry key [HKEY_CLASSES_ROOT\Installer\Assemblies\C:|WINDOWS|system32|CS_Components|COF|CS_PelcoDX8000DriverStartupNET.exe] "CS_PelcoDX8000DriverStartupNET,Version=\"1.0.2327.29084\",PublicKeyToken=\"null\",Culture=\"neutral\""=hex(7):62,\ 00,7d,00,6c,00,4b,00,50,00,49,00,44,00,64,00,34,00,40,00,52,00,6f,00,28,00,\ 2e,00,3f,00,69,00,69,00,4b,00,56,00,57,00,3e,00,5d,00,78,00,54,00,6a,00,48,\ 00,5b,00,3f,00,51,00,5f,00,40,00,4d,00,29,00,65,00,46,00,28,00,4f,00,58,00,\ 4a,00,58,00,4f,00,00,00,00,00 Thanks
ChrisL Posted August 31, 2006 Posted August 31, 2006 Does this work if you put your correct key in $key = RegRead("HKEY_CLASSES_ROOT\Installer\As...........etc") $Split = StringSplit ($Key, @lf) For $i = 1 to Ubound ($split) - 1 MsgBox (0,"Value", $split[$i]) Next [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
blackey Posted August 31, 2006 Author Posted August 31, 2006 Doesn't there have to be two parameters in a regread? i.e. regread("whatever","whatever") your example only shows one parameter, and i want to READ the value of [HKEY_CLASSES_ROOT\Installer\Assemblies\C:|WINDOWS|system32|CS_Components|COF|CS_PelcoDX8000DriverStartupNET.exe]
blackey Posted August 31, 2006 Author Posted August 31, 2006 Does this work if you put your correct key in $key = RegRead("HKEY_CLASSES_ROOT\Installer\As...........etc") $Split = StringSplit ($Key, @lf) For $i = 1 to Ubound ($split) - 1 MsgBox (0,"Value", $split[$i]) Next Can you please fill out the rest of your script? i.e. $key = RegRead("HKEY_CLASSES_ROOT\Installer\As.....fill out please......etc")
MHz Posted September 1, 2006 Posted September 1, 2006 here's the registry key [HKEY_CLASSES_ROOT\Installer\Assemblies\C:|WINDOWS|system32|CS_Components|COF|CS_PelcoDX8000DriverStartupNET.exe] "CS_PelcoDX8000DriverStartupNET,Version=\"1.0.2327.29084\",PublicKeyToken=\"null\",Culture=\"neutral\""=hex(7):62,\ 00,7d,00,6c,00,4b,00,50,00,49,00,44,00,64,00,34,00,40,00,52,00,6f,00,28,00,\ 2e,00,3f,00,69,00,69,00,4b,00,56,00,57,00,3e,00,5d,00,78,00,54,00,6a,00,48,\ 00,5b,00,3f,00,51,00,5f,00,40,00,4d,00,29,00,65,00,46,00,28,00,4f,00,58,00,\ 4a,00,58,00,4f,00,00,00,00,00 ThanksReg_Multi_sz is normally stored in Regedit different to what is stored in a reg file. A reg file will store a unicode equivalent of the entry in the best way possible, as hex data. If you disregard the reg file and get the data directly from regedit, the you will get the string representation. The above may look like this (notice the @LF used for multiple values) RegWrite("HKCU\SOFTWARE\Test", "TestKey1", "REG_MULTI_SZ", "%EmAj?C%k9W7cNB_.[t[Redist_Package>Cd2HfPvUY9]I?,mmJG!9") RegWrite("HKCU\SOFTWARE\Test", "TestKey2", "REG_MULTI_SZ", "%systemdrive%" & @LF & "%programfiles%") But if you export to a reg file, then you get this Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Test] "TestKey1"=hex(7):25,00,45,00,6d,00,41,00,6a,00,3f,00,43,00,25,00,6b,00,39,00,\ 57,00,37,00,63,00,4e,00,42,00,5f,00,2e,00,5b,00,74,00,5b,00,52,00,65,00,64,\ 00,69,00,73,00,74,00,5f,00,50,00,61,00,63,00,6b,00,61,00,67,00,65,00,3e,00,\ 43,00,64,00,32,00,48,00,66,00,50,00,76,00,55,00,59,00,39,00,5d,00,49,00,3f,\ 00,2c,00,6d,00,6d,00,4a,00,47,00,21,00,39,00,00,00,00,00 "TestKey2"=hex(7):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,64,00,72,00,69,00,\ 76,00,65,00,25,00,00,00,25,00,70,00,72,00,6f,00,67,00,72,00,61,00,6d,00,66,\ 00,69,00,6c,00,65,00,73,00,25,00,00,00,00,00 So get the data directly from regedit.
blackey Posted September 1, 2006 Author Posted September 1, 2006 I guess my whole question is how would i get the value of "Version" in the app i'm creating the version will be different on some computers and that's the info i'm trying to extract from this reg key.
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