Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Deletion Fails for Empty Directory - C:\Program Files (x86)\myApp

$
0
0
I have an AutoIt script, jnlp.exe in folder C:\Program Files (x86)\myApp.
jnlp.exe downloads a launch.jnlp file to the user's temp dir, and then runs the launch.jnlp to launch that Java WebStart application.
If the Java WebStart application is still running, I cannot delete the myApp folder.

Windows7 -
1) Delete the jnlp.exe file. The myApp folder is now empty.
2) Attempt to delete the myApp folder.
   Get this error: Folder In Use. The action can't be completed because the folder or a file in it is open in another program.

I used a tool called handle shows Java WebStart is associate with the myApp folder:
javaw.exe  pid: 8308   type: File   1C: C:\Program Files (x86)\myApp

Is there a reasonable way to avoid this association?

These attempts were no improvement:
==================================
Local $launchPath = @TempDir & "\launch.jnlp"

Run($launchPath)
ShellExecute($launchPath)
Run(@ComSpec & " /c " & $launchPath, "", "")

Had jnlp.exe run an additional script residing in the temp dir, jnlpLauncher.exe, rthat ran the launch.jnlp file that was just downloaded into the temp dir.

Any ideas?

Viewing all articles
Browse latest Browse all 12506

Trending Articles