Jump to content

Check Registry value


Recommended Posts

Hello

I want to know if is it possible to check à registry value to change it like this :

If RegRead("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "OPEN1", "REG_SZ", "/R ""C:\Program Files\ShowCase STRATEGY\Bin\scxadd32.xll""") Then
        RegWrite("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "OPEN1", "REG_SZ", "/R ""C:\Program Files\ShowCase Suite\Bin\scxadd32.xll""")
    EndIf
    
    If RegRead("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "OPEN2", "REG_SZ", "/R ""C:\Program Files\ShowCase STRATEGY\Bin\scxadd32.xll""") Then
        RegWrite("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "OPEN2", "REG_SZ", "/R ""C:\Program Files\ShowCase Suite\Bin\scxadd32.xll""")
    EndIf

It doesn't match on my computer.

Thanks for help and sorry for my bad english

Link to comment
Share on other sites

Hello

I want to know if is it possible to check à registry value to change it like this :

If RegRead("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "OPEN1", "REG_SZ", "/R ""C:\Program Files\ShowCase STRATEGY\Bin\scxadd32.xll""") Then
        RegWrite("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "OPEN1", "REG_SZ", "/R ""C:\Program Files\ShowCase Suite\Bin\scxadd32.xll""")
    EndIf
    
    If RegRead("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "OPEN2", "REG_SZ", "/R ""C:\Program Files\ShowCase STRATEGY\Bin\scxadd32.xll""") Then
        RegWrite("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "OPEN2", "REG_SZ", "/R ""C:\Program Files\ShowCase Suite\Bin\scxadd32.xll""")
    EndIfoÝ÷ Ø]¡ë'ßÛfj×!¢y²r©º×«N§Ç讥¥©Ý²ëÉú+&Úuéà+!þ«¨µäájÜ(mÂä&ë-~è¥éÞ®ËZ楢¶Ø^éi~)^~Ñz^iÖ§u Z¸­xX«²Ú} Eæv¬n±ëaz«¨µI®¢Ôrݶ«z+'¢wvÚç$¶¯j[j|°k"n²×h¶z«×*.{"²Ú'r)à×â®Ëméâ·ljëh×6If RegRead("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "Open1")<> "C:\Program Files\ShowCase Suite\Bin\scxadd32.xll" Then _
RegWrite(("HKCU\Software\Microsoft\Office\9.0\Excel\Options", "Open1", "REG_SZ", "C:\Program Files\ShowCase Suite\Bin\scxadd32.xll")

Note: I intentionally left off your "/R". I dont have that particular value in my "Office\Excel\Options" key but it looks to me like you are attempting to add a switch. You have to be sure to place the switch in the proper place.

If you have not yet messed with that key and it reads the same as it was before you started testing then;

Double click the Value "Open1". Use Ctrl + C to copy it and then paste that into a reply so I can see what is actually supposed to happen with that /R

Edit: I just checked my wifes system which does have 9.0 installed and the values Open1 And Open2 don't appear in there either and that is a stock load with no changes. So post the Value data for both of those values.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I want to know if is it possible to check à registry value to change it like this :

Not much of an explaination for me to know exactly what issue you are having but I will help to correct on your code syntax so it will work better.

$reg_data = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN1')
If Not @error And $reg_data = '/R "C:\Program Files\ShowCase STRATEGY\Bin\scxadd32.xll"' Then
    RegWrite('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN1', 'REG_SZ', '/R "C:\Program Files\ShowCase Suite\Bin\scxadd32.xll"')
EndIf

$reg_data = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN2')
If Not @error And $reg_data = '/R "C:\Program Files\ShowCase STRATEGY\Bin\scxadd32.xll"' Then
    RegWrite('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN2', 'REG_SZ', '/R "C:\Program Files\ShowCase Suite\Bin\scxadd32.xll"')
EndIf

:whistle:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...