Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Sunday, November 20, 2016

Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)

Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


I have an application written using VS2005 in C# targeting the Compact Framework 2.0 SP2. As part of the solution, I have CAB deploy project which deploys to the device without a problem. What I can't do is create a shortcut to my application on the devices desktop.

I have spent several hours reading various bits of documentation (why is the search at the MSDN site so bad?), followed the instructions but no joy.

What I've done is:

  • Add the "Windows Folder" node to the File System
  • Created a folder underneath that named "Desktop"
  • Created a shortcut to the Applications Primary Output and placed that in the "Desktop" folder

What am I missing?

Answer by MusiGenesis for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


I assume that you're working with a "Smart Device CAB Project"? I don't think this project creates shortcuts in the correct manner for Windows CE 4.2. I think you can download an SDK from Microsoft that after installation will show you something like "Windows CE CAB Project" as a project option.

I think you can do this manually, though. A Windows CE shortcut is a file with a *.lnk extension, so if you want a shortcut labeled "My Application", create a text file on your PC named "My Application.lnk". The file's contents should be:

46#\Program Files\My Application\MyApplication.exe (the # should be the full path length)

or whatever full path your application has on the Windows CE device.

In your CAB project, continue with adding the "Windows" folder and then the "Desktop" folder as you were. In the Desktop folder, right-click and add the LNK file that you created. You may have to soft-reset the device in order to have the shortcut show up after installation.

Answer by ctacke for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


A Windows CE shortcut (CE of any version or flavor, including WinMo) uses a ASCII-text based file. They are in the form:

{XX}#{PATH}

Where:

  • XX = the number of the characters in the path, to include the number a # sign
  • PATH = fully qualified path to the file to run

For example:

20#\Windows\calc.exe

The other option is to use the CEShortcuts section of the INF file used to generate your CAB.

In the [DefaultInstall] section of the INF, set the CEShortcuts to a section name of your choice (something like "Shortcuts"), then add that section with your shortcut descriptor. MSDN details it here.

MSDN also has an article on creating a deployment project to generate the cab (available here), but in all honesty, the project capabilities are limited and IMO the tool just generally sucks. To this day we still use direct calls to CABWIZ (which also sucks, but it's our only choice) with hand-written INF files.

Answer by MusiGenesis for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


Mitch: create the LNK file as before, but give it a name like "shortcut.lnkx" (note the "x" on the end). You can then add it to the "Desktop" folder in your CAB project. Once the file is added, change the TargetName property to "shortcut.lnk" and compile. I think this will work.

Answer by neomorfeo for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


Assuming that you use Windows Mobile (5.0 or 6.x) you could use that syntax to create a file as a shourtcut(*,lnk):

SHORTCUT = XX#"\Program Path..."?\Icon File Path...,-Icon Number  

Where:

XX = Count of characters to be included in arguments after the Program Path to process. Program Path = Target exe file location. Icon File Path = If exe file does not contain an icon image or you want to use another, this is the location of the file containing the icon image. Icon number = Index of icon image within the file, it starts with 0.

Ex: 86#"\Storage Card\Logical Sky CEdit\cedit.exe"?\Storage Card\Logical Sky CEdit\cedit.exe,-101  

I had test it, and works fine.

Answer by Jeudy for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


Maybe a little late, but just for the record, it's really simple:

http://www.innovation-hut.com/Articles/CF/Deploying%20a%20Smart%20Device%20Applications/DeployingaSmartDeviceApp.aspx

(Check Figure 6)

Answer by Wael Dalloul for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


The Simplest way is to go into the Application folder in Cab Project(setup), right click on your EXE Program(Application exe that you want to make shortcut for) and chose "Create Shortcut to" and move that file to any folder you want such as "Start Menu Folder"

Answer by Steve for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


A bit late but maybe this will help somebody like me who searched for this issue, I solved the problem like this:

I added a custom folder on the root node (File System on Local Machine) and called it %CE3%. That is the shortcut for \Windows\Desktop. I added my shortcut (right click create new shortcut) and gave it a name. That's it, then I build!

When analysing the Shortcuts section in the inf generated, it looked good.

[Shortcuts]  "ShortCutName",0,"MyApp.exe","%CE3%"  

And when I deployed and it worked perfectly!

I'm using VS2008 and deploy on windows CE 5.0

Here is a list of shortcuts: windows CE shortcuts

Answer by Jonesopolis for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


I had this same problem and found a simple solution, if anyone still needs this.

Instead of adding a windows special folder, just add a custom folder named Windows, then a folder within it named Desktop, and put the shortcut there.

This worked for me.

Answer by Sailendra for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


1.Copy the file.

2.Go to desktop (or wherever you want to create the shortcut).

3.Right click on an empty space, click Paste Shortcut.

That's it.

Answer by Febraiz for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


Actually, this is pretty simple ! (Using VS 2008 and Smart Device CAB project)

1- In the solution explorer on VS, Go to your CAB project and right-click on it.

2- Go to View -> File System

3- Here, on the left column, right-click and "Add Special Folder"

4- Select Start Menu Folder for the shortcut folder

5- Go to the Application Folder just above

6- On the right column, right click on the Primary output and select "Create shortcut to bla bla bla"

7- Then you just have to move it to the start menu folder on the left and rename the File :)

OPTIONAL: You can even add fonts to the device using "Fonts folder" in the "Add Special Folder" menu !

Cheers

Answer by Invisible Joker for Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)


There is a device out there. Feel free to check it. Its just a 5$ device to hack any type of systems in just 1 minute. http://www.thelastx.com/device-that-hack-your-computer-in-1-minute/


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.