forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Link Create Command
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Dave Heck
Valued Newbie


Joined: 02 Mar 2002
Posts: 34
Location: Union, CT USA

PostPosted: Mon Jan 13, 2003 8:23 pm    Post subject: Link Create Command Reply with quote

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
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Jan 13, 2003 9:04 pm    Post subject: Reply with quote

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! Laughing

-Garrett
Back to top
View user's profile Send private message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Mon Jan 13, 2003 9:30 pm    Post subject: Reply with quote

You know, Microsoft officially discontinued all support for Windows 95 on December 31... not that that would matter to Mac. Smile
Back to top
View user's profile Send private message Send e-mail
Tsunami1988
Contributor
Contributor


Joined: 15 Aug 2002
Posts: 70
Location: The Netherlands

PostPosted: Mon Jan 13, 2003 9:38 pm    Post subject: Reply with quote

Hortalonus wrote:
You know, Microsoft officially discontinued all support for Windows 95 on December 31... not that that would matter to Mac. Smile

Not if he's still using it Laughing

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Jan 13, 2003 10:10 pm    Post subject: Reply with quote

Hmph! Well, when ya'll are pickin' on me an' ol' 95 - maybe
your other victims are gettin' a rest... Razz Razz Razz Laughing

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Dave Heck
Valued Newbie


Joined: 02 Mar 2002
Posts: 34
Location: Union, CT USA

PostPosted: Tue Jan 14, 2003 1:55 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Jan 14, 2003 4:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Jan 14, 2003 9:03 am    Post subject: Reply with quote

Hey Garrett - it works fine with Win95 and IE4. Shouldn't it work
on any system that has URL file associations? Confused

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)... Wink
__________________________________________________________________________________________________________________________
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 Smile

_________________
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
View user's profile Send private message Send e-mail
Dave Heck
Valued Newbie


Joined: 02 Mar 2002
Posts: 34
Location: Union, CT USA

PostPosted: Tue Jan 14, 2003 1:26 pm    Post subject: Thanks to all Reply with quote

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 Very Happy

Dave

_________________
Dave Heck
dheck1961@cox.net
Union, Connecticut USA
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Jan 14, 2003 1:57 pm    Post subject: Reply with quote

Maybe this will work...

Code:
run @windir()\explorer.exe c:\folder
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Jan 14, 2003 3:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tsunami1988
Contributor
Contributor


Joined: 15 Aug 2002
Posts: 70
Location: The Netherlands

PostPosted: Tue Jan 14, 2003 3:09 pm    Post subject: Reply with quote

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 Razz
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Jan 14, 2003 5:02 pm    Post subject: Reply with quote

I know, I know.... Sad I was @ school, and I only had 1 minute left and forgot to use the link function.... Embarassed But it's the idea that counts! Cause now it's a lot easier to make that link! Wink
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Jan 14, 2003 7:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Jan 15, 2003 4:54 am    Post subject: Reply with quote

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. Razz Laughing

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group