Can you not just use Remove folder?

http://wix.sourceforge.net/manual-wix3/wix_xsd_removefolder.htm



-----Original Message-----
From: sagar shinde [mailto:sagar.i...@gmail.com] 
Sent: 25 October 2010 12:31
To: WiX-users@lists.sourceforge.net
Subject: [WiX-users] how to use VBscript or c++ function in wix

hi,
i want to delete folders from installed location which are created by
installer i tried it by following vb script i was able to delete folders
but it is only possible when we provide the hardcoded folder path ,how
can i
provide path as argument to vb script or c++ function while calling it
from
wix custom action

vbscript--------------------------

function deletefolder
strFolderPath=C:\new folder;

Set fso=CreateObject("Scripting.FileSystemObject" )

If fso.FolderExists(strFolderPath) Then
set demofolder = fso.GetFolder(strFolderPath)
'The True parameter remove the folder forcefully
fso.DeleteFolder strFolderPath, True 'Delete the copied folder
'fso.CreateFolder strFolderPath 'Create a new folder with the name
specified
in variable
'fso.DeleteFolder(strFolderPath) 'Another method for delete
WScript.Echo "Deleted folder!!!"
else
WScript.Echo "Inexistent folder!!!"
End If
end function


wix--------------------------------------------------------------

<Binary Id="deletefolder.cpp" SourceFile="deletefolder.cpp"/>
    <CustomAction Id="Delete" BinaryKey="deletefolder.cpp"
VBScriptCall="deletefolder"  Return="check" />
------------------------------------------------------------------------
------
Nokia and AT&T present the 2010 Calling All Innovators-North America
contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and
Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in
marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store

http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to