|
 |
aspx_beginners thread: was: convert this vb6 to vb.net HELP Now DETECT FLASH
Message #1 by "John Hamman {Hamman Interactive}" <johnhamman@C...> on Wed, 10 Apr 2002 23:31:57 -0400
|
|
Great thanks. One more question.
There should be a key under
'HKEY_LOCAL_MACHINE/SOFTWARE/Classes/ShockwaveFlash.ShockwaveFlash.5'
where the last number tells you what version is installed (so it could say
ShockwaveFlash.4 or whatever version).
How do i test that where if i wanted to set a varable somewhere and i could
tell me the highest version installed?
I dont know anything about searching the registry in .NET.
Please help.
john
Message #2 by "Minh T. Nguyen" <nguyentriminh@y...> on Thu, 11 Apr 2002 01:01:00 -0700
|
|
John,
It's the same code:
Microsoft.Win32.RegistryKey nRet
Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.Shockwav
eFlash.5");
if (nRet == null) {
// now you know that flash 5 is not installed
}
Microsoft.Win32.RegistryKey nRet
Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.Shockwav
eFlash.4");
if (nRet == null) {
// now you know that flash 4 is not installed
}
Microsoft.Win32.RegistryKey nRet
Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.Shockwav
eFlash.3");
if (nRet == null) {
// now you know that flash 3 is not installed
}
....
If you programmatically want to find out what the highest number
is, you can just get a list of ALL subkeys of the ClassesRoot and then
just iterate through all of them and find one that starts out with the
name ShockwaveFlash.ShockwaveFlash and then pick the last digit, but I
can assure you that that's way too inefficient, given the the amount of
classes you find in that registry entry, so it's probably just better to
check for the existence of simply the
'HKEY_LOCAL_MACHINE/SOFTWARE/Classes/ShockwaveFlash.ShockwaveFlash.5'
key or
'HKEY_LOCAL_MACHINE/SOFTWARE/Classes/ShockwaveFlash.ShockwaveFlash.6'
and so on.
Just remember that OpenSubKey will return null if the key
doesn't exist. You can read and set values in the key as well, just look
through the methods of the RegistryKey class.
Happy coding,
Minh.
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:johnhamman@C...]
Sent: Wednesday, April 10, 2002 8:32 PM
To: aspx_beginners
Subject: [aspx_beginners] was: convert this vb6 to vb.net HELP Now
DETECT FLASH
Great thanks. One more question.
There should be a key under
'HKEY_LOCAL_MACHINE/SOFTWARE/Classes/ShockwaveFlash.ShockwaveFlash.5'
where the last number tells you what version is installed (so it could
say
ShockwaveFlash.4 or whatever version).
How do i test that where if i wanted to set a varable somewhere and i
could
tell me the highest version installed?
I dont know anything about searching the registry in .NET.
Please help.
john
Message #3 by "John Hamman {Hamman Interactive}" <johnhamman@C...> on Thu, 11 Apr 2002 11:21:14 -0400
|
|
is there a way i can loop thru 'shockwaveFlash."+ i ) till i find the
highest number?
john
-----Original Message-----
From: Minh T. Nguyen [mailto:nguyentriminh@y...]
Sent: Thursday, April 11, 2002 4:01 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
John,
It's the same code:
Microsoft.Win32.RegistryKey nRet
Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.Shockwav
eFlash.5");
if (nRet == null) {
// now you know that flash 5 is not installed
}
Microsoft.Win32.RegistryKey nRet
Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.Shockwav
eFlash.4");
if (nRet == null) {
// now you know that flash 4 is not installed
}
Microsoft.Win32.RegistryKey nRet
Microsoft.Win32.Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.Shockwav
eFlash.3");
if (nRet == null) {
// now you know that flash 3 is not installed
}
....
If you programmatically want to find out what the highest number
is, you can just get a list of ALL subkeys of the ClassesRoot and then
just iterate through all of them and find one that starts out with the
name ShockwaveFlash.ShockwaveFlash and then pick the last digit, but I
can assure you that that's way too inefficient, given the the amount of
classes you find in that registry entry, so it's probably just better to
check for the existence of simply the
'HKEY_LOCAL_MACHINE/SOFTWARE/Classes/ShockwaveFlash.ShockwaveFlash.5'
key or
'HKEY_LOCAL_MACHINE/SOFTWARE/Classes/ShockwaveFlash.ShockwaveFlash.6'
and so on.
Just remember that OpenSubKey will return null if the key
doesn't exist. You can read and set values in the key as well, just look
through the methods of the RegistryKey class.
Happy coding,
Minh.
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:johnhamman@C...]
Sent: Wednesday, April 10, 2002 8:32 PM
To: aspx_beginners
Subject: [aspx_beginners] was: convert this vb6 to vb.net HELP Now
DETECT FLASH
Great thanks. One more question.
There should be a key under
'HKEY_LOCAL_MACHINE/SOFTWARE/Classes/ShockwaveFlash.ShockwaveFlash.5'
where the last number tells you what version is installed (so it could
say
ShockwaveFlash.4 or whatever version).
How do i test that where if i wanted to set a varable somewhere and i
could
tell me the highest version installed?
I dont know anything about searching the registry in .NET.
Please help.
john
Message #4 by "Minh T. Nguyen" <nguyentriminh@y...> on Thu, 11 Apr 2002 10:47:42 -0700
|
|
John,
Yeah, just loop through it. :)
RegistryKey nRet = null;
int i = 1;
do {
nRet
Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.ShockwaveFlash." + i);
i++;
} while (nRet != null);
// now you know that i-1 is the highest flash.
But before you continue, you might want to consider what this
code does. This code does NOT detect what the highest flash is installed
on the client! If you run this code in your ASP code behind, you end up
finding out what the highest flash is installed on the server--your
webserver, not the people who will visit your aspx pages. So, I wonder
how much this code will help you. The initial VB6 code you showed does
the same say, checks server side.
If you want to detect flash versions on the client side, you
might want to check with macromedia's forum or so, as I don't know how
to do that, but I know that you can place HTML code that automatically
downloads and installs the newest flash in case your client does not
have flash.
Minh.
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:johnhamman@C...]
Sent: Thursday, April 11, 2002 8:21 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
is there a way i can loop thru 'shockwaveFlash."+ i ) till i find the
highest number?
John
Message #5 by "John Hamman {Hamman Interactive}" <johnhamman@C...> on Thu, 11 Apr 2002 15:29:59 -0400
|
|
hmm. wow. lol. i can imagin how messed up this would be then. I realy need
to check to see if a clients computer has flash over the internet befor the
page loads. i know how to detect flash all the other ways but, since i can't
afford browserhawk by cyscape i figured i would try to figure out how there
dll does it.
any idea then how i can check for the plugin.thanks for that last info.
john
-----Original Message-----
From: Minh T. Nguyen [mailto:nguyentriminh@y...]
Sent: Thursday, April 11, 2002 1:48 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
John,
Yeah, just loop through it. :)
RegistryKey nRet = null;
int i = 1;
do {
nRet
Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.ShockwaveFlash." + i);
i++;
} while (nRet != null);
// now you know that i-1 is the highest flash.
But before you continue, you might want to consider what this
code does. This code does NOT detect what the highest flash is installed
on the client! If you run this code in your ASP code behind, you end up
finding out what the highest flash is installed on the server--your
webserver, not the people who will visit your aspx pages. So, I wonder
how much this code will help you. The initial VB6 code you showed does
the same say, checks server side.
If you want to detect flash versions on the client side, you
might want to check with macromedia's forum or so, as I don't know how
to do that, but I know that you can place HTML code that automatically
downloads and installs the newest flash in case your client does not
have flash.
Minh.
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:johnhamman@C...]
Sent: Thursday, April 11, 2002 8:21 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
is there a way i can loop thru 'shockwaveFlash."+ i ) till i find the
highest number?
John
Message #6 by "Peter" <petemail@r...> on Thu, 11 Apr 2002 17:14:41 -0400
|
|
Have you considered using "dumb methods", for example:
Build an HTML page with instructions to click on the flash animated button
below if they are able to see it otherwise give them the option to download
the plug-in or navigate to a mirror web site that doesn't require flash.
While this is not a high-tech solution you're guaranteed that it will work.
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:johnhamman@C...]
Sent: Thursday, April 11, 2002 3:30 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
hmm. wow. lol. i can imagin how messed up this would be then. I realy need
to check to see if a clients computer has flash over the internet befor the
page loads. i know how to detect flash all the other ways but, since i can't
afford browserhawk by cyscape i figured i would try to figure out how there
dll does it.
any idea then how i can check for the plugin.thanks for that last info.
john
-----Original Message-----
From: Minh T. Nguyen [mailto:nguyentriminh@y...]
Sent: Thursday, April 11, 2002 1:48 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
John,
Yeah, just loop through it. :)
RegistryKey nRet = null;
int i = 1;
do {
nRet
Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.ShockwaveFlash." + i);
i++;
} while (nRet != null);
// now you know that i-1 is the highest flash.
But before you continue, you might want to consider what this
code does. This code does NOT detect what the highest flash is installed
on the client! If you run this code in your ASP code behind, you end up
finding out what the highest flash is installed on the server--your
webserver, not the people who will visit your aspx pages. So, I wonder
how much this code will help you. The initial VB6 code you showed does
the same say, checks server side.
If you want to detect flash versions on the client side, you
might want to check with macromedia's forum or so, as I don't know how
to do that, but I know that you can place HTML code that automatically
downloads and installs the newest flash in case your client does not
have flash.
Minh.
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:johnhamman@C...]
Sent: Thursday, April 11, 2002 8:21 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
is there a way i can loop thru 'shockwaveFlash."+ i ) till i find the
highest number?
John
Message #7 by "John Hamman {Hamman Interactive}" <johnhamman@C...> on Thu, 11 Apr 2002 20:47:37 -0400
|
|
Yes, and I have done those in the past. The site im building is a large
scale ecommerce site.
I cant afford to do that, because it adds another step in the viewers
shopping process. And other methods
like javascript methods add to the code on the page and the load time. every
KB counts with a largescale site
like this. So idealy what i would like to do is create something like
browserhawk that detects flash before the page is built and build the page
based on whether the user has it or not. if they dont have it the code will
show a jpg or what not.
john
-----Original Message-----
From: Peter [mailto:petemail@r...]
Sent: Thursday, April 11, 2002 5:15 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
Have you considered using "dumb methods", for example:
Build an HTML page with instructions to click on the flash animated button
below if they are able to see it otherwise give them the option to download
the plug-in or navigate to a mirror web site that doesn't require flash.
While this is not a high-tech solution you're guaranteed that it will work.
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:johnhamman@C...]
Sent: Thursday, April 11, 2002 3:30 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
hmm. wow. lol. i can imagin how messed up this would be then. I realy need
to check to see if a clients computer has flash over the internet befor the
page loads. i know how to detect flash all the other ways but, since i can't
afford browserhawk by cyscape i figured i would try to figure out how there
dll does it.
any idea then how i can check for the plugin.thanks for that last info.
john
-----Original Message-----
From: Minh T. Nguyen [mailto:nguyentriminh@y...]
Sent: Thursday, April 11, 2002 1:48 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
John,
Yeah, just loop through it. :)
RegistryKey nRet = null;
int i = 1;
do {
nRet
Registry.ClassesRoot.OpenSubKey("ShockwaveFlash.ShockwaveFlash." + i);
i++;
} while (nRet != null);
// now you know that i-1 is the highest flash.
But before you continue, you might want to consider what this
code does. This code does NOT detect what the highest flash is installed
on the client! If you run this code in your ASP code behind, you end up
finding out what the highest flash is installed on the server--your
webserver, not the people who will visit your aspx pages. So, I wonder
how much this code will help you. The initial VB6 code you showed does
the same say, checks server side.
If you want to detect flash versions on the client side, you
might want to check with macromedia's forum or so, as I don't know how
to do that, but I know that you can place HTML code that automatically
downloads and installs the newest flash in case your client does not
have flash.
Minh.
-----Original Message-----
From: John Hamman {Hamman Interactive} [mailto:johnhamman@C...]
Sent: Thursday, April 11, 2002 8:21 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: was: convert this vb6 to vb.net HELP Now
DETECT FLASH
is there a way i can loop thru 'shockwaveFlash."+ i ) till i find the
highest number?
John
|
|
 |