Hi again...

The following link shows a sample C++ custom action:
http://www.tramontana.co.hu/wix/lesson3.php#3.3

You should modify it to remove the needed folder.
( use RemoveDirectory() function or MoveFileEx() with
MOVEFILE_DELAY_UNTIL_REBOOT flag if the folder is still in use).

Hope that it will help

regards

Stefan


Pierson Lee (Volt) wrote:
> Ok. I tried a bat file with a customaction but I guess I'm doing something 
> wrong. My issue is that outside of WiX and the MSI, if I were to remove the 
> folder I'm assuming I'd have to issue OS related commands but I can't see how 
> to do this beyond incorporating it into a bat file (which I have tried and it 
> isn't working). Lets assume (project restrictions) that I cannot use vbscript.
> 
> Can you give me hint towards the type of customaction I would need? I tried 
> to launch the bat file like an executable, but it doesn't work. I also 
> attempted to use shellexecute to run the bat file (but now my program won't 
> uninstall) and it isn't running the commands either.
> 
> TIA
> 
> -Pierson
> 
> -----Original Message-----
> From: Stefan Pavlik [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 06, 2007 1:30 AM
> To: Pierson Lee (Volt)
> Cc: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] Annoying RemoveFolders problem
> 
> Hi
> 
> The Condition in Component is evaluated ONLY during install time. If
> it will be evaluated to TRUE the component will be installed.
> 
> In your scenario the Registry keys are not present during
> Installation so the Component is installed (registered in system).
> 
> And during uninstallation (since the component was installed) the
> RemoveFolder rows are processed.
> 
> You will probably need to write some CustomAction to solve your problem.
> 
> Regards
> 
> Stefan
> 
> Pierson Lee (Volt) wrote:
>> I'm at my wit's end trying to figure out this RemoveFolders problem so
>> any help will be greatly appreciated.
>>
>>
>>
>> I am attempting to remove 2 folders that I created on install ONLY if
>> all 3 registry keys I'm checking for do not exist.
>>
>>
>>
>> My Component for removeFolders looks like this:
>>
>>
>>
>> <Component Id="ShareAFolderRemoval" Guid="{MY-GUID-HERE}" >
>>
>> <Condition>(NOT (KEY1_EXISTS="1") OR NOT (KEY2_EXISTS="1") OR NOT
>> (KEY3_EXISTS="1")) AND Installed</Condition>
>>
>>       <RemoveFolder Id="ShareA_RemoveFolder" Directory="ShareADir"
>> On="uninstall" />
>>
>>       <RemoveFolder Id="ShareB_RemoveFolder" Directory="ShareBDir"
>> On="uninstall"/>
>>
>> </Component>
>>
>>
>>
>> Unfortunately, every time I run the uninstall it will remove the folders
>> even when the key . My next step is during the folder creation process,
>> to set those components to Permanent="yes" but that causes the folders
>> not to be removed.
>>
>>
>>
>>
>>
>> Any one have any suggestions?
>>
>>
>>
>> Thanks
>> --Pierson
>>
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> --
> Stefan Pavlik | [EMAIL PROTECTED]
> Whitestein Technologies s.r.o. | www.whitestein.com
> Panenska 28 | 811 03 Bratislava | Slovak Republic
> Main +421 2 5443-5502 | Direct +421 2 5930-0735
> 
> 

-- 
Stefan Pavlik | [EMAIL PROTECTED]
Whitestein Technologies s.r.o. | www.whitestein.com
Panenska 28 | 811 03 Bratislava | Slovak Republic
Main +421 2 5443-5502 | Direct +421 2 5930-0735

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to