PDA

View Full Version : Demoshield running with CD ejected



SteveC86
05-16-2002, 02:38 PM
Is there any way to make Demoshield notice that the CD has been ejected, or quit when that happens? Our users are having problems. When the CD Start Demoshield file is running and they eject the CD, then they can't quit the demo (or do anything else.)

Is there a way to prevent them from ejecting the CD without quitting the demo first?

Can Demoshield auto-quit if the CD is ejected?

Thanks,
SteveC86

KimberlyH
05-16-2002, 04:49 PM
Unfortunately, DemoShield cannot detect if the user ejects the CD from the CD-Rom. However, to work around this issue, you may want to consider using the Multi-CD option with the CD Browser distribution. The Multi-CD option tells DemoShield to copy all files in the same directory as the DemoShield Player (demo32.exe) to the user's Temp directory and then DemoShield runs the demo from that location. Therefore, if the user where to remove the CD from the CD-Rom, the demo would continue to run properly and the user would be able to exit out of it when they want to.

I hope this helps.

Daniel.Tamone
05-17-2002, 08:31 AM
1. How do I set up the Multi-CD option?
2. If I have files that are needed on the CD (if I use Multi-Cd), how would I then link to them?

Thanks in advance.

KimberlyH
05-17-2002, 08:52 AM
The Multi-CD option can be selected from the CD Browser distribution when running through the Distribution Wizard. This is the only thing you will need to select to create a Multi-CD demo.

If you have files on the CD that are being reference from the demo (for example, a launch action is being used to launch an application off of the cd), then you can do one of the following:

1. If you select "Copy all files to the root drive on the CD", then the DemoShield Player (demo32.exe) will get placed on the root of the CD. With the Multi-CD option selected, all files in the same directory as the DemoShield Player, will get copied to the user's Temp directory. Therefore, since the DS Player is on the root, any file or folder on the root of the CD will get copied to the user's Temp directory. Therefore, the directory structure and launch actions would remain as they are.

2. If you do not want all the files on the CD to be copied to the user's Temp directory you could unselect the "Copy all files to the root drive on the CD". This will inturn create a Bin directory to hold the DemoShield Player (demo32.exe), the demo file (*.dbd), and any resources that have been Imported by Reference into the Resource Manager. Therefore, with the Multi-CD option selected, only the contents of the Bin directory will get copied to the user's Temp directory. If you have additional files on the CD that are being launched from the demo, the CD Token (<CD>) can be used to direct DemoShield to the first CD-Rom drive on the user's system to access the file. Therefore, the path to the launch action should look something like this: <CD>folder\filename.xxx<CD>

I hope this helps.

rbrinda
03-21-2003, 05:03 PM
I have a CD ROm and a CD writer. Which one would Demoshield detect when i run the multicd browser? What should i do if i have my cd in the cd writer and still want to be able to launch the CD browser using autorun? Please clarify my question as i have a product beta release scheduled next week.

I think the Multicd browser option has to be improved a _lot_. I am really disappointed with the way it works with DS7.5 now. I can't use the multicd browser off from network as it prompts for the exe to be launched everytime. Our QA tests it off network for each product build and it really is frustrating to build the cd browser twice one for each network and CD!! There has got to be a better way to handle this. perhaps when demo32.exe, .dbd and other files are copied to the local temp directory, Launch.exe should be able to pass the CD drive letter as a command line parameter to demo32.exe so that it will not require any CD token or any such thing. This way it will work well from both network and CD.

Thanks.

KimberlyH
03-26-2003, 04:55 PM
When using the Multi-CD option available with the CD Browser distribution, DemoShield will copy all files in the same location as the DemoShield Player (demo32.exe) to the end user's Temp directory and will run the demo from this location.

If the demo is set up to access files from the CD, the CD Token (<CD>) can be used to direct DemoShield to the first CD Drive on the user's system. However, if the user has the CD in a secondary drive, DemoShield will not go to the second drive to find the file specified in the launch action.

To work around this, one option is to perform a File Existence check, using the Condition Builder within an Event Object, to check the first CD Drive for the file. If DemoShield is able to find the file then a Launch action can be used to launch the desired application. If the file cannot be found a message can be set up to be shown informing the user to make sure the CD has been placed in the first CD Drive.

To do this, create an Event Object in the scene where the application will be launched.

Open the Properties to the Event Object and go to the Object Styles tab.

Select the Always Perform True Actions and delete this.

Click on New to activate the Condition Builder.

From the Condition Builder select the File Existence condition under the Condition Type drop down. The following will appear under Condition Description:

If file <filler> exists then
{
}
else
{
}

Click on the <filler> link. An edit field will appear under Condition Details for you to type the path to the file. Since you are checking if the file exists on the CD in the first CD Drive, the path should look the same as it is set up in the Launch action:

<CD>folder\filename.xxx<CD>

Click Apply once you have the path entered. The path will then be added to the Condition Description. Once you have this done, go to the Actions tab.

Under the Actions tab you will assign the actions you would like to occur based on whether the file can be located in the first CD Drive. If the file exists the True Actions will be triggered. Here you can assign a Launch action to launch the application from the demo. If the file does not exist the False Actions will be triggered. Here you can assign a Show action to show a Text Object or other Object that will display a message.

A Text Object can be used to inform the user that the file cannot be found. Create a Text Object on the scene. Enter the desired message and then unselect the Initial and Current Visible checkboxes under the General tab of the Properties.

To trigger the Event Object via a button click, you can set the Event Object outside of scene time and then use a Trigger Event action to trigger the Event. For additional information on how to set this up, please refer to the following Knowledge Base article:

Q105130 HOWTO: Creating a Button Object That Will Trigger an Event Object (http://support.installshield.com/kb/view.asp?articleid=Q105130)

I hope this helps.