ummm hmmm uh oh
where to begin
1) the function that i posted is a direct copy of maddmatt tut' function and it was posted purely as an example method. nothing has changed there at all ...
2) the reason that shortcuts are needed is the long file name issue (ie space in file names) is thus, when you use the scripting engine to execute a file name that is long and has spaces in any operating system newer than windows 98SE the scripting engine only sees up to the 8th character or to the first space.
STOP PRESS
now pay attention i will be asking questions later!!!
if you want to run a long file name you can use this trick. i learnt this by playing with the run box in windows. and looking at the code used to create shortcuts in languages like VB.
example executable :
C:\program files\microsoft office\office10\winword.exe
now due to the two spaces you would need to encapsulate the string in Quotes (single or double makes no difference)
ie : "C:\program files\microsoft office\office10\winword.exe"
the scripting engine then starts using the long filename and works like a dream..
finally ::::
if you want to launch a folder window then do this ... another trick learnt from the run box ./... windows explorer has some command line switches .. on of which allows you to specify how and where it opens.
so if you exec the following string
"explorer.exe c:\"
explorer will pop up with one pane (like my computer) at the root of your c drive, further more as with the long file names if you want to open a folder that has spaces or is over the 8 characters then do the following.
"explorer.exe 'C:\program files'"
thats the path encapsulated in single quotes and the exec string encapsulated in single quotes.
phew ...
now i hope that that has helped somebody out there, this has been tested on win98SE winME win2000 (workstation) and winXP Pro (although home is no different) on both NTFS and FAT32
i hope that this clears up any previous confusions but if not i will be posting my COMPLETE desktop in a zip file next week if anyone wants it?????? this has all the execs, MESSENGER ON THE DESKTOP WORKING.... hotmail and a SH*** load more
merry xmas
Mooz