|
Home > Archive > dBASE Programming > January 2007 > Programmatically "create shortcut"
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Programmatically "create shortcut"
|
|
| Jan Hoelterling 2007-01-09, 1:31 am |
| Hi folks,
is there a way to programmatically create shortcuts? My situation is that
each workstation in a network may be pointing to the server (where the EXE
and the tables are stored) using a different drive, so I would need a way to
programmatically create appropriate shortcuts.
Any suggestions welcome...
Jan
| |
| David Stone 2007-01-09, 1:31 am |
| Jan Hoelterling wrote:
> Hi folks,
>
> is there a way to programmatically create shortcuts? My situation is that
> each workstation in a network may be pointing to the server (where the EXE
> and the tables are stored) using a different drive, so I would need a way to
> programmatically create appropriate shortcuts.
>
> Any suggestions welcome...
Jan, FWIW, a thread from a few years ago.
David
From georgia@focus.net.mk Mon Dec 30 14:29:38 2002
Hi,
Does Windows (95/98/Me/2K) provide API function(s)
to manage (create, change, delete ...) shortcuts?
Any help is appreciated.
Happy Holidays, EveryOne!
Greetings from Macedonia.
Vinko
From dbase@autotraker.com Mon Dec 30 19:29:31 2002
/*
check to see if any of these files exists in the system directory
and if so, use it to create a shortcut.
"STKIT432.DLL" "VB6STKIT.DLL" "VB5STKIT.DLL"
Either wrap the below externs in a try/catch to find one
that works or search for the existance of one of these DLLs
*/
extern cLong fCreateShellLink4(;
cString,; // lpstrFolderName
cString,; // lpstrLinkName
cString,; // lpstrLinkPath
cString; // lpstrLinkArgs
) "STKIT432.DLL" from "fCreateShellLink"
extern cLong fCreateShellLink5(;
cString,; // lpstrFolderName
cString,; // lpstrLinkName
cString,; // lpstrLinkPath
cString; // lpstrLinkArgs
) "VB5STKIT.DLL" from "fCreateShellLink"
extern cLong fCreateShellLink6(;
cString,; // lpstrFolderName
cString,; // lpstrLinkName
cString,; // lpstrLinkPath
cString,; // lpstrLinkArguments
cLong,; // fPrivate
cString; // sParent
) "VB6STKIT.DLL" from "fCreateShellLink"
// In the below examples, replace fCreateShellLink with
// the extern from above that works
// Add to Desktop
lReturn = fCreateShellLink("..\..\Desktop", ;
"Shortcut to Calculator", "c:\Windows\system32\calc.exe", "")
// Add to Program Menu Group
lReturn = fCreateShellLink("", "Shortcut to Calculator", ;
"c:\Windows\system32\calc.exe", "")
// Add to Startup Group
// Note that on Windows NT, the shortcut will not actually appear
// in the Startup group until your next reboot.
lReturn = fCreateShellLink("\Startup", "Shortcut to Calculator", ;
"c:\Windows\system32\calc.exe", "")
******
Do a search on fCreateShellLink on Google for more help
Also check out Windows Scripting host. It has even more abilities.
WshShell=new OleAutoClient("Wscript.shell")
oMyShortcut=WshShell.CreateShortcut(ShortcutName)
I have a custom control some place that wraps these functions.
If I can find it I'll post it to the binaries.
--
Rich...
www.autotraker.com
AutoTraker Inc.
"Vinko" <georgia@focus.net.mk> wrote in message
news:auqh84$374$1@news.dbase.com...
> Hi,
>
> Does Windows (95/98/Me/2K) provide API function(s)
> to manage (create, change, delete ...) shortcuts?
>
> Any help is appreciated.
>
> Happy Holidays, EveryOne!
> Greetings from Macedonia.
> Vinko
>
>
>
From georgia@focus.net.mk Tue Dec 31 15:43:16 2002
Hi Rich,
I tried using "STKIT432.DLL" and extern function you described.
It worked.
Thank you very much.
Happy holidays Rich. Good luck.
Vinko
From dbase@autotraker.com Sun Jan 05 07:25:23 2003
> I tried using "STKIT432.DLL" and extern function you described.
> It worked.
> Thank you very much.
> Happy holidays Rich. Good luck.
> Vinko
You are welcome.
Happy holidays to you also.
--
Rich...
www.autotraker.com
AutoTraker Inc.
From george.omoregie@worldnet.att.net Sun Jan 12 06:06:08 2003
I am looking for these files, stkit432.dll, vb6stkit.dll. I got them
from some web sites, keep getting error in zip. I had luck with the
vb5skit.dll. Please FA these files to me .
Thanks.
George T. Omoregie.
AutoTraker wrote:
>/*
>check to see if any of these files exists in the system directory
>and if so, use it to create a shortcut.
>"STKIT432.DLL" "VB6STKIT.DLL" "VB5STKIT.DLL"
>Either wrap the below externs in a try/catch to find one
>that works or search for the existance of one of these DLLs
>
From ronnie@high-lugtonridgeKILLSPAM.co.uk Sun Jan 12 11:14:05 2003
In article <3E217650.5030709@worldnet.att.net>, George Omoregie says...
> keep getting error in zip.
.... and you still think there's no problem with your setup ? <gd&r>
--
Ronnie MacGregor
Scotland
Ronnie@High-LugtonridgeKILLSPAM.co.uk
| |
| Jan Hoelterling 2007-01-09, 1:31 am |
| Thanks, David. The reference to the Windows scripting host did it for me.
What a useful little critter - I really need to learn more about it!
Jan
| |
| David Stone 2007-01-09, 1:31 am |
| Jan Hoelterling wrote:
> Thanks, David. The reference to the Windows scripting host did it for me.
Thanks for testing! ;-) Nice to know it works.
> What a useful little critter - I really need to learn more about it!
Yeh, me too...seems to be a shortcut to a lot of very useful
functions/info. OTOH, the Wiki entry on WSH mentions that because WSH
is virus-programmable that many people turn it off. That would seem to
be the downside of using it in a distributed app.
David
| |
| Garry Christensen 2007-01-09, 1:31 am |
| G'day Jan,
Just a heads-up about the .ini file. You may already have this under
control but when you app starts, it will write the default location of the
tables in the .ini, including the drive. If the drive letter is valid on
the second machine, you'll get an error. Set the properties of the .ini to
read-only before the path is set.
See Ya,
Garry
"Jan Hoelterling" <jan@hoelterling.com> wrote in message
news:fTT12tuLHHA.1128@news-server...
> Hi folks,
>
> is there a way to programmatically create shortcuts? My situation is that
> each workstation in a network may be pointing to the server (where the EXE
> and the tables are stored) using a different drive, so I would need a way
> to programmatically create appropriate shortcuts.
>
> Any suggestions welcome...
>
> Jan
>
>
|
|
|
|
|