Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-18-2003, 12:57 AM
Member
 
Join Date: Sep 2003
Posts: 95
Default Setting IE as default is having dramas....

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.
Reply With Quote
  #2 (permalink)  
Old 09-18-2003, 08:08 AM
Member
 
Join Date: Jan 2003
Posts: 54
Default Re:Setting IE as default is having dramas....

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 -
Reply With Quote
  #3 (permalink)  
Old 09-18-2003, 10:46 PM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Setting IE as default is having dramas....

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.
Reply With Quote
  #4 (permalink)  
Old 09-19-2003, 07:53 AM
Member
 
Join Date: Jan 2003
Posts: 54
Default Re:Setting IE as default is having dramas....

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 -
Reply With Quote
  #5 (permalink)  
Old 09-22-2003, 02:41 AM
Junior Member
 
Join Date: Feb 2003
Posts: 12
Default Re:Setting IE as default is having dramas....

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
Reply With Quote
  #6 (permalink)  
Old 09-22-2003, 10:41 PM
Member
 
Join Date: Sep 2003
Posts: 95
Default Re:Setting IE as default is having dramas....

*ding ding ding* We have a winner....

;D

Thanks for that, using "" instead of "(Default)" works perfectly.

Cheers,

G.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:47 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.