Page 1 of 1 1
Topic Options
#48174 - 1999-09-21 01:25 PM Command line Shortcut creation?
Anonymous
Unregistered


Does anyone know a way to create a shortcut by commandline or rundll switch?
I have a logon script mapping home directories to h: and would like to create a shortcut to h: in the c:\windows\sendto folder so they can right click on a file and send it to their home dir. I've tried making a shortcut, copying it to the server and then copying down to the client machine, but apparently they're not portable. Any clues?

Top
#48175 - 1999-09-22 10:53 AM Re: Command line Shortcut creation?
Anonymous
Unregistered


I've run into the same problem. If you copy a shortcut from a 95 computer to an NT server, the shortcut is actually changed. The reason for this is because the shortcuts are not simply like the good old days of .pif files, they are not just files.. they are registry entries..

I do know that if you copy the shortcut from one 95 box to another then back again it will continue to function. Sorry I don't have the reg locations handy for how to create them.. maybe try creating a shortcut with a really unique name then doing a search in the reg...

Top
#48176 - 1999-09-24 01:59 AM Re: Command line Shortcut creation?
Anonymous
Unregistered


I need to say that, as MCP, I'm 1000% sure that a Shortcut is a file.
It's extension is .lnk, but the format of the file's for Win95 and WinNT are Very very different.. I don't know the format as it is a binairy format.

------------------
Lon Geefshuysen (MCP)
kixtart.to/lon
lon@kixtart.to


Top
#48177 - 1999-09-24 06:56 AM Re: Command line Shortcut creation?
Anonymous
Unregistered


What issue are you experiencing to make you say "apparently they're not portable"? There is a known issue with NT shortcuts created prior to SP4 where the shortcut not only saves the directory path("c:\killerdos\fdisk.exe") but also the UNC path ("\\mycoolserver\c$\killerdos\fdisk.exe"). when you copy the shortcut from 1 system to another, the UNC path still points back to the first system. Since the UNC path points to an admin share, a normal user wouldn't be able to run the shortcut. The fix is to get a copy of shortcut.exe from Microsoft - its on the Resource Kit (gee M$, I wonder why?!).

Darryl Jacoby, MCSE

Top
#48178 - 1999-09-24 08:01 AM Re: Command line Shortcut creation?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I would say it's more than an issue. This whole business is called "Link File Tracking" and it's a royal pain in the @$$. Luckily, on Windows NT workstation, you can disable it at...

KEY:HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

VALUE:LinkResolveIgnoreLinkInfo = 1

Like Darryl says, you can quickly create a link file by using the NTRESKIT shortcut.exe program. For example, to make a shortcut to notepad you specify ...

shortcut -t notepad.exe

It will create a file called notepad.lnk in you current directory. Unfortunately, shortcut.exe doesn't allow you to rename your link file or specify a target directory. But you can rename/move it later after it's created.

Shawn.



Top
#48179 - 1999-09-24 08:34 AM Re: Command line Shortcut creation?
Anonymous
Unregistered


I forgot to mention that SHORTCUT.exe can be used to also make an exisitng shortcut.lnk "stupid" (as in forget the UNC path).

Use shortcut.exe -c -s shortcutfilename.lnk
The -c says to change the shortcut, the -s means to make it stupid (really does say this if you do shortcut/?).

Darryl

Top
#48180 - 1999-10-03 06:01 AM Re: Command line Shortcut creation?
Anonymous
Unregistered


you can copy a shortcut
use the command prompt
this will forget the UNC

i konw it is not nice but it works

ps anybody knows when kixtart will create shortcuts with shortcutKey defined

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.052 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org