| View previous topic :: View next topic |
| Author |
Message |
SilverSurfer Newbie
Joined: 14 Mar 2003 Posts: 9
|
Posted: Tue May 13, 2003 4:56 pm Post subject: Detect Installed Programs |
|
|
Hi all,
I would like to be able to detect installed programs on the user's system, and then display a message stating is they have the programs on their computer or not.
I would like to detect Acrobar Reader, MS Internet Explorer, and Flash Player.
I was think thinking maybe I would have to read the installation path registry key for the programs maybe. But I am very new to VDS.
Could soembody provide me with a script that will detect installed programs?...and a little scripting deisplaying a message box would be nice too.
SilverSurfer |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue May 13, 2003 5:13 pm Post subject: |
|
|
Hello,
I don't know the registration keys of the programs you are talking about, but if you know them you can use the following code to check it.
| Code: | %%info = @regread(CURUSER,folder,subfolder,name)
if @equal(%%info,"installed")
info You've got ... ... installed!
end |
You have to replace the first line with your own registry key. Then you have to change the "installed" text with the value of the registration key, so you can check if it exists.
I hope I've helped enough... _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
marty Professional Member


Joined: 10 May 2001 Posts: 789
|
Posted: Tue May 13, 2003 5:19 pm Post subject: |
|
|
Hummm... Like MMBMedia v1.2 does?
And welcome to the VDS community... |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
SilverSurfer Newbie
Joined: 14 Mar 2003 Posts: 9
|
Posted: Tue May 13, 2003 7:16 pm Post subject: |
|
|
Haha Marty!
Yeah we know each other, from Multimedia Builder (MMB) Forums. Which is by the way, a fantastic Multimedia Authoring tool.
Marty,
I didn't knoe that MMBMedia had that functionality yet. I knoe you talked about adding it. That's great.
Skit,
Thankd for the info buddy.
VDS is a great development tool. I am sure it will be very useful for my multimedia applications.
SilverSurfer
PS
You guys need a lil VDS icon I can stick on my posts like MMB does.  |
|
| Back to top |
|
 |
marty Professional Member


Joined: 10 May 2001 Posts: 789
|
Posted: Tue May 13, 2003 11:02 pm Post subject: |
|
|
Yup try out MMBMedia v1.2 and let me know if its that kind of detection you want. If so Ill post it... Well hummm... Tell you what I will probably post the source code of MMBMedia v1.2. But you will need the VDSMEDIA extension (plugin) that Im selling to registered VDS users only.
Let me know if that interests you  |
|
| Back to top |
|
 |
SilverSurfer Newbie
Joined: 14 Mar 2003 Posts: 9
|
Posted: Wed May 14, 2003 5:05 am Post subject: |
|
|
Hey Marty,
I look forward to testing out MMBMedia v1.2 Thatnks for providing a MMB video temp fix until Bokzy made WidePlay for MMB.
I really like the detrction feature of MMBMedia v1.2 , but it doesnt include Acrobat Reader
I am downloading it right now.
| Quote: |
New features for version 1.2 of MMBMedia:
- Position and Duration timers
- Detection of Internet Explorer and its version
- Detection of Flash and its version
- Detection of DirectX and its version
|
SilverSurfer |
|
| Back to top |
|
 |
marty Professional Member


Joined: 10 May 2001 Posts: 789
|
Posted: Wed May 14, 2003 12:25 pm Post subject: |
|
|
As you probably know, MMBMedia was all done with VDS + my VDSMEDIA extension (Same as WidePlay, but for VDS).
So here is bits of code to get you started...
Detecting the Windows Media Control (WMP 6.4 runtime):
| Code: | if @not(@file(@windir(s)\msdxm.ocx))
Warn No valid Windows Media Player engine detected@cr()Please install Windows Media Player 6.4 or Higher.
end |
Detection Flash + version:
| Code: | :flashdetect
rem Checking for flash version 5.x
if @file(@windir(s)\Macromed\Flash\flash.ocx)
%%flashfile = @windir(s)\Macromed\Flash\flash.ocx
%%flashversion = @verinfo(%%FLASHFILE,X)
info yup Flash 5 is there and its version @verinfo(%%flashfile,X)
else
rem Checking for flash version 6.x
if @file(@windir(s)\Macromed\Flash\swflash.ocx)
%%flashfile = @windir(s)\Macromed\Flash\swflash.ocx
%%flashversion = @verinfo(%%FLASHFILE,X)
info yup Flash 6 is there and its version @verinfo(%%flashfile,X)
goto evloop
end |
Detecting IE + version:
| Code: | :iedetection
if @file(@windir(s)\shdocvw.dll)
%%ie = yes
%%iefile = @windir(s)\shdocvw.dll
rem info yup its there
end
goto evloop
:ieversion
if @file(@windir(s)\shdocvw.dll)
%%ieversion = @verinfo(@windir(s)\shdocvw.dll,X)
%%iefile = @windir(s)\shdocvw.dll
info IE version @verinfo(%%ieversion,X)
end
goto evloop |
Here ya go, thats what I have for you. As for Adobe, Ill try to find the VDS code I did a will back.
Those bits of code should help you get started
Have fun! If ever you buy me VDSMEDIA extension (which is a WidePlay version of VDS, gave Bokzy the idea to port VDSMEDIA to MMB), I'll give you the VDS source for MMBMedia... |
|
| Back to top |
|
 |
marty Professional Member


Joined: 10 May 2001 Posts: 789
|
Posted: Wed May 14, 2003 12:36 pm Post subject: |
|
|
Here is what I found for Adobe Acrobat. Please note this will detect if Adobe Acrobat is installed + the plugin version. If the user has only the plugin installed this bit of code will not work properly. You would need find in the registry the proper key for the plugin only. But it should help you get started
| Code: | %%adobepath = @regread( LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Acrobat.exe,Path)
if @not(@null(%%adobepath))
%%pdffile = %%adobepath\ActiveX\pdf.ocx
if @file(%%pdffile)
info yup its there and its version @verinfo(%%pdffile,X)
end
end |
|
|
| Back to top |
|
 |
SilverSurfer Newbie
Joined: 14 Mar 2003 Posts: 9
|
Posted: Wed May 14, 2003 3:37 pm Post subject: |
|
|
Hey Marty,
Thanks for all the great info!
One thing I should bring to your attention though, is the code you gave for Acrobat Reader. The path you provided is for Acrobat Full Version, and not Acrobat Reader. So the code works perfectly for Acrobat Full Version (which isn't free), but not for Acrobat Reader. To make the code work for Acrobat Reader (which is free), I just changed the path a bit. Since you probably only have the full version on your system, you didn't have the path for just Acrobat Reader. Just the last sub-key needed to be changed from Acrobat.exe to AcroRd32.exe.
| Code: |
%%adobepath = @regread( LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe,Path)
if @not(@null(%%adobepath))
%%pdffile = %%adobepath\ActiveX\pdf.ocx
if @file(%%pdffile)
info yup its there and its version @verinfo(%%pdffile,X)
end
end
|
This is such a newbie question, but what if the user did not have Acrobat Reader installed. How would I display a message box for that?
SilverSurfer |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed May 14, 2003 3:40 pm Post subject: |
|
|
| Code: | %%adobepath = @regread( LOCAL,SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe,Path)
if @not(@null(%%adobepath))
%%pdffile = %%adobepath\ActiveX\pdf.ocx
if @file(%%pdffile)
info yup its there and its version @verinfo(%%pdffile,X)
else
warn You don't have Adobe installed...
end
end |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
marty Professional Member


Joined: 10 May 2001 Posts: 789
|
Posted: Wed May 14, 2003 5:27 pm Post subject: |
|
|
your welcome! You see you found the solution for the plugin...
Hope this helps you out, and please let me know when your finished with your multimedia app..Just curious to see what you came up with
Espacially if you using MMB with VDS ... |
|
| Back to top |
|
 |
SilverSurfer Newbie
Joined: 14 Mar 2003 Posts: 9
|
Posted: Wed May 14, 2003 5:39 pm Post subject: |
|
|
Sure thing Marty. And thanks for the help.
I'll actually use the code in more than one MMB application. However, I have big project I have been wroking on for a long time now. It's totally awesome. I could send you a CD of the final product when its done. It has a video intro (10 second), a Flash movie, cool graphics, and bells and whistles.
SilverSurfer |
|
| Back to top |
|
 |
VDSuser Contributor


Joined: 21 Mar 2002 Posts: 58 Location: Somewhere in time
|
Posted: Wed May 14, 2003 5:46 pm Post subject: |
|
|
Good tips, guys. Here's another ...
Many software detection programs check for what's installed by what can be uninstalled.
The key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall lists the names of uninstallable software.
Keep in mind, though, that just because a registry value exists doesn't mean the program exists -- the proggie EXE could have been deleted from the program folder.
After you detect the location of the program via the registry, check the location folder to see if the software truly is there.  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
|