PDA

View Full Version : How do I get AMS4 to check for real player software?



Yazoo
09-22-2002, 06:36 PM
Hi guys, Please feel free to laugh your socks off at this newbie question.

How do I get AMS4 to check for and if not found; auto install real player software?

Many thanks for your time in this newbie matter.

---------------------------------------------------------

"The answer to any question is only easy if you have the answer...... Chris Tarrant 1998" WWTBAM

TJ_Tigger
09-24-2002, 10:40 AM
What file extension are you looking for Real Player to be able to play? There are a couple of schools of thought in doing this.

<font color=purple>One you can do a Registry.DoesKeyExist and search for the software key for Real Player. You can also look in HKEY_CLASSES_ROOT for the file extension to see if it is registered.</font color=purple>

<IR_ACTIONS_LIST>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>search for key</Comment>
</Action>
<Action name="Does Key Exist">
<Type>70</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%DoesKeyExist%</Variable>
<MainKey>3</MainKey>
<SubKey>SOFTWARE\Classes\Applications\RealPlay.exe</SubKey>
</Action>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>If the above variable is not true it will do the first item</Comment>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>!%DoesKeyExist%</Condition>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Real Player:</DialogTitle>
<DialogMessage>Real Player doesn't appear to be installed on your PC. To read this file, Real Player will need to be installed.</DialogMessage>
<Icon>3</Icon>
<Variable>%RPResult%</Variable>
<DialogType>2</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RPResult% = "OK"</Condition>
</Action>
<Action name="Execute">
<Type>8</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\realplayerinstallfile.exe</FileName>
<CommandLine/>
<WorkingDir/>
<RunMode>0</RunMode>
<WaitForReturn>1</WaitForReturn>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="Open">
<Type>7</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\file.rm</FileName>
<Verb>open</Verb>
<WorkingDir/>
<RunMode>0</RunMode>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
</IR_ACTIONS_LIST>

<font color=purple>Two you can do a File.GetDefaultviewer and search for an application to play the file extention you are wanting to play. That is why I asked for the file extension above. If no viewer exists you can offer to install real player using a dialog box.</font color=purple>

<IR_ACTIONS_LIST>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>Set a default value for our test</Comment>
</Action>
<Action name="Set Value">
<Type>6</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%RPviewer%</Variable>
<Value>NOTFOUND</Value>
<Evaluate>0</Evaluate>
</Action>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>Note: I've set the On Error user notification to "none" for the next action</Comment>
</Action>
<Action name="Get Default Viewer">
<Type>13</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>0</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Variable>%RPviewer%</Variable>
<FileExtension>.rm</FileExtension>
</Action>
<Action name="Comment">
<Type>202</Type>
<Function>2</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Comment>If RP is not found the variable %RPviewer% with remain as NOTFOUND and the player will be installed</Comment>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RPviewer% = "NOTFOUND"</Condition>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Real Player:</DialogTitle>
<DialogMessage>Real Player doesn't appear to be installed on your PC. To read this file, Real Player will need to be installed.</DialogMessage>
<Icon>3</Icon>
<Variable>%RPResult%</Variable>
<DialogType>2</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%RPResult% = "OK"</Condition>
</Action>
<Action name="Execute">
<Type>8</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\realplayerinstallfile.exe</FileName>
<CommandLine/>
<WorkingDir/>
<RunMode>0</RunMode>
<WaitForReturn>1</WaitForReturn>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="Open">
<Type>7</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<FileName>%SrcDir%\file.rm</FileName>
<Verb>open</Verb>
<WorkingDir/>
<RunMode>0</RunMode>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
</IR_ACTIONS_LIST>

TJ_Tigger
09-24-2002, 10:43 AM
Hi guys, Please feel free to laugh your socks off at this newbie question.



Now having said all of that, I think you were right to ask people not to laugh. I don't believe the Real Player is highly regarded for these types of projects. I have no preference, since I don't do a lot of video, but I am stating an observation based on past posts.

Corey
09-24-2002, 10:52 AM
As far as I know there is no legal way to auto-install real player.

Using Director with the Real asset Xtra you can create .exes which play back real content on machines which have no Real player though...

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