Auto repair when you remove files is a default feature of MSI setups.
There's no setting in the IDE to rurn it off.
Does Visual Studio allow you to right-click Exclude on the executable in
solution explorer? If so, that runs it out of a temp location and is removed
afterwards.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
[quoted text, click to view] "David Jackson" <someone@somewhere.com> wrote in message
news:uaF5hiRtHHA.1728@TK2MSFTNGP06.phx.gbl...
> Hello,
>
> Scenario: a WinForms app written in VS.NET 2005 (C#) and installed via a
> Setup and Deployment project.
>
> This is an upgrade of an old VB6 app which used the Registry to persist
> certain data, but the C# app doesn't use the Registry - it uses the
> Properties Settings.settings functionality instead.
>
> Because I couldn't find any way in the standard Setup & Deployment project
> to read values from the Registry and then copy them into the new
> Settings.settings file, I wrote a small C# executable to do this instead,
> which I set as a Custom Action in the Setup & Deployment project.
>
> This is working correctly. The whole thing is packaged as an MSI. When it
> runs, the upgrade executable is deployed along with the main app's files,
> and is run at the end of the installation process. The resulting folder
> looks something like this:
>
> <MyApp>
> MyApp.exe
> MyApp.exe.config
> MyApp.ico
> MyApp_Upgrade.exe
>
> What I would like to do now is have the MSI delete the MyApp_Upgrade.exe
> file after it has run it, but there doesn't seem to be any way of doing
> this in the Setup & Deployment project.
>
> Curiously, if I delete it manually (or even have the main app delete it),
> it gets recreated every time the app is run if the MSI is still on the
> machine! I'm presuming there's some sort of setting for this which I have
> missed?
>
> I should point out (in case anyone wonders) that the only reason I have
> for wanting to do this is purely cosmetic / aesthetic... Leaving the
> MyApp_Upgrade.exe in the application's installation folder causes no
> problems whatsoever. But I would like to delete it because it's no longer
> required.
>
> Does anyone know of any way to do this?
>
> Thanks,
>
> DJ
>