[KLUG Members] Making Network Neighborhood Shortcuts

Michael Lueck mlueck at lueckdatasystems.com
Tue Jul 26 21:48:51 EDT 2005


In chatting with Dirk this evening about some of the Samba magic Adam was
showing us, Dirk expressed interest in force populating shortcuts in the
Network Neighborhood.

There are three pieces that cause these shortcuts to do their magic.

[1]
Folder created in %UserProfile%\NetHood\TheNameYouWant

[2]
Shortcut in that folder named "target.lnk" which is a shortcut to the network
resource

[3]
Desktop.ini file in that folder, copy from an existing one, this causes
Explorer.exe to use a Windows Explorer class to process the directory, thus do
magic...

Other than having the server name hard coded into the LNK file, it should be
safe to force feed these three resources into the UserProfile through automated
processes. Otherwise to make the server name dynamic, calling the the API to
create the LNK file would be required.

A while back I found some command line interface to change to these fancy
directories directly via using the {biglongnumber} method and I can't remember
what program exposed that possibility to me so I am off trying to remember
that. Then you could script things to these folder names via the class number
and not rely on environment variables as some of the fancy folders do not have
a nice environment variable way to get to them or a close parent like NetHood
in this case is just one level below a variable. Ah well... memory...


Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/



More information about the Members mailing list