PDA

View Full Version : Dependencies (Divx)


mitologys
04-26-2004, 06:28 AM
I want to put my project to detect if version 5.1.1 of the divx codec is instaled and to install it when does not detect nothing.
Is this possible ???

Another question, i read in the faq of am5 who to open a pdf from the acrobat file inside the cd, but if i use a webobject who can i do this. Open the acrobar reader inside the cd but using webobject´s.

Corey
04-26-2004, 11:09 AM
Hi. Yes you can do that, you'll just have to figure out which registry key corresponds to DIVx 5.1.1 and check that key. So a search here in the forums for more on how to do that, and also on the pdf thing, there's lots aorund here on that... :)

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

mitologys
04-27-2004, 06:29 AM
on preload ( of the first page)


result = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\Microsoft\ActiveMovie\devenum\{33D9A760-90C8-11D0-BD43-00A0C911CE86}\divx");
if result == 0 then
File.Run("AutoPlay\\Docs\\Divx 5.1.1\\DivXPro511Adware.exe", "", "", SW_SHOWNORMAL, false);
end

What´s wrong on this picture, why does not work ??

I want to detect if version 5.1.1 of the divx codec is installed, and already tried it on a machine without divx and nothing. what´s missing me

pjhiggins
04-27-2004, 07:32 AM
I don't have AMS on this PC to check it but as I recall your Registry.DoesKeyExist call results in a true or false response.

So I think it would be more like

result = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\Microsoft\ActiveMovie\devenum\{33D9A760-90C8-11D0-BD43-00A0C911CE86}\divx");
if result then
-- Play movie
else
-- Run Divx installer
end


Then again I could have it all wrong :wow



result = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "Software\Microsoft\ActiveMovie\devenum\{33D9A760-90C8-11D0-BD43-00A0C911CE86}\divx");
if result == 0 then
File.Run("AutoPlay\\Docs\\Divx 5.1.1\\DivXPro511Adware.exe", "", "", SW_SHOWNORMAL, false);
end

mitologys
04-27-2004, 02:02 PM
HKEY_LOCAL_MACHINE, "Software\Microsoft\ActiveMovie\devenum{33D9A760-90C8-11D0-BD43-00A0C911CE86}\divx");


this isn´t the reg for detecting divx, does anyone know´s who to detect divx ???

Please say something??

TJ_Tigger
04-27-2004, 02:11 PM
when I was working on a script to detect divx I looked in this key

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Me diaResources\icm\vidc.DIVX

I was also under the impression that you could look in _SystemFolder for the divx.dll and get the version number from that.

if (File.DoesExist(_SystemFolder.."\\divx.dll")) then
divxVersion = File.GetVersionInfo(_SystemFolder.."\\divx.dll")
Dialog.Message("Divx Version", divxVersion.FileVersion)
else
Dialog.Message("Notice", "File does not exist")
end

HKEY_LOCAL_MACHINE, "Software\Microsoft\ActiveMovie\devenum{33D9A760-90C8-11D0-BD43-00A0C911CE86}\divx");


this isn´t the reg for detecting divx, does anyone know´s who to detect divx ???

Please say something??

mitologys
04-27-2004, 04:32 PM
it´s very good and works but i need another thing to compare version´s.
This cd need´s to know what is the version and compare it.

What i want to do is the same as the dependencies (Ex. Acrobat detect´s version 4 or above, if it has version 3 the file is installed)
How can i make this to funtion with divx??
how to make something close

Brett
04-27-2004, 04:42 PM
Check out the action String.CompareFileVersions - I think it will do what you want.

mitologys
04-29-2004, 06:03 AM
if (File.DoesExist(_SystemFolder.."\\divx.dll")) then
divxVersion = File.GetVersionInfo(_SystemFolder.."\\divx.dll")
divxVersion2 = File.GetVersionInfo("AutoPlay\\divx.dll")
divxVersion3 = String.CompareFileVersions("divxVersion", "divxVersion2");

if divxVersion3 == 0 or divxVersion3 == 1 then

else
Dialog.Message("Information", "Version 5.1.1 must be installed", MB_YESNO, MB_ICONEXCLAMATION)
File.Run("AutoPlay\\Docs\\Divx 5.1.1\\DivXPro511Adware.exe", "", "", SW_SHOWNORMAL, true);
end

else
Dialog.Message("Information", "Install Divx", MB_OKCANCEL, MB_ICONEXCLAMATION)
File.Run("AutoPlay\\Docs\\Divx 5.1.1\\DivXPro511Adware.exe", "", "", SW_SHOWNORMAL, true);
end




I worte this and works (part of it) the midle code does not work (Blue), having divx 4 installed on a machine my detection doe not work, insteed
show´s my information "Dialog.Message("Information", "Install Divx", MB_OKCANCEL, MB_ICONEXCLAMATION)"

Does any one have any ideas ???

TJ_Tigger
04-29-2004, 07:56 AM
There are a couple of quick things. The File.GetVersionInfo returns a table so you need to specify the field of the table you want to use as the comparison. When you use the String.CompareVersion you will want to loose the quotes as you are trying to compare the variable and not actual strings.

Try something like this
if (File.DoesExist(_SystemFolder.."\\divx.dll")) then
strdivxVersion = File.GetVersionInfo(_SystemFolder.."\\divx.dll").FileVersion;
install = String.CompareFileVersions(strdivxVersion, "5.1.1");

if install == -1 then
counter = 0;
while counter < 3 do
result = Dialog.Message("Information", "A newer version of DivX must be installed in order to view these files.\r\nWould you like to install now?", MB_YESNO, MB_ICONEXCLAMATION);
if result == IDYES then
File.Run("AutoPlay\\Docs\\Divx 5.1.1\\DivXPro511Adware.exe", "", "", SW_SHOWNORMAL, true);
end
counter = counter +1;
end
end

else
counter = 0;
while counter < 3 do
result = Dialog.Message("Information", "Install Divx", MB_OKCANCEL, MB_ICONEXCLAMATION);
if result == IDOK then
File.Run("AutoPlay\\Docs\\Divx 5.1.1\\DivXPro511Adware.exe", "", "", SW_SHOWNORMAL, true);
end
counter = counter +1;
end
end