Link to home
Start Free TrialLog in
Avatar of Andy Brown
Andy BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Putting a shortcut onto the Desktop via a batch file

I have an Access application that is installed using the SageKey software app.  However, the front-end that everyone uses (as a loader) resides on a server.  This causes me a problem with the shortcut, since the software does not appear to allow you to point to the front-end on a server (it's fine if the front-end is on the local drive).

I have tried several ways to resolve this and the closest that I have come is through a batch file (code below).  I have created numerous shortcuts that work for each drive letter and for 32 or 64bit versions of Windows.  My batch file (in theory) will look for the front-end, if found it should determine if it is 32 or 64bit and then copy one of the the template shortcuts that I have created, to the users desktop.  I have given these stored shortcuts a .tmp extension.

However, on some installations it seems to work fine - but not on others.  I am extremely rusty on batch files and was hoping someone could help.
@ECHO OFF
if EXIST "C:\Users\Public\Desktop\" if EXIST "G:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Gx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "G:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Gx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "H:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Hx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "H:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Hx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "I:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ix86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "I:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ix64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "J:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Jx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "J:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Jx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "K:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Kx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "K:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Kx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "L:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Lx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "L:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Lx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "M:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Mx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "M:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Mx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "N:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Nx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "N:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Nx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "O:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ox86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "O:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ox64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "P:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Px86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "P:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Px64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "Q:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Qx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "Q:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Qx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "R:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Rx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "R:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Rx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "S:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Sx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "S:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Sx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "T:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Tx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "T:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Tx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "U:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ux86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "U:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ux64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "V:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Vx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "V:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Vx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "W:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Wx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "W:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Wx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "X:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Xx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "X:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Xx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "Y:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Yx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "Y:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Yx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "Z:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Zx86.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"
if EXIST "C:\Users\Public\Desktop\" if EXIST "Z:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Zx64.tmp"  "c:\users\%username%\Desktop\TeleStudio.lnk"


if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "G:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Gx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "G:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Gx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "H:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Hx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "H:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Hx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "I:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ix86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "I:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ix64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "J:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Jx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "J:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Jx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "K:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Kx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "K:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Kx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "L:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Lx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "L:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Lx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "M:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Mx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "M:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Mx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "N:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Nx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "N:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Nx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "O:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ox86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "O:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ox64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "P:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Px86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "P:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Px64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "Q:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Qx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "Q:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Qx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "R:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Rx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "R:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Rx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "S:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Sx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "S:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Sx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "T:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Tx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "T:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Tx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "U:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ux86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "U:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Ux64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "V:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Vx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "V:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Vx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "W:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Wx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "W:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Wx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "X:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Xx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "X:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Xx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "Y:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Yx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "Y:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Yx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "Z:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x86  copy "C:\ProgramData\CLTD\TS\Shortcuts\Zx86.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"
if EXIST "C:\Documents and settings\All Users\Desktop\" if EXIST "Z:\TS\Data Access\TS\TS.mdb" IF %PROCESSOR_ARCHITECTURE%==x64  copy "C:\ProgramData\CLTD\TS\Shortcuts\Zx64.tmp"  "C:\Documents and settings\All Users\Desktop\TeleStudio.lnk"

Open in new window

Create-Shortcut.txt
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andy Brown

ASKER

That's much nicer, i'll give it a try - Thank you.
When driveletters can be different, why use a driveletter?

Could you not just create two %Processor-architecture%.lnk shortcuts that point to a \\server\share\app\executable.exe ?
Really sorry for the delay in getting back to you - that put me on the right lines.

All the best.