View Full Version : How to create a shortcut to a folder
mattspew
09-13-2007, 03:43 AM
I feel like I'm taking dumb pills.. This was very simple in the previous version.
I'm trying to create a shortcut to a folder in the start menu.
Startmenu --> Programs --> App-folder --> /shortcut to a folder/
For the file of me I can't work it out.
I can create a shortcut to a file no worries, but this one is just ****ing me off.
I just want a simple shortcut inside the start menus app-folder that links opens a folder in programs folder.
mattspew
09-13-2007, 03:49 AM
Trying to use everything I can think off..
Shell.CreateShortcut("%AppShortcutFolderName%", "Movies", "%AppFolder%\\Movies", "", "", "", 0, SW_SHOWNORMAL, nil, "");
Shell.CreateShortcut("%AppShortcutFolderName%", "Documents", "%AppFolder%\\Documents", "", "", "", 0, SW_SHOWNORMAL, nil, "");
jassing
09-13-2007, 11:59 AM
Something like this?
Folder.Create( SessionVar.Expand("%AppFolder%\\MegaFolder") );
Shell.CreateShortcut(SetupData.GetAppShortcutFolde rPath(), "My Folder Shortcut", SessionVar.Expand("%AppFolder%\\MegaFolder"), SessionVar.Expand("%AppFolder%\\MegaFolder"), SessionVar.Expand("%AppFolder%\\MegaFolder"), "", 0, SW_SHOWNORMAL, {}, "");
mattspew
09-13-2007, 06:27 PM
Thanks mate... I only needed the second line. The folder in created during the install.
Shell.CreateShortcut(SetupData.GetAppShortcutFolde rPath(), "Movies", SessionVar.Expand("%AppFolder%\\Movies"), SessionVar.Expand("%AppFolder%\\Movies"), SessionVar.Expand("%AppFolder%\\Movies"), "", 0, SW_SHOWNORMAL, {}, "");
Not sure why they've made v7 so complicated. Version 6 was so simple.
Now I just need to work on sorting the icons..
jassing
09-13-2007, 07:36 PM
Thanks mate... I only needed the second line. The folder in created during the install.
You're welcome -- I provided the 1st line for "completeness" so you could just run the code & verify it worked.
Not sure why they've made v7 so complicated. Version 6 was so simple.
V7 isn't an 'upgrade' to v6, it's a whole new product -- the learning curve is steep to pick up the scripted way, but it's SO MUCH more powerful -- and once you "get it" it really becomes very easy to use. I have a handful of v6 installers I need to maintain (customers don't want to pay me to convert it) -- and each time I have to work in v6, all I can think of is "How did I think this was better?" v7 is the way to go! I'm now converting any of my customers for 'free' if they wish just so I can have an easier time of the regular upkeep.
Now I just need to work on sorting the icons..
What do you need to sort out? Post a new thread if you need more help!
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.