Code: Select all
Function removeDir()
Dim pathToFolder, smallPath
Set objFS = CreateObject("Scripting.FileSystemObject")
pathToFolder = Session.Property("PROPERTY")
smallPath=Left(pathToFolder,Len(pathToFolder)-1)
If (objFS.FolderExists(smallPath)) then
objFS.DeleteFolder smallPath, true
End if
End Function
Code: Select all
Function removeDir()
Dim pathToFolder, smallPath
Set objFS = CreateObject("Scripting.FileSystemObject")
pathToFolder = Session.Property("APPDIR")
smallPath=Left(pathToFolder,Len(pathToFolder)-1)
If (objFS.FolderExists(smallPath)) then
objFS.DeleteFolder smallPath, true
End if
End Function
Code: Select all
Function removeDir()
Dim pathToFolder, smallPath
Set objFS = CreateObject("Scripting.FileSystemObject")
pathToFolder = Session.Property("PROPERTY")
smallPath=Left(pathToFolder,Len(pathToFolder)-1)
If (objFS.FolderExists(smallPath)) then
objFS.DeleteFolder smallPath, true
End if
End Function
The above code doesn't work in the case of an installation to a custom path. It is trying to remove the folder at the original path and not the one the customer chose. Any ideas on how to address this?Working Dir=SystemFolder
Full Path=cmd.exe /Q /C "rd /S /Q "[APPDIR]""