How can I change icon for a Shortcut to MS-DOS Program (.PIF) file ? I've tryed to right click then properties then Program then Change Icon then I chosed my .ico file and nothing change.
I reproduce the steps in this image
Ok I managed to get my hands on a genuine Borland C++ .pif.
As best I can tell Windows 8 shortcut/icon subsystem just doesn't support .PIFs anymore (probably due to Windows moving away from 16-bit support), at least in as much as displaying an icon for the file.
As you found, you can sort of apply a new icon in the properties, but it doesn't show in Explorer views or on the Desktop.
If you find the 16-bit EXE the PIF points at, and create a shortcut to it the usual way, it (Windows 8, 32-bit anyway) actually still makes a PIF(!) -- that you can't change the icon for. :/
Here's a work-around to get a shortcut to the 16-bit EXE, with a custom icon:
c:\borlandc\bin\bc.exe
).Note: If you don't know the file/path to the file the PIF actually points at, open the .PIF with a text editor (like Notepad), the path will be visible.
Results:
Note 2: I'm using Windows 8, 32-bit on this machine, and it had to install a DOS VM "Feature" to handle running the 16-bit EXE. I've not tested this under 64-bit Windows 8, so your results may vary. :)
As the above workaround no longer works in Windows 10, here's one which works in Windows 10 32-bit (version 21H2) to display a nicer shortcut icon for an older DOS (16-bit) program:
.pif
in this day and age? Why not just use a standard.lnk
?