<p>I am working on a Windows application which needs to be able to update itself. When a button is pressed it starts the installer and then the parent application exits. At some point during the installer, the installer attempts to rename the directory that the parent application was running from and fails with "Access Denied" If you run the installer from the desktop it works.</p>

<p>I am using CreateProcess to start the installer, is there some way of using this or another API to create the installer completely independantly from the parent application so that it doesn't retain some attachment to the directory.</p>

You could just write a jsp that does
```
Thread.getAllStackTraces()
```
and print out the stacktracelements in an amenable format. Then hitting the URL of that jsp at any time would give you the stack dump of all threads at that time.