Saturday, April 7, 2007

Windows CE > How to create a shortcut

1) Create a new text file on your desktop machine and name it as you’d like (ex. Deskshort.txt).
2) Edit your Deskshort.lnk file by opening it with some text editor and including text consistent with the following:

[number of ASCII characters]#[The linked file path] [optional parameters]
3) In our example, the text entered in our .lnk file will read as follows:
22#”\Windows\Deskshort.exe
(*red text above represents 22 characters. Thus the “22#”)
4) Change the extension of the file you have just created to “.lnk” (will now read Deskshort.lnk).

5) Copy the Deskshort.lnk file to the release folder where build project is located
(\WINCE500\PBWorkspaces\ABC\RelDir\ABC_ARMV4I_Release)
6) Open platform.bib and add the following line in the FILES section of the file:
Deskshort.LNK $(_FLATRELEASEDIR)\Deskshort.LNK NK S
Save the changes and exit
7) Open platform.dat and add the following line:
Directory("\Windows\LOC_DESKTOP_DIR"):-File("MyShortcut.lnk","\Windows\Deskshort.lnk")
Save the changes and exit
8) Go back to workspace that will have the shortcut added into and select “Make Run-Time Image" from the Build OS drop down menu.
Resulting desktop will now have desktop.

2 comments:

Unknown said...

Or you can copy the .exe file you want a shortcut to, go to desktop and paste shortcut.
With touchscreens you do this with a long click.

Unknown said...

Tested on win ce 6.0