[
  {
    "Id": "215783",
    "ThreadId": "63458",
    "Html": "<p>All --</p>\r\n<p>How can one have a BAT file delete the folder that the BAT files is in after self-extraction?</p>\r\n<p>For example...</p>\r\n<p>I am using the latest version and I create a self-extracting EXE, console type, and it runs a BAT file.</p>\r\n<p>The BAT file is in a folder that gets create by the self-extraction.</p>\r\n<p>Suppose the BAT file might be &quot;C:\\Temp\\Dash08\\Setup.bat&quot;.</p>\r\n<p>The BAT runs fine and successfully deletes the contents&nbsp;&quot;C:\\Temp\\Dash08\\&quot;, including the BAT file itself.</p>\r\n<p>However, the empty folder &quot;C:\\Temp\\Dash08\\&quot; remains.</p>\r\n<p>This is not a big deal and it is GEFN; but, I thought I should ask about improving our processing.</p>\r\n<p>Maybe there is a way to have the self-extractor 1st run the BAT file (which is does now) and then run a DOS command (which could delete the folder for cleanup), or something like that?</p>\r\n<p>What do you think?</p>\r\n<p>&nbsp;</p>\r\n<p>This is the end of the DOS script...</p>\r\n<p>rmdir &quot;C:\\Temp\\Dash08&quot; /S /Q</p>",
    "PostedDate": "2009-07-24T10:06:17.93-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "215785",
    "ThreadId": "63458",
    "Html": "<p>If it were me, I would copy the bat file to a temp directory and run it from there.&nbsp;&nbsp; You can have the bat file query its own directory, and if it does not match %TEMP%, then it should copy itself to %TEMP% and then invoke the copy.&nbsp; When you invoke a bat from a bat, the first bat ends execution, as far as I know.</p>\r\n<p>But this isn't really a zip question.&nbsp; You might get better help somewhere else.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-07-24T10:10:32.287-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]