Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys
can you help me to Uninstall and application from the pc.
I use this code:
VB
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim uninstallString As String = GetUninstallStr("Yahoo")
        Dim UninstallProcess As New System.Diagnostics.Process()
        'temp will hold something like this:  /I{AC76BA86-7AD7-1033-7B44-A81200000003} 
        Dim temp As String = uninstallString.Substring(12)
        
        'The FileName will be: MsiExec.exe
        UninstallProcess.StartInfo.FileName = uninstallString.Split("/".ToCharArray)(0)
        UninstallProcess.StartInfo.Arguments = temp
        UninstallProcess.Start()
    End Sub


But it not work, it give me error message "Could not open Install.log file"
Posted
Comments
[no name] 10-Jan-13 4:27am    
This is in the wrong forum. However the error message seems to be giving a clue.
alcitect 10-Jan-13 4:30am    
thanx for replay what it the solution??

Have a look at this article
C# - Installing and uninstalling software[^]
 
Share this answer
 
Comments
alcitect 10-Jan-13 5:39am    
thank you let me see this
alcitect 10-Jan-13 6:04am    
it is nice program. but i should give the msi path for the program. i want a method to get this by itself.

thanks for help
Shanu2rick 10-Jan-13 6:14am    
How will it identify the program to be uninstalled, then?

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