Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > uninstall msi application
 

uninstall msi application

hi to all ,

i am creating setup for windows application , here i am going to add uninstall function in program menu . now i using batch file to uninstall it working fine .

my problem is when click uninstall the windows default message like "Are you sure you want uninstall this product ? " here i need to change "Are you sure you want uninstall this thinksoft software and all its components?" how to do this.

my batch file is

@ECHO OFF
msiexec /x {8C79C545-752E-4C17-A66B-C0B1DFE1FC07}



ak
Iniyan  Monday, July 27, 2009 6:51 AM

Hi Iniyan,

From my experience, there is no direct way to modify the hint message of the msiexec command. But we can add some arguments to the command to have the program uninstalled quietly. Before we call the msiexec command, we can show some message to hint users. These are the steps:

1. When the user select the uninstall menu, show a message box to hint him/her. If he select Yes, continue; otherwise, return. This is the code snippet:

if (MessageBox.Show("Are you sure you want uninstall this thinksoft software and all its components?", "",

MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)

{

//Call msiexec command here to uninstall.

}

2. Call the msiexec command without user interface:
@ECHO OFF

msiexec /x {8C79C545-752E-4C17-A66B-C0B1DFE1FC07} /qn

You can get more information about msiexec command from:
http://technet.microsoft.com/en-us/library/cc759262(WS.10).aspx.

Let me know if this helps.
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Tuesday, July 28, 2009 12:24 PM

Hi Iniyan,

From my experience, there is no direct way to modify the hint message of the msiexec command. But we can add some arguments to the command to have the program uninstalled quietly. Before we call the msiexec command, we can show some message to hint users. These are the steps:

1. When the user select the uninstall menu, show a message box to hint him/her. If he select Yes, continue; otherwise, return. This is the code snippet:

if (MessageBox.Show("Are you sure you want uninstall this thinksoft software and all its components?", "",

MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)

{

//Call msiexec command here to uninstall.

}

2. Call the msiexec command without user interface:
@ECHO OFF

msiexec /x {8C79C545-752E-4C17-A66B-C0B1DFE1FC07} /qn

You can get more information about msiexec command from:
http://technet.microsoft.com/en-us/library/cc759262(WS.10).aspx.

Let me know if this helps.
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Tuesday, July 28, 2009 12:24 PM

You can use google to search for other answers

Custom Search

More Threads

• Left pane problem -- newbie question
• Question about copy file to system32 under Vista RTM
• Creating A New User
• tab pages
• Ver 1.1/Terrarium Server is not working 'n What about the contest rules?
• Any issues with Win XP SP 2
• about Icons of XPander
• Adding Appointment in Outlook - reverts to current day & time
• MDI Parent Samples
• Terrarium can't connect to server