Archive: Create shortcut to command windows with non-default layout


Create shortcut to command windows with non-default layout
I have an application that requires a shortcut to a command window (actually zsh.exe) with a non-default layout. I create the shortcut using:

CreateShortCut "$DESKTOP\shortcut.lnk" "$INSTDIR\zsh.exe" "-c script.zsh" "$INSTDIR\chip.ico" 0 SW_SHOWMAXIMIZED

When the (windows xp) shortcut to the command window is created it has a Layout tab that defines the Screen buffer size and the Window size. The buffer defaults to 80x300 and the Windows size defaults to 80x25. I found the four 16 bit integers for this data at offset 0x240C in the shortcut file but I have been unable to find any documentation on the "additional info" in the shortcut file format. Has anyone developed a plug-in to set the extended data in a comamnd window shortcut? Is this even possible since using FileOpen would I suppose open the target of the shortcut?


I don't think so. Even in C++ we've got the IShellLink interface available which only allows us to specify the same parameters as NSIS's CreateShortcut (actually, IShellLink is probably behind CreateShortcut).

-Stu