Tuesday, December 9, 2008

How to create .lnk files and test in device?

Useful in many scenarios:
some time we are asked to test in nokitl mode and with no UI available.
we may be provided only with a test app to test an dll file.
LNK file format: -
[length of string]#[command line]
example: to playback a testfile.avi file using test.exe which uses test.dll to playback the file
78#"\Storage Card\test.exe" "\Storage Card\test.dll" "\Storage Card\testfile.avi"
Have the above command in a text file and save it as .lnk extension, copy it to storage card
along with test.exe, test.dll and testfile.avi
Some time this may require some additional files to be present in Storage card. To know which files are requied, run the above test in Platform Builder Command line and see which all files are internally called and include all the files in the storage card.

Double click on the .lnk file to playback the file

Note 1: We can not have multiple commands in .lnk file and execute one command at a time only will work.
Note 2: We can execute the .lnk file present in device for a PC connected to device in Active sync using rapistart.exe
Note 3: Once you rename the .txt file to .lnk file you can't reopen in notepad again, so make sure you have a copy in txt format.

This are my experiences as a tester, for any comments and suggestions please mail me at drnath@hotmail.com