Uninstallation of msi file programatically
-
I could able to install msi file using below code and it installed sucessfully
string path = @"C:\Projects\Debug\ELSWinServInstaller.msi";
Process process = Process.Start(path);
process.WaitForInputIdle();
process.WaitForExit();I tried to uninstall the same using below code, but its not working.
Process p = new Process();
p.StartInfo.FileName = "msiexec.exe";
p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn";
p.Start();Please let me know where I went wrong.
-
I could able to install msi file using below code and it installed sucessfully
string path = @"C:\Projects\Debug\ELSWinServInstaller.msi";
Process process = Process.Start(path);
process.WaitForInputIdle();
process.WaitForExit();I tried to uninstall the same using below code, but its not working.
Process p = new Process();
p.StartInfo.FileName = "msiexec.exe";
p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn";
p.Start();Please let me know where I went wrong.
NarVish wrote:
Please let me know where I went wrong.
You forgot to explain what "is not working" means. Did it start the process? Did it throw an exception?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
-
NarVish wrote:
Please let me know where I went wrong.
You forgot to explain what "is not working" means. Did it start the process? Did it throw an exception?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
"I tried to uninstall the same using below code, but its not working." Process p = new Process(); p.StartInfo.FileName = "msiexec.exe"; p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn"; p.Start(); Unistallation code is not working. It didn't throw any exception. it executed each line. but uninstallation didn't happen.
-
I could able to install msi file using below code and it installed sucessfully
string path = @"C:\Projects\Debug\ELSWinServInstaller.msi";
Process process = Process.Start(path);
process.WaitForInputIdle();
process.WaitForExit();I tried to uninstall the same using below code, but its not working.
Process p = new Process();
p.StartInfo.FileName = "msiexec.exe";
p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn";
p.Start();Please let me know where I went wrong.
Could be a permission issue. For Vista and Windows 7, you might need to run this program as an administrator to uninstall the program.
WP Apps - Color Search | Arctic | XKCD | Sound Meter | Speed Dial
-
Could be a permission issue. For Vista and Windows 7, you might need to run this program as an administrator to uninstall the program.
WP Apps - Color Search | Arctic | XKCD | Sound Meter | Speed Dial
-
I could able to install msi file using below code and it installed sucessfully
string path = @"C:\Projects\Debug\ELSWinServInstaller.msi";
Process process = Process.Start(path);
process.WaitForInputIdle();
process.WaitForExit();I tried to uninstall the same using below code, but its not working.
Process p = new Process();
p.StartInfo.FileName = "msiexec.exe";
p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn";
p.Start();Please let me know where I went wrong.
can you uninstall this application from a command prompt? by running the same command? i.e.
c:\Projects\Debug\ELSWinServInstaller.msi /qn
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
-
can you uninstall this application from a command prompt? by running the same command? i.e.
c:\Projects\Debug\ELSWinServInstaller.msi /qn
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
-
I could able to install msi file using below code and it installed sucessfully
string path = @"C:\Projects\Debug\ELSWinServInstaller.msi";
Process process = Process.Start(path);
process.WaitForInputIdle();
process.WaitForExit();I tried to uninstall the same using below code, but its not working.
Process p = new Process();
p.StartInfo.FileName = "msiexec.exe";
p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn";
p.Start();Please let me know where I went wrong.
NarVish wrote:
p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn";;
Do you need a space between the closing quote around the MSI path and the
/qn
argument?p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\" /qn";
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
NarVish wrote:
p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn";;
Do you need a space between the closing quote around the MSI path and the
/qn
argument?p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\" /qn";
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
"I tried to uninstall the same using below code, but its not working." Process p = new Process(); p.StartInfo.FileName = "msiexec.exe"; p.StartInfo.Arguments = "/x \"C:\\Projects\\Debug\\ELSWinServInstaller.msi\"/qn"; p.Start(); Unistallation code is not working. It didn't throw any exception. it executed each line. but uninstallation didn't happen.
NarVish wrote:
Unistallation code is not working. It didn't throw any exception. it executed each line. but uninstallation didn't happen.
That's a better description; now we can rule out any exceptions and focus on the rest. From where are you starting this? From a Windows-service? You could check the eventlog for any errors. As a quick workaround, try putting the complete command in a batch-file and execute that from code.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]