Create and Edit a shortcut to a BAT file.
Keywords: Create Edit shortcut BAT file ShortcutMake ShortcutExtra
Question:
I am trying to create a shortcut to a .bat file in Windows 95. However it is not creating a .lnk file, instead it creates a .pif file. Why is this and how do I create the shortcut and modify the icon????Answer:
Yes your correct. In Windows 95 when you create a shortcut to a .BAT file, it actually creates a .PIF file instead of a .LNK file. Try creating the shortcut to the bat file manually, from within Windows 95, you'll see it creates a .PIF file...You can create the 'shortcut' to the .BAT, then edit the resulting .PIF, using the ShortCutExtra function.
Here is an example how.
dirchange("C:\temp") ShortcutMake("icon.lnk", "C:\WINDOWS\DESKTOP\WinBatch scripts\doall.bat","", "C:\WINDOWS\DESKTOP\WinBatch scripts\", @icon) ShortcutExtra("icon.pif", "Test", "^!j", "C:\WINDOWS\GRAYCAT.ICO", 0) exitNotice you must reference the .LNK extension when you create the shortcut with ShortCutMake, but once its created you will need to refeernce the .PIF extension, in ShortCutExtra.
Article ID: W14730Filename: Create and Edit a shortcut to a BAT file.txt