trying to create a local shortcut

Status
Not open for further replies.

weewun

In Runtime
Messages
160
Hi, im tryin to create a local shortcut... I am wanting to create a CD with multiple folders in it - and i want a shortcut in the root directory of the CD to point to a file hidden away in the folders. Becasue not all disk drives are the same letter i cant just put "D:\folder1\folder2\run.exe". what im looking for is something that looks for a folder relative to the shortcuts location...

cheers, weewun.
 
You could do this with the implementation of a batch file in the CD-Rom root:

Code:
@echo off
title Run Application

if exist "%cd%\Folder1\Folder2\run.exe" goto xExecute
goto xExit

:xExecute
"%cd%"\Folder1\Folder2\run.exe"

:xExit
exit

The only real limitation to this is that you cant customise the icon otherwise it does exactly what you'd like. However, you can convert the batch file into an executable program using Download Batch To Exe Converter 1.5 - A free and useful tool that will convert your batch files into exe files - Softpedia which allows you to specify an icon file.
 
Wow I have never heard of the batch to exe converter. That is really going to help me out with some future projects. Thanks NeoPlosive!

Ace
 
You could also do it with Autohotkey, which is (in my opinion) much better than batch scripts. It also comes with a compiler built in, so after the script is finished you can easily save it as an .exe
AND it's free :)

AutoHotKey Download

All you'd need to write is:

Run, run.exe, A_WorkingDir\Folder1\Folder2
 
Status
Not open for further replies.
Back
Top Bottom