471,336 Members | 1,323 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

How to unstall a applicaiton with c#

ad
Hi,
How can I unstall a applicaiton with c#
Jun 27 '08 #1
7 1078
"ad" <fl****@wfes.tcc.edu.twwrote in message
news:OO**************@TK2MSFTNGP06.phx.gbl...
How can I unstall a applicaiton with c#
When you say "unstall" do you mean "install" or "uninstall"...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #2
ad
Sorry!
I mean uninstall.

"Mark Rae [MVP]" <ma**@markNOSPAMrae.net>
???????:eP**************@TK2MSFTNGP03.phx.gbl...
"ad" <fl****@wfes.tcc.edu.twwrote in message
news:OO**************@TK2MSFTNGP06.phx.gbl...
>How can I unstall a applicaiton with c#

When you say "unstall" do you mean "install" or "uninstall"...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #3
"ad" <fl****@wfes.tcc.edu.twwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...

[top-posting corrected]
>>How can I unstall a applicaiton with c#

When you say "unstall" do you mean "install" or "uninstall"...?

Sorry!
I mean uninstall.
Can you explain a bit more about what you're trying to do...

Are you saying that you've created an application in C# and want to know how
to create an installation / uninstallation routine for it...?

Or are you saying that you want to uninstall other applications with C#...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #4
ad
Thanks,
I want to uninstall programs wich registerd in windows
"Mark Rae [MVP]" <ma**@markNOSPAMrae.net>
???????:Od****************@TK2MSFTNGP03.phx.gbl...
"ad" <fl****@wfes.tcc.edu.twwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...

[top-posting corrected]
>>>How can I unstall a applicaiton with c#

When you say "unstall" do you mean "install" or "uninstall"...?

Sorry!
I mean uninstall.

Can you explain a bit more about what you're trying to do...

Are you saying that you've created an application in C# and want to know
how to create an installation / uninstallation routine for it...?

Or are you saying that you want to uninstall other applications with
C#...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #5
ad pisze:
I want to uninstall programs wich registerd in windows
Windows ships with a command line utility called msiexec. You can read
about its syntax here:

http://technet.microsoft.com/en-us/l.../bb490936.aspx

After you have figured oout how to solve your problem from the command
line, you can start msiexec from C# code using
System.Diagnostics.Process class.

Best regards!
--
Marcin Hoppe | Blog: http://devlicio.us/blogs/marcin_hoppe
Jun 27 '08 #6
ad
I have find the usage of msiexec.

We can use msiexec /x to uninstall program.

But msiexec /x must followed with package.

How can I uninstall the programs registered in the "add/move program" of
control panel?


"Marcin Hoppe" <ma**********@gmail.com>
???????:uv****************@TK2MSFTNGP04.phx.gbl...
ad pisze:
>I want to uninstall programs wich registerd in windows

Windows ships with a command line utility called msiexec. You can read
about its syntax here:

http://technet.microsoft.com/en-us/l.../bb490936.aspx

After you have figured oout how to solve your problem from the command
line, you can start msiexec from C# code using System.Diagnostics.Process
class.

Best regards!
--
Marcin Hoppe | Blog: http://devlicio.us/blogs/marcin_hoppe

Jun 27 '08 #7
ad pisze:
How can I uninstall the programs registered in the "add/move program" of
control panel?
How do you know which program do you want to uninstall? I assume that
you have a name that is displayed in the Add or Remove Programs applet?

It turns out that you can read the entire uninstall command from Windows
registry (this will also work for applications that were not created
with Windows Installer compatible installation tools).

You should programmatically search all the registry keys under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr ent Version\Uninstall

When you find a key, whose value DisplayName matches name of the
application you want to uninstall, read the value UninstallString from
the same registry key and start command described by this value using
System.Diagnostics.Process class.

Best regards!
--
Marcin Hoppe
Email: ma**********@gmail.com
Blog: http://devlicio.us/blogs/marcin_hoppe
Jun 27 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by MJ | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.