How to manualy create a custom shortcut?


  1. Posts : 5
    Windows 7 Ultimate x64
       #1

    How to manualy create a custom shortcut?


    Hi, I want to create a custom shortcut and by custom I don't mean the way you usually create shortcuts at, but how you create it from scratch. Like open notepad and write down a script to make it work like an ordinary shortcut.

    The reason I want to do this is because I have a large collection of music and for the moment I have to open, first my music directory then choose the artist directory then the album directory and finally the playlist file. The way I want it is instead of getting into the album directory I would just have a shortcut in the artist directory that will open the playlist and start the music. And I would even want to have a custom icon on the shortcut.

    Now you will probably say just create a shortcut like you would normally do and then change the icon. DONE!
    No the thing is that when I re-install my computer or if I get a new disc with new drive letters or just move my whole music directory the shortcuts will be corrupted cause windows own created shortcuts has the complete file path like "D:\Dokument\Egna Skivor\Deadmau5\For Lack Of A Better Name\00 For Lack Of A Better Name (Playlist).m3u". The way I want it is just "For Lack Of A Better Name\00 For Lack Of A Better Name (Playlist).m3u"

    I hope this describes my problem and that there is a way to solve it.
    Thanks Stellan
      My Computer


  2. Posts : 120
    7 Ultimate x64/7 Home Premium x64
       #2

    A shortcut is a means to get to a file without having to drill down through drives, folders, and subfolders in order to get to the file. However, it must have a complete path in order to work. The way that you describe won't work as a shortcut.
      My Computer


  3. Posts : 5
    Windows 7 Ultimate x64
    Thread Starter
       #3

    bbearren said:
    A shortcut is a means to get to a file without having to drill down through drives, folders, and subfolders in order to get to the file. However, it must have a complete path in order to work. The way that you describe won't work as a shortcut.
    Well I think it will work cause I have created desktop.ini files that shows a custom icon to the directory it self and that works. like this:


    [.ShellClassInfo]
    IconFile=Folder.ico
    IconIndex=0

    and this will also work

    [.ShellClassInfo]
    IconFile=For Lack Of A Better Name\Folder.ico
    IconIndex=0

    so why not with a shortcut?

    BTW Thanks for the fast reply
      My Computer


  4. Posts : 120
    7 Ultimate x64/7 Home Premium x64
       #4

    A shortcut "targets" a particular file through its path. Without the path, there is no "shortcut".

    You can create a shortcut to your music folder, and then create shortcuts within that folder to individual files. Then if you move the music folder, you only have to edit the path of that single shortcut.
      My Computer


  5. Posts : 5
    Windows 7 Ultimate x64
    Thread Starter
       #5

    Well I have managed to create a batch file to start the playlist in the way I described it looks like this:

    @echo off
    Start "Title" 2PM\Playlist.m3u

    The only problems now, is the icon that I would like to change and the fast pop up window that appears when using a batch file.

    any suggestions?
      My Computer


  6. Posts : 644
    Windows 7 home premium x64
       #6

    Oddly enough, make a shortcut to the batch file, then call it whatever you like and change the icon. You could put the batch file in the Music directory !
      My Computer


  7. Posts : 1,814
    XP / Win7 x64 Pro
       #7

    stellan90 said:
    Well I have managed to create a batch file to start the playlist in the way I described it looks like this:

    @echo off
    Start "Title" 2PM\Playlist.m3u

    The only problems now, is the icon that I would like to change and the fast pop up window that appears when using a batch file.

    any suggestions?
    This batch file would have to be stored in the same directory as the 2pm folder for this to work. Is that what you're doing here? If so, you've wandered from the initial request of wanting a shortcut to a file without having to go into the music directory, which it looks like you're doing here.
      My Computer


  8. Posts : 5
    Windows 7 Ultimate x64
    Thread Starter
       #8

    The only thing I am after is to don't have to enter the album directory It might sound silly but those two mouse clicks are the only thing I want to skip.

    This is how I have it today

    "D:\Document\Music\Artist\Album"
    The "playlist.m3u" is placed in the "Album" directory.

    This is what I want:
    I want a shortcut with a front-cover as an icon, to be stored in "Artist" directory that will open the "playlist.m3u" that is placed in the "Album" Directory.

    The shortcut have to work like the batch file that I created before, without the whole path just the one after the file like "Album\playlist.m3u" so that I can move my whole music folder wherever I want without the shortcut being currupted.

    Just for the record I have the icon file stored in the same place as the "playlist.m3u" that will say in the "Album" directory.

    I know this may sound unnecessary but please don't judge me for being lazy.
      My Computer


  9. Posts : 1,814
    XP / Win7 x64 Pro
       #9

    We're not judging you, simply clarifying what you want. Your original request was more vague than your clarification on what you actually wanted, so people's responses thus far about how you can't have a shortcut to something without an absolute path are correct. Now that you've clarified that you want it in the same directory and don't mind clicking 3 times to get there as long as you can save the last two clicks, it's certainly possible and easy to do, as you've already discovered.

    So, you've already got the batch file part figured out. Now, to run it invisibly, create a file called invisible.vbs in your Artist directory and copy/save this line into it:

    Code:
    CreateObject("Wscript.Shell").Run ""   & WScript.Arguments(0) & "", 0,   False
    Then, for each of your playlists, make a batch file for them with the following:

    Code:
    wscript.exe invisible.vbs "Start 2PM\Playlist.m3u"
    Double-clicking on each of those .bat files should launch the playlist without the command prompt window coming up. Try that out and let us know if it works. If not, we might need to alter a few things.
      My Computer

  10.   My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:08.
Find Us