{"id":9516,"date":"2024-10-12T21:17:10","date_gmt":"2024-10-12T21:17:10","guid":{"rendered":"https:\/\/www.hexacorn.com\/blog\/?p=9516"},"modified":"2024-10-12T22:31:40","modified_gmt":"2024-10-12T22:31:40","slug":"the-sweet16-the-oldbin-lolbin-called-setup16-exe","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2024\/10\/12\/the-sweet16-the-oldbin-lolbin-called-setup16-exe\/","title":{"rendered":"The Sweet16 &#8211; the oldbin lolbin called setup16.exe"},"content":{"rendered":"\n<p>I don&#8217;t even know how to start. I wrote about old <a href=\"https:\/\/www.hexacorn.com\/blog\/2017\/10\/14\/beating-shields-of-edr-with-the-16-bit-setup\/\" data-type=\"post\" data-id=\"4352\">InstallShield<\/a> setup before, and today&#8217;s topic is very similar &#8211; the old, yet still present setup file residing (on Win10, 11) in the following location:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c:\\windows\\SysWOW64\\setup16.exe<\/pre>\n\n\n\n<p>Running it gives us this misleading message box #1:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"355\" height=\"152\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_1.png\" alt=\"\" class=\"wp-image-9519\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_1.png 355w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_1-300x128.png 300w\" sizes=\"(max-width: 355px) 100vw, 355px\" \/><\/a><\/figure>\n\n\n\n<p>After quick study of setup16.exe code I was able to determine what command line arguments it needed and then craft a simple example LST config to act as my setup file.<\/p>\n\n\n\n<p>The program accepts the switch -m that allows us to pass a name of an alternative LST file to it, so we can run a command like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c:\\windows\\SysWOW64\\setup16.exe -m c:\\test\\test.lst<\/pre>\n\n\n\n<p>Creating a dummy file c:\\test\\test.lst and running the test we get this misleading message box #2:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"391\" height=\"152\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_2.png\" alt=\"\" class=\"wp-image-9520\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_2.png 391w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_2-300x117.png 300w\" sizes=\"(max-width: 391px) 100vw, 391px\" \/><\/a><\/figure>\n\n\n\n<p>After analyzing the code a bit more and then looking at some very old examples of LST files that can be found online I was able to quickly create a test file that worked&#8230;<\/p>\n\n\n\n<p>Additionally, I discovered that we can use -QT argument to run the program in a QUIET mode (no dialog box, no error messages).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c:\\windows\\SysWOW64\\setup16.exe -m c:\\test\\test.lst -QT<\/pre>\n\n\n\n<p>This is the first working LST I have created:<\/p>\n\n\n\n<ul>\n<li>c:\\test\\test1.lst<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">[Params]\nTmpDirName = foo\nTmpDirSize = 100000\nFirstCabNum = 1\nLastCabNum = 1\nDrvWinClass = foo\nCmdLine = foo\nWndTitle = foo\nWndMess = foo\nCabinetFile = foo\nInsertCDMsg = foo\nInsertDiskMsg = foo\nBackground = ..\\..\\..\\windows\\system32\\calc.exe<\/pre>\n\n\n\n<p>This is not a proper config per se, because it just provides a number of mandatory fields that are filled-in with dummy values, and it does not have the &#8216;Files&#8217; section that is kinda mandatory, because it lists &#8216;installable&#8217; files. The reason it still works is, because it leverages a &#8216;background&#8217; feature that forces the setup16.exe program to relaunch a new setup program using a command specified in a &#8216;background&#8217; field, and in this case, our new setup is just a Windows Calculator.<\/p>\n\n\n\n<p>There is obviously more ways to launch programs via the LST file f.ex. by using the snippet similar to the one shown below. This time we rely on a &#8216;proper&#8217; program execution field which is &#8216;CmdLine&#8217;. It is important to mention that the value of this field is interpreted as a relative path to the path of the working directory of the installer, so I added a few &#8216;..\\&#8217; to traverse the path back to the root of the drive, so we can then use a full path to reference Windows Calculator we launch for testing purposes.<\/p>\n\n\n\n<p>Here&#8217;s the content of file:<\/p>\n\n\n\n<ul>\n<li>c:\\test\\test2.lst<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">[Params]\nTmpDirName = foo\nTmpDirSize = 100000\nFirstCabNum = 1\nLastCabNum = 1\nDrvWinClass = foo\nCmdLine = ..\\..\\..\\windows\\system32\\calc.exe\nWndTitle = foo\nWndMess = foo\nCabinetFile = foo\nInsertCDMsg = foo\nInsertDiskMsg = foo\n[Files]\ntest2.lst = test2.lst<\/pre>\n\n\n\n<p>The animation of two scenarios in action is shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16.gif\"><img decoding=\"async\" loading=\"lazy\" width=\"559\" height=\"622\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16.gif\" alt=\"\" class=\"wp-image-9517\"\/><\/a><\/figure>\n\n\n\n<p>It&#8217;s worth covering a few more quirks of this program.<\/p>\n\n\n\n<p>One is the silly way it appends the &#8216;LST&#8217; to the file names passed to the program via the -m command line argument.<\/p>\n\n\n\n<p>When we invoke the program like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c:\\windows\\SysWOW64\\setup16.exe -m c:\\test\\foo<\/pre>\n\n\n\n<p>we will get a very confusing message #3:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_3.png\"><img decoding=\"async\" loading=\"lazy\" width=\"388\" height=\"152\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_3.png\" alt=\"\" class=\"wp-image-9521\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_3.png 388w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_3-300x118.png 300w\" sizes=\"(max-width: 388px) 100vw, 388px\" \/><\/a><\/figure>\n\n\n\n<p>For a similar invocation:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c:\\windows\\SysWOW64\\setup16.exe -m c:\\test\\foo.<\/pre>\n\n\n\n<p>we get a less confusing message #4:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_4.png\"><img decoding=\"async\" loading=\"lazy\" width=\"355\" height=\"152\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_4.png\" alt=\"\" class=\"wp-image-9523\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_4.png 355w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_4-300x128.png 300w\" sizes=\"(max-width: 355px) 100vw, 355px\" \/><\/a><\/figure>\n\n\n\n<p>And another one:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">c:\\windows\\SysWOW64\\setup16.exe -m foo<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_5.png\"><img decoding=\"async\" loading=\"lazy\" width=\"386\" height=\"152\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_5.png\" alt=\"\" class=\"wp-image-9524\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_5.png 386w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_5-300x118.png 300w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a><\/figure>\n\n\n\n<p>It would seem parsing of the command line arguments and interpreting them is not this program&#8217;s forte (there are obviously assumptions being made about how the file name passed to the -m command line argument must look like for &#8216;this to work well&#8217;).<\/p>\n\n\n\n<p>Also, skipping the -QT argument leads to this windows being created (plus a message box signalling an error appearing soon after):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_6.png\"><img decoding=\"async\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_6.png\" alt=\"\" class=\"wp-image-9525\" width=\"500\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_6.png 942w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_6-300x111.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_6-768x285.png 768w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_6-500x186.png 500w\" sizes=\"(max-width: 942px) 100vw, 942px\" \/><\/a><\/figure>\n\n\n\n<p>Last, but not least &#8212; you need admin right to run this show:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_7.png\"><img decoding=\"async\" loading=\"lazy\" width=\"456\" height=\"373\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_7.png\" alt=\"\" class=\"wp-image-9526\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_7.png 456w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_7-300x245.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2024\/10\/sweet16_7-367x300.png 367w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I don&#8217;t even know how to start. I wrote about old InstallShield setup before, and today&#8217;s topic is very similar &#8211; the old, yet still present setup file residing (on Win10, 11) in the following location: c:\\windows\\SysWOW64\\setup16.exe Running it gives &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2024\/10\/12\/the-sweet16-the-oldbin-lolbin-called-setup16-exe\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[53,56,64],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/9516"}],"collection":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/comments?post=9516"}],"version-history":[{"count":10,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/9516\/revisions"}],"predecessor-version":[{"id":9535,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/9516\/revisions\/9535"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=9516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=9516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=9516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}