PDA

View Full Version : Process file for Tokens writes blank file



vnuser
01-23-2002, 02:27 PM
Demoshield 7, File Resource = txt file created with notepad:
When using the Send-to file function with Process file for Tokens enabled, demoshield writes a blank file. If I change the resource to an rtf file resource created with wordpad, it parses the tokens correctly. Unfortunately the processed rtf file contains extra page codes which prevent me from creating a properly formatted .reg file to run regedit and add an entry into the users RunOnce registry key.
My demo detects and installs as needed a system service pack and an internet browser. Basically after a user installs a service pack, I need the demo to add a RunOnce registry entry to automatically start the demo again after the system reboots. I've got eveything working except parsing the <Path> token in the resource txt file. It keeps writing a blank file. Not even the non-token-ized data is written out to the file. However, if I create the file with wordpad and save as an rtf file, and import it under File Resource, it parses the <Global.Number1(Global)> token correctly but not the <Path> token. Is their an easier(or functional) way to have the demo start back up after a computer reboots such as: <Path>\DEMO32.EXE -vn15 Demo.DBD

KimberlyH
01-24-2002, 09:12 AM
Try creating your .txt file in WordPad. DemoShield often uses WordPad to send files to the printer as well as to process tokens.

I hope this helps.

vnuser
01-24-2002, 01:19 PM
Thanks Kim. This corrected the problem with parsing variable type tokens such as; <Global.Number1(Global)>. However, the <Path> token is not parsed. How can I print out to a file the full path the demo is running from?

KimberlyH
01-25-2002, 11:23 AM
Unfortunately, DemoShield does not parse the information for the Predefined Tokens. These tokens are used to direct DemoShield to the appropriate location to retrieve information for the demo.

I will forward this information on to our developers for consideration towards a future release.

All the best,

vnuser
01-25-2002, 01:24 PM
Thanks for your help. Perhaps adding a new feature to Send-To Registry like send-to file/printer/email would be a great improvement. This would be the easiest way to add a RunOnce registry key to start the demo back up after reboot.

KimberlyH
01-25-2002, 02:34 PM
You could perform a Send To action and send a registry file to the user's Temp directory. Then, perform a Launch Associated Application action to execute that file writing the key to the Registry. The path to the file should look something like this: <temp>filename.reg<temp>

I hope this helps.