I am on my second day in using your product and I am very impressed. I am having a problem uninstalling my appdir directory though.
I have a product that creates a windows services and writes two text files. If I stop the service before uninstalling my product then the uninstaller deletes the entire directory structure (the installed files and the two created files by the service)---which is what I want.
If the service is still running when I uninstall my product, then everything except the two text files (including the subsequent directories in which they reside) are left, but everything else is deleted.
In the installexecutesequence area, I have created two vbs scripts under the stopservices and the deleteservices standard actions. I have also created a vbs scripts that removes my directory structure and linked to the removefolders standard actions.
Similar to a previous forum question...it is calling removeInstallDir function, with synchronous and ignore return, always execute, immediate, and remove=all.
Here is the script.
Function removeInstallDir()
Dim strComputer, objWMIService
Dim objFS, pathToFolder, smallPath
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set objFS = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
pathToFolder = Session.property("APPDIR")
smallPath=Left(pathToFolder,Len(pathToFolder)-1)
If (objFS.FolderExists(smallPath)) then
objFS.DeleteFolder smallPath, true
End if
End Function
I don't understand why the directory (specifically the two files) are not removed if the service is not running. Just to ensure if the application is holding the two files, I stopped the service, changed the text file names it made, and ran again and it won't delete the new or old named text files (this should test if the service is holding onto the text files).
Thanks