WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Shortcut Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Stop Shortcuts from Searching

Keywords:   shortcuts search 

Another code snippet for LAN administrators. This one will stop shortcuts from searching. By default a shortcut SHOWS drive:\directory\program in it's properties it actually STORES \\server\share\directory\program. This is a bit of a bother if you want to use interchangable shares. For example I might have SERVER1 and SERVER2 sharing \moffice, and during logon I connect either server to l: By default the shortcut to start word will actually point to whichever server I installed from. If that server is for some reason not available, then word won't run, even though I have l:\msoffice\word.exe available.

The Snippet assumes that I am copying a link (SRCFILE) to a new link (TRGFILE).

	FS=FileSize(SRCFILE)
	BINBUF=BinaryAlloc(FS)
	BinaryRead(BINBUF,SRCFILE)
	BinaryPoke(BINBUF,21,1)
	BinaryWrite(BINBUF,TRGFILE)
	BinaryFree(BINBUF)
Offset 21 is 00 by default, 01 sets tracking off.

By the way, I haven't tried it, is there any reason why I can't do the following?

	FS=FileSize(SRCFILE)
	BINBUF=BinaryAlloc(FS)
	BinaryRead(BINBUF,SRCFILE)
	BinaryPoke(BINBUF,21,1)
	BinaryWrite(BINBUF,SRCFILE)	;;i.e. write over the file I just read
	BinaryFree(BINBUF)

Article ID:   W13858
Filename:   Stop Shortcuts from Searching.txt
File Created: 1999:04:15:16:56:52
Last Updated: 1999:04:15:16:56:52