INF and Shortcuts command line switch

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Craig (news_at_craigpay.com)
Date: 09/16/04


Date: 16 Sep 2004 07:55:51 -0700

Ok, here's a challenge for you. I want to create a CAB file using
CabWiz and INF that creates a Shortcut in the \Windows\StartUp folder
to the following...

"\Program Files\MyApp\MyApp.exe" -h

I could do this by manually creating an LNK file with the right path
and use CabWiz to copy the LNK file to that location.

However, this doesn't support none-English devices, so I should use
[Shortcuts] instead... but this doesn't let me add the all important
'-h' switch.

Any ideas?

TIA

Craig

[Version]
Signature="$Windows NT$"
Provider="My Company"
CESignature="$Windows CE$"

[CEStrings]
AppName="MyApp"
InstallDir=%CE1%\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Shortcuts, StartUp
CopyFiles=Files.Common

[SourceDisksNames]
1=,"Common1",,"C:\Documents and Settings\My Documents\Visual Studio
Projects\MyApp\obj\Release\"

[SourceDisksFiles]
MyApp.exe=1

[DestinationDirs]
Files.Common=0,%InstallDir%
StartUp=0,%CE4%
Shortcuts=0,%CE2%\Start Menu

[Files.Common]
MyApp.exe,,,0

[Shortcuts]
%AppName%,0,MyApp.exe,%CE11%

[StartUp]
%AppName%,0,MyApp.exe



Relevant Pages

  • Re: No icon when deploying cab-file
    ... This is the contents of the INF file: ... [SourceDisksNames] ... How do I go about for creating an icon? ...
    (microsoft.public.pocketpc.developer)
  • Re: Shorcut Problem in batch file
    ... this happens with any .lnk file? ... >> Can't you just recreate the shortcut? ... >> Do other shortcuts to other applications work okay? ... >> Ray at work ...
    (microsoft.public.win2000.general)
  • Re: OpenFileDialog.DereferenceLinks property does not work?
    ... (e.g. shortcuts to folders), should proceed with navigation to target but it ... Instead this LNK file is returning. ... > Hi Yuri ...
    (microsoft.public.dotnet.languages.vb.controls)
  • Re: Pocket PC Short cuts
    ... There are 8 spots for fixed shortcuts. ... the MRU applications and get assigned dynamically by ... Program Manager, Windows Mobile Developer Experience ... > try to copy a news .lnk file to Windows/Start Menu folder it disappears ...
    (microsoft.public.pocketpc.developer)
  • Re: How to deploy application under ppcs programs folder?
    ... Use %CE1% in your INF file (CAB definition file) ... [DestinationDirs] ... [SourceDisksNames] ...
    (microsoft.public.windowsce.embedded.vb)