|
|||
|
Hi there,
I'm trying to re-write a variable in the registry to trick the computer into setting IE as the default browser. However. The regkey object is not finding the variable.... I'm looking in "HKCR\\http\\shell\\open\\ddeexec\\Application " In there, there is a registry value "(Default)" that is set to IExplore. Now, all I want to do is have a function that checks to see if: a). That key exists. b). If so, check to see that the data entry is IExplore. c). If so, do nothing, but if not set the data entry to IExplore. Which sounds simple. Except I can't get SWFKit to read the default key in that path. There is a lot of other code, but to simplify I'll show you this section of code which is not working: setIEDefaultPath = "HKCR\\http\\shell\\open\\ddeexec\\Application " // A trace here shows HKCR\\http\\shell\\open\\ddeexec\\Application setIEDefaultKey = RegKey.open(setIEDefaultPath); // A trace here shows Object [RegKey] setIEDefaultRV = setIEDefaultKey.getValue("(Default)"); // A trace here shows undefined; setIEDefaultVar = setIEDefaultRV.data; // A trace here shows warning using undefined property data // and that setIEDefaultVar is undefined. Which it is.... O_o Bizarre, because I use much the same code fragment elsewhere and it does work.... ??? However, if I then create ANOTHER registry value (Default) = IExplore (so there are now two entries with exactly the same values) my code works. As soon as I delete the second entry my code fails.... > ![]() Could anyone shed some light on this please? Cheers, G. |
|
|||
|
can give you a beginning of answer, assuming i've well understood what's wrong here.
1°) is HKCR a network server ? the path your use doesn't seem to be good (use "/" instead, cause in that case it's similar to internet) 2°) if not, this path doesn't seem to be good either, you must use a full compliant path, eg: c:\\ or whatever:\\ ..... 3°) setIEDefaultKey.getValue("(Default)"); as u tried setIEDefaultKey.getValue("[Default]"); ? hope that help u. seeU Madcha
__________________
http://www.alyze.com - http://www.ecomzone.net - http://www.alisook.com -http://www.madcha.com - http://www.i-multimedia.fr - |
|
|||
|
thanks for that reply Madcha, but yes I think you have misunderstood me.
1). HKCR isn't a network path, it is a registry class (HKEY_CLASSES_ROOT) which I need to alter to show that IE is the default browser. To do this, I need to change the (Default) value in the path: HKCR\\http\\shell\\open\\ddeexec\\Application 2). Registry values aren't referenced using drive letters.... the path is correct, go to start -> run -> regedit and check it yourself.... (and yes, even though in regedit the path only uses one \ I do actually need the two \\'s for the path to work in SWFKit) 3). I need to get the value of (Default) not [Default]. My code works if I introduce a SECOND registry value (Default) = IExplore, but doesn't seem to be able to work with just the one default value.... even though they are exactly the same.... ??? Once again, thanks for your reply! G. |
|
|||
|
Yes i ! ;D
A thoursand apologyzes ! :-X i got it wrong. As soon as i'll deal with reg key i'll get back to you (if no one else has solved this problem.... )Don't hesitate to post on this forum, 'cause IT NEEDED IT ! I think that the swfkit team is somehow....desperatly wanted ! seeU
__________________
http://www.alyze.com - http://www.ecomzone.net - http://www.alisook.com -http://www.madcha.com - http://www.i-multimedia.fr - |
|
|||
|
Regedit just shows "(Default)". The "default" value of a registry key does not have a property name.
Reference the "default" registry value as "". Any other registry value would be referenced by the name of the value. eg. replace this portion of your code. setIEDefaultRV = setIEDefaultKey.getValue(""); Hope this helps. -Umpa |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|