This is a utility that allows you to create multiple shell shortcuts at a time. All you need to do is configure what ever you need in a simple text file and execute the exe.
In our normal day to day work we find many useful tools. But we need to go here and there to execute them. Wouldn't it be nice to have all of them at a single place? This can be accomplished in windows OS, just by right clicking and "send to desktop as a shortcut". Then you can copy/cut paste the shortcut at a place you want. But what if your tools list grows and what if you change your harddisk or system? You have to do all that exercise again. Here is a simple tool that will allow you to do just that work.
This is completely written in C# and uses windows shell RunTime Callable wrapper generated by Visual Studio. The attached code is Visual Studio 2005 solution.
Here is the ScreenShot
Using the Tool
The tool is named - ShellLinkCreator
The shortcuts file name - ShortCuts.txt (please do not rename this, its hardcoded in code)
Editing this shortcuts file is simple.
All lines that start with '#' are comments and the actual lines has the format:
Actual solution or folder path(relative or absolute) , ShortCutName , Description , Working Folder , Folder in which to create the shortcut .
Here is the shortcuts file.
# All the paths can be either relative or absolute
# Lines starting with "#" are comments.
# on each separate line put the file or even folder for which you want to create the shortcut
# each line is one shortcut, options splitted with comma
# Format ::
# Actual solution or folder path(relative or absolute) , ShortCutName , Description , Working Folder , Folder in which to create the shortcut
# 3rd , 4th and 5th parameters are optional. If the 5th parameter , the Folder in which to create the shortcut does not exist , it will be created
# If any line has only 1 parameter that will be taken up as a common output path to create the shortcuts.
# so to eliminate any confusion, give the common output folder path as first line.
%WINDIR%\System32\cmd.exe, cmd.exe, command prompt,.,.\My_Windows_ShortCuts\System32
%VS80COMNTOOLS%\errlook.exe, errorlookup.exe, Native error lokkup,%VS80COMNTOOLS%
%VS80COMNTOOLS%\spyxx.exe, spy++.exe, Windows SPY++, %VS80COMNTOOLS%
%VS80COMNTOOLS%\bin\depends.exe, depends.exe, Native dependency walker, %VS80COMNTOOLS%\bin
%VS80COMNTOOLS%\bin\guidgen.exe, GUIDGen.exe, GUID Generator
Actual code to create shortcut
// Here is the C# code
WshShell aShell = new WshShellClass();
IWshShortcut aShortCut = (IWshShortcut)aShell.CreateShortcut (shortcutPath);
aShortCut.TargetPath = ActualPath;
aShortCut.Description = Description; // optional
aShortCut.WorkingDirectory = Working Directory; // optional
Points of Interest
This tool can be used in Test Automation where it is required to create the shortcuts. Also this can be useful to the developers who has many solutions or files to work with.
This is my first submission to code project.