2009-08-28

如何利用 InstallShield 於桌面建立網際網路捷徑?

於「Application Files」步驟中,右鍵點選「Destination Cumputer」,選取選單中的【Show Predefined Folder】→【DesktopFolder】。




點一下左邊的「DesktopFolder」,按〔Add Files〕加入網際網路捷徑檔(*.url)。




An Internet shortcut is just a text file with the .url extension. Here are the steps involved in creating such a shortcut:

1. Create a text file with the name of your desired Internet shortcut with extension TXT with the following contents:
[InternetShortcut]
URL=http://www.AddressOfYourShortcutTarget
IconFile=http://www.AddressOfYourIcon/NameOfYourIcon.ico

2. The IconFile attribute is optional, but can be used to specify the icon of your shortcut. Rename the extension of the shortcut file to be URL.

3. Add the URL file into your project as an ordinary file into the directory where the shortcut should be created. This could be a path based on one of the predefined folders such as [DesktopFolder] or [ProgramMenuFolder].

Please note: You cannot right-click and select Add File because InstallShield uses a standard Windows File Open dialog that automatically resolves shortcuts. Clicking Add File will try to add the Web site itself, which will not work. Similarly including any other shortcut with Add File will try to add the actual file that the shortcut points to. With drag-and-drop, however, one is given the raw file, and the shortcut itself will be included, not what it points to.

沒有留言: