Indigo Rose Software
  #1  
Old 04-02-2008
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
Detect QuickTime

This will not cover how to run the QuickTime installer because I could see people wanting to run this at different point during the install.

Here is a function that will detect the version of QuickTime. Place this in the Global Functions section of the software:

Code:
function ir_GetQuicktimeVersion()
	local bOK = true;

	--We're checking for Quicktime at this point . . .
	bOK = Registry.DoesKeyExist(HKEY_CLASSES_ROOT,"CLSID\\{02BF25D5-8C17-4B23-BC80-D3488ABDDC6B}\\InprocServer32");

	if (bOK) then
		strFileName = Registry.GetValue(HKEY_CLASSES_ROOT,"CLSID\\{02BF25D5-8C17-4B23-BC80-D3488ABDDC6B}\\InprocServer32","NoName",true);
		if (Application.GetLastError() ~= 0) then	
			bOK = false;
		end
	end


	--If a version was found, we now get the version information
	if (bOK) then
		verInfo = File.GetVersionInfo(strFileName);
		if(Application.GetLastError() ~= 0)then
			strVersion = "0.0.0.0";
		else
			-- OK, we have the file version
			strVersion = verInfo.FileVersion;
		end
	end
	
	--If there was no version found, bOK = false, and verison is set to "0.0.0.0"
	if (bOK ~= true) then
		strVersion = "0.0.0.0";
	end
	
	return strVersion;
end
Now to actually use this code you will have to call the function. In most cases you will want to do a version comparison on this. Here is some code to get you started:

Code:
strQTver = ir_GetQuicktimeVersion();
strTargetver = 5.0.0.0
     if String.CompareFileVersions(strQTver,strTargetver) == -1 then
          -- The installed version is less than 5.0.0.0
          -- Here is where you would run the installer for QT.
     end
Reply With Quote
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting Help - background music on/off after running Quicktime Kim21 AutoPlay Media Studio 7.5 Discussion 4 01-14-2008 06:35 PM
detect Acrobat Reader version dynamically andrewr AutoPlay Media Studio 5.0 2 05-20-2005 09:24 AM
Opening a QuickTime MOV File Desmond AutoPlay Media Studio 5.0 Examples 0 09-26-2003 02:35 PM
INFO: Using QuickTime Movies Support AutoPlay Media Studio 4.0 Examples 0 09-25-2002 04:42 PM
Detecting QuickTime Lynda Troka AutoPlay Menu Studio 3.0 1 01-02-2002 09:51 AM


All times are GMT -6. The time now is 01:08 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software