开发者

Is it possible to create a shortcut to a folder with InstallShield 2010?

I'm using an InstallShield 2010 InstallScript project. I want to make a开发者_StackOverflow shortcut to a folder.

I've tried setting the Target to path of the folder. This creates a shortcut but it has a Target Type of FILE. How can I create a shortcut to the folder with a Target Type of FOLDER?


I have not found a way to make a Folder type shortcut, but I did find a pretty good workaround.

What you can do is to make a file link to explorer with a command line argument of the folder you want to open.

Target: %SYSTEMROOT%\explorer.exe
Arguments: "<TARGETDIR>\My Folder"


UPDATE for InstallShield 2012 Limited Edition:

  1. On the project navigation panel on the left, Open the tab "3. Configure the Target System" + "Shortcut and Folders"

  2. Right button on existing shortcuts: Click on option "New Shortcut to Preexisting file"

  3. On the right panel (detail properties):
    Target= [WindowsFolder]explorer.exe
    Arguments= [MyPicturesFOlder]MyNewFolder

The new link will open up in MyNewFolder in user's pictures folder !

Many thanks to msergeant !


I found that the workaround with explore.exe has some side-effects. It does create a functional shortcut to the target folder, but in my case (IS 2010, Windows 7 64-bits) it creates in a 'roaming' directory...

C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\companyname

... instead of the usual directory:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\companyname

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜