4

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 http://s5.postimg.org/d5gfx0bt3/pif_File_Shorckut.png

5
  • Why are you using a .pif in this day and age? Why not just use a standard .lnk? Oct 26, 2013 at 19:11
  • @techie007 no way, that's nothing to do with it at all
    – barlop
    Nov 9, 2013 at 1:11
  • @techie007 the question you link to is about a pinned icon, that is really a new lnk file. superuser.com/questions/665350/… he's just talking about changing the icon of a PIF file, and nothing pinned to the taskbar.
    – barlop
    Nov 9, 2013 at 1:21
  • This is difficult to reproduce because I think most of us don't have a pif file. I tried creating a blank file called a.pif but that doesn't even get the properties page to change icon. i.imgur.com/oSnHyUN.png perhaps you can add a pif file e.g. upload to the ge.tt site
    – barlop
    Nov 9, 2013 at 1:25
  • @barlop You're right -- I'm not sure that was intended to be put on this question. :? comment removed. Nov 9, 2013 at 4:27

2 Answers 2

3

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:

  1. Make a new batch (BAT) file.
  2. Inside it, put the path to the EXE you want to run (ie: c:\borlandc\bin\bc.exe).
  3. Save it someplace, like in the same folder as the EXE in question.
  4. Create a shortcut to the .BAT file you just made. It'll create a standard LNK shortcut to it.
  5. Change the Icon of that shortcut.
  6. Use copies of that new shortcut at will.

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:

image for Explorer

BC++ 16-bit on Win8 32-bit

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. :)

2
  • OMG - I've not seen that screen for the best part of over 20 years, and how odd the warning looks because at the time the install size was considered excessive. How it takes you back :) Nov 9, 2013 at 7:56
  • @CodeUniquely Yeah I used the setup.exe renamed to bc.exe, to avoid actually having to install it just for this question. :) Took me 5 minutes of googling to find these - pretty funny stuff. :) Nov 9, 2013 at 15:11
0

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:

  1. Make a new shortcut to %windir%\explorer.exe
  2. Right click that shortcut and choose Properties
  3. In the Shortcut tab, change the Target to: %windir%\explorer.exe "C:\path\dosprog.exe" where "C:\path\dosprog.exe" is the path and filename of the DOS program.
  4. Click or tap "Change Icon" and change it to an icon you would like. If there is a moricons.dll file in C:\Windows\System32, there are icons for older DOS programs there.
  5. Click and tap Apply and OK

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .