Click here to Skip to main content
12,511,920 members (45,008 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ C# VB VB.NET
Hi guys
can you help me to Uninstall and application from the pc.
I use this code:
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 9-Jan-13 22:18pm
Comments
pwasser 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??
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Have a look at this article
C# - Installing and uninstalling software[^]
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160929.1 | Last Updated 10 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100