Click here to Skip to main content
16,021,041 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

My application is installed using an msi installer which was created using Dot Net.When i try to uninstall via cmd line

C:\Users\vr>msiexec.exe /x producecode /passive

it's removing all the files and folder which was created during the installation.

here i have do some customization like "uninstalled and removing only specified file in the installed one.

how i can do this.

kindly give me the clue to achieve this

Thanks
Vijay r
Posted

1 solution

You cannot do it with the /X option on your MSI. It'll remove all the files and folders (provided they are empty!) that it put down. You'll have to write some custom uninstaller (not an .MSI) to remove just what you want. This includes unregistering any controls, removing files and folders, removing the uninstaller information from the Registry, ...
 
Share this answer
 
Comments
vijayr 2-May-11 5:39am    
hi,

Thanks for data.

i have one more question. if already installed same version software in system, Again installing time how to get Repair, Remove and Uninstall Options, If newer version is going to install same software how to get Upgrade options through Install shield.....
Dave Kreskowiak 2-May-11 7:42am    
If you've done this in InstallShield and taken the default options for an .MSI, you should already get the Repair and Uninstall options if installing the same .MSI. If you're installing the exact same version of the package on a machine that already has it, you will NOT get the Upgrade option.

For an upgrade to work, you have specify the previous .MSIs Upgrade Code in the new .MSI.
vijayr 2-May-11 8:20am    
i am agree with ur point.if i am executing the same .msi, then no issue.
but if i do rebulid and clicking the .msi file
Then it's giving "Another version of this product is already installed.Installation of this version cannot continue."
kindly give me the clue
Dave Kreskowiak 2-May-11 10:36am    
Then you have to remove the previous installation in order to install the new version. The problem may be that your version number is not in the format 1.x.x.x. If the version is less than 1, this problem can occur.
Dave Kreskowiak 2-May-11 10:37am    
A new version is also going to need a new ProductCode, so don't forget to change that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900