| View previous topic :: View next topic |
| Author |
Message |
Dave Heck Valued Newbie

Joined: 02 Mar 2002 Posts: 34 Location: Union, CT USA
|
Posted: Mon Jan 13, 2003 8:23 pm Post subject: Link Create Command |
|
|
Is there a way to create a Link to a Folder(Directory) or will the command only link to a file?
I need to be able to create a link to a folder called C:\MDL and cannot do it.
Link Create,C:\MDL,C:\Windows\Desktop,"Link to MDL" _________________ Dave Heck
dheck1961@cox.net
Union, Connecticut USA |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Jan 13, 2003 9:04 pm Post subject: |
|
|
Dave, get yourself cleaned up a bit and pick up around there. You're
really starting to look like a pig now.
Well, to the question here. A quick way to do this is to create a .url
file with the following structure:
| Code: | [InternetShortcut]
URL=C:\My Documents |
Name the file like "My Documents.url" and when the user double clicks
on it, the C:\My Documents folder opens.
The code to make this would be:
| Code: | List Create,1
List Add,1,[InternetShortcut]
List Add,1,URL=C:\My Documents
List Savefile,1,c:\windows\desktop\My Documents.url
List Clear,1
List Close,1 |
This isn't a 100% solution though. This works if the user has had MSIE
5.x or later installed, and I think the shell enhancements installed with
MSIE 5.x or later. This will work 100% on WinME, Win2k and WinXP as
they come by default with the proper shell enhancements, unless they've
had the shell enhancements removed.
THIS WILL NOT WORK ON MAC'S SYSTEM BECAUSE HE'S STILL IN
THE STONE AGE USING WINDOWS 95. And probably the very first
release of Windows 95, or an early beta release!
-Garrett |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Mon Jan 13, 2003 9:30 pm Post subject: |
|
|
You know, Microsoft officially discontinued all support for Windows 95 on December 31... not that that would matter to Mac.  |
|
| Back to top |
|
 |
Tsunami1988 Contributor


Joined: 15 Aug 2002 Posts: 70 Location: The Netherlands
|
Posted: Mon Jan 13, 2003 9:38 pm Post subject: |
|
|
| Hortalonus wrote: | You know, Microsoft officially discontinued all support for Windows 95 on December 31... not that that would matter to Mac.  |
Not if he's still using it
As for the question: If I search for "LINK" in my VDS 3.51 Help-file, I get this:
Syntax:
LINK CREATE, <filename>, <link path>, <link name> {, <icon path> {, <start directory> {, <arguments> }}}
Description:
The LINK CREATE command is used to create a shortcut to a program or file.
The <filename> is the name of the program or file that the shortcut will be a link to. The <link path> is the directory or folder in which the shortcut is to be created. The Windows desktop can usually be found at the path @WINDIR()
\Desktop. The Start menu is usually found at the path @WINDIR()\Start Menu. The <link name> is the description that will appear beneath the shortcut.
The <icon path> is optional. If present it gives the location of the icon that will be used for the shortcut.
The <start directory> is optional. If present it gives the starting directory that will be used.
The <arguments> parameter is also optional. If present, it specifies arguments on the command line of program <filename>. If commas are part of the arguments they should be enclosed in quotes.
If successful, a shortcut will be created with the path <link path>\<link name>.LNK. |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Jan 13, 2003 10:10 pm Post subject: |
|
|
Hmph! Well, when ya'll are pickin' on me an' ol' 95 - maybe
your other victims are gettin' a rest...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Dave Heck Valued Newbie

Joined: 02 Mar 2002 Posts: 34 Location: Union, CT USA
|
Posted: Tue Jan 14, 2003 1:55 am Post subject: |
|
|
Yeah yeah...lookin like a pig sty around here hahaha
Garrett - I tried your code and it works great - the only problem is that the application I'm creating (Installer for a 6 CDRom set of documents and databases) might be run on a Win95 or a Win98 machine that has an older version of IE.
What I'll do is look for the IE version and if it's 5.x or later I'll create the shortcut(URL), if not then I'll pop up an Info box telling them they will need to create it if they desire the shortcut.
Looks like something for the "wish list" for VDS, I was surprised that the Link Create command only did files and not folders.
Thanks for your help!! _________________ Dave Heck
dheck1961@cox.net
Union, Connecticut USA |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Jan 14, 2003 4:27 am Post subject: |
|
|
Mac, could you try the code I posted just for the heck of it? I'm sure it
won't do as it should, but just in case it does.
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Jan 14, 2003 9:03 am Post subject: |
|
|
Hey Garrett - it works fine with Win95 and IE4. Shouldn't it work
on any system that has URL file associations?
You can also save the URL file somewhere else, then link to it and
use any icon ya want (so it doesn't look like a browser link)...
__________________________________________________________________________________________________________________________
| Code: |
LIST CREATE, 1
LIST ADD, 1, "[InternetShortcut]"
LIST ADD, 1, "URL=C:\Program Files"
LIST SAVEFILE, 1, "c:\progfiles.url"
LIST CLOSE, 1
LINK CREATE, "c:\progfiles.url", @windir()\desktop, "My Programs", "e:\icons\mac.ico"
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Dave Heck Valued Newbie

Joined: 02 Mar 2002 Posts: 34 Location: Union, CT USA
|
Posted: Tue Jan 14, 2003 1:26 pm Post subject: Thanks to all |
|
|
Thanks to all for helping out with this...
Mac - great tip about creating the URL as Garrett posted, then creating a Link to it - makes me smack myself in the head and say "Why didn't I think of that ?"
and Garrett - thanks for showing how to create the URL - I had no idea that's all there was to it......but please quick pickin' on Mac....just 'cause he's using an unsupported OS doesn't make him a bad person hahahaha
Dave _________________ Dave Heck
dheck1961@cox.net
Union, Connecticut USA |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Jan 14, 2003 1:57 pm Post subject: |
|
|
Maybe this will work...
| Code: | | run @windir()\explorer.exe c:\folder |
|
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Jan 14, 2003 3:01 pm Post subject: |
|
|
| Skit3000 wrote: | Maybe this will work...
| Code: | | run @windir()\explorer.exe c:\folder |
|
That will just open the folder, not create a link for it. But of course your idea could be
expanded a bit:
| Code: |
%%desktop = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Desktop)
%%MyDocs = @REGREAD(CURUSER,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Personal)
link create,@windir()\explorer.exe,%%desktop,Shortcut test,,,%%MyDocs
if @ok()
info Link created!
else
info Link creation unsuccessful!
end
|
_________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Tsunami1988 Contributor


Joined: 15 Aug 2002 Posts: 70 Location: The Netherlands
|
Posted: Tue Jan 14, 2003 3:09 pm Post subject: |
|
|
| Skit3000 wrote: | Maybe this will work...
| Code: | | run @windir()\explorer.exe c:\folder |
|
Skit, Skit, Skit, didn't think you would give such a stupid answer  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Jan 14, 2003 5:02 pm Post subject: |
|
|
I know, I know.... I was @ school, and I only had 1 minute left and forgot to use the link function.... But it's the idea that counts! Cause now it's a lot easier to make that link!  |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Jan 14, 2003 7:57 pm Post subject: |
|
|
I wasn't sure if selecting a folder in a .url file would work on a standard
95 system. It's great to hear that it does. But it seems that icon used
is not what I get on ME and 2K, which is a folder icon. But that's ok,
because there's more code to that .url than what I showed you. You
can select the icon for the .url files, example follows:
| Code: | [InternetShortcut]
URL=C:\My Documents
IconIndex=3
IconFile=D:\WIN2K\SYSTEM32\SHELL32.DLL |
The following vds code would genereate the .url file:
| Code: | List Create,1
List Add,1,[InternetShortcut]
List Add,1,URL=C:\My Documents
List Add,1,IconIndex=3
List Add,1,IconFile=@WINDIR(S)\SHELL32.DLL
List Savefile,1,@WINDIR(S)\desktop\My Documents.url
List Clear,1
List Close,1 |
You can select what file the Icon comes from, and what index in the file
the icon is. The above code selects 4th icon in the shell32.dll in the
system directory. Or you can set a path to a single icon file and set the
index to 0 to use your own icon.
Mac, without sounding like I'm poking at you with this... Is there any
chance you can uninstall MSIE 4 and Install MSIE 3 and try the .url code?
-Garrett |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Jan 15, 2003 4:54 am Post subject: |
|
|
| Garrett wrote: |
Mac, without sounding like I'm poking at you with this... Is there any
chance you can uninstall MSIE 4 and Install MSIE 3 and try the .url code?
-Garrett |
Garrett, without sounding like I'm being obnoxious to you with this...
No.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|