In article <[EMAIL PROTECTED]>, Andy2k8 <[EMAIL PROTECTED]> writes:
> option explicit > > Dim fso,InstallPath,tmp,res > > Set installer = CreateObject("WindowsInstaller.Installer") > Set fso = CreateObject("Scripting.FileSystemObject") > > InstallPath = Property("INSTALLDIR") > > tmp = Mid(InstallPath,1,3) > > res = tmp & "ConfigFolder" > > If (fso.FolderExists(res)) Then > fso.DeleteFolder(res) > msgbox "Left over folder found!Deleted!" > Else > msgbox "Folder not found!Nothing deleted!" > End If A couple observations: 1) You can delete a folder without a custom action. The RemoveFile table can be used to remove an empty folder by specifying an empty FileName column. The standard actions RemoveFiles and RemoveFolders will process this table and the CreateFolder table to remove files and folders when a component is uninstalled. 2) You don't need to call CreateObject to get the Installer object; it is available in a script custom action as the global Session object, which is also the default object. 3) You don't use the installer variable that you're trying to create. 4) The Property() call that gets the value of INSTALLDIR is using the default, global object named Session to obtain this value. -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download <http://www.xmission.com/~legalize/book/download/index.html> Legalize Adulthood! <http://blogs.xmission.com/legalize/> ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users