Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150

    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

  2. #2
    Join Date
    Jul 2008
    Posts
    167
    Nice code, just that i want for my project

    Thank you very much.

Similar Threads

  1. Scripting Help - background music on/off after running Quicktime
    By Kim21 in forum AutoPlay Media Studio 7.5
    Replies: 4
    Last Post: 01-14-2008, 05:35 PM
  2. detect Acrobat Reader version dynamically
    By andrewr in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 05-20-2005, 08:24 AM
  3. Opening a QuickTime MOV File
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 01:35 PM
  4. INFO: Using QuickTime Movies
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 09-25-2002, 03:42 PM
  5. Detecting QuickTime
    By Lynda Troka in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 01-02-2002, 08:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts