Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: shortcut shortcutmake shortcutedit refresh start menu update
Does anybody know why this happens? Can you tell me how to make the folder shortcuts appear without a restart?
mydir = strcat(ShortCutDir("Start Menu"),"Programs\WinBatch") bb=BinaryAlloc(2048) BinaryPokeStr(bb,0,mydir) dll=strcat(DirWindows(1),"shell32.dll") DllCall(dll, void:"SHChangeNotify", long:4096, long:1, lpbinary:bb, lpbinary:bb) Binaryfree(bb)This code will refresh the Start Menu.
How do I get Win95 to forget the previous shortcuts and re-read the files, short of re-booting?
I tried the suggested code (above) exactly except for the directory name (mydir). My directory is NOT the "start menu", but an entirely independent directory containing 28 shortcut files, (mydir = "C:\lis\Library Information System"). Any of the shortcuts that have been executed previously in this Win95 session continue to show through "properties", and to execute, the previous target, even though the .lnk files are changed (viewed with DIR, TYPE, and a Hex dump program). A re-boot refreshes all shorcuts to the .lnk files' contents, but is highly undesirable in my context. Other shortcuts (that have not been previously executed) are OK in the first place.
;revised code with short path name mydir = "C:\lis\Library Information System" myshortdir=FileNameShort(mydir) bb=BinaryAlloc(2048) BinaryPokeStr(bb,0,myshortdir) dllfile=strcat(dirwindows(1),"shell32.dll") DllCall(dllfile, void:"SHChangeNotify", long:4096, long:1, lpbinary:bb, lpbinary:bb) ;Message("Debug",BinaryPeekStr(bb,0,200)) BinaryFree(bb)
Article ID: W13856
Filename: Shortcuts to Folders Not Appearing.txt
File Created: 2001:11:07:12:44:24
Last Updated: 2001:11:07:12:44:24