cancel
Showing results for 
Search instead for 
Did you mean: 

How to Uninstall application Using C# script

hrshilpashree
Occasional Contributor

How to Uninstall application Using C# script

Hi Team,

 

How do I install and Uninstall an application using C# Script .The application is .msi 

 

Thanks,

Shilpashree

6 REPLIES 6
vinniew
Staff

Re: How to Uninstall application Using C# script

Hi @hrshilpashree 

 

How are you. 

 

Is this something you'd like to do as part of your Tests? 

 

Can you explain a little bit more on what you are trying to achieve including this as part of a test step. 

 

This will help me address how we can do this in Testcomplete

 

Thanks 

 

Vincent

 

vinniew
Staff

Re: How to Uninstall application Using C# script

Hi @hrshilpashree 

 

I stumbled across a similar thread after I initially responded. 

 

Check this out here 

 

https://community.smartbear.com/t5/TestComplete-General-Discussions/Testing-installer-msi-with-TestC...

 

I think it may solve your issue. 

 

Thanks again for using the community, try it out and let me know how you get on 

 

KR

 

Vinnie 

hrshilpashree
Occasional Contributor

Re: How to Uninstall application Using C# script

Hi @vinniew ,

I have a scenario where in I need to check values in multiple builds of same application and save it to a report.
To achieve this test, I need to uninstall the previous build and Install the current Build(application with .msi) and repeat uninstall and install in series
so looking for Script to install and uninstall a .msi application

 

vinniew
Staff

Re: How to Uninstall application Using C# script

Hey @hrshilpashree 

 

Have you checked previous threads on this? 

 

I posted an example before. 

 

Here is another 

 

https://community.smartbear.com/t5/TestComplete-General-Discussions/Install-and-Uninstall-an-applica...

 

 

AlexKaras
Community Hero

Re: How to Uninstall application Using C# script

Hi Shilpashree,

 

While it might depend on the implementation of your given .msi installer, but usually

msiexec /i <your.msi>

installs the product and

msiexec /u <your.msi>

uninstalls it.

 

Use the WshShell.Run() method to execute command line from your test code.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
TanyaYatskovska
Community Manager

Re: How to Uninstall application Using C# script

Thanks for the help, vinniew, Alex!

 

@hrshilpashree, were you able to resolve the issue? Please let us know if you need assistance.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors