Click here to Skip to main content
15,888,330 members
Home / Discussions / C#
   

C#

 
GeneralRe: html source code Pin
fmardani28-Apr-06 2:55
fmardani28-Apr-06 2:55 
AnswerRe: html source code Pin
Guffa28-Apr-06 3:26
Guffa28-Apr-06 3:26 
GeneralRe: html source code Pin
J4amieC28-Apr-06 3:29
J4amieC28-Apr-06 3:29 
GeneralRe: html source code Pin
fmardani28-Apr-06 3:34
fmardani28-Apr-06 3:34 
GeneralRe: html source code Pin
J4amieC28-Apr-06 3:12
J4amieC28-Apr-06 3:12 
QuestionRecoding voice Pin
ghost_cis27-Apr-06 21:34
ghost_cis27-Apr-06 21:34 
AnswerRe: Recoding voice Pin
Yuvi Panda28-Apr-06 1:29
Yuvi Panda28-Apr-06 1:29 
QuestionBeforeUninstall event + Process problems Pin
spif200127-Apr-06 21:07
spif200127-Apr-06 21:07 
Hi
I'm trying to auto-uninstall a COM service from componentservices with the help of Regsvcs.exe's /u command, but my code doesn't seem to work.

I have a deployment project, which in CustomAction/uninstall uses af custom install class to, among other things, unistall the service.

I have checked that my assemblypath(see code) is correct. I have tried to run Regsvcs /u from a command prompt, and the result is as expected - the service dissapears from the componentservices. When I use Regsvcs /fc during install via my custom install class it works. The service places itself nicely into componentservices. The only mysterious thing I can observe during the whole uninstallation process is, that the BeforeUninstall event seems to fire very late in the uninstall process.

Can anyone tell me, why this code whont delete the service from the componentservices?Confused | :confused:

<br />
private string regsvcsPath = Environment.GetEnvironmentVariable("windir") + @"\Microsoft.NET\Framework\v2.0.50727\regsvcs.exe";<br />
<br />
public CustomInstaller()<br />
{<br />
  InitializeComponent();<br />
  this.BeforeUninstall += new InstallEventHandler(CustomInstaller_BeforeUninstall);<br />
}<br />
<br />
void CustomInstaller_BeforeUninstall(object sender, InstallEventArgs e)<br />
{<br />
  try<br />
  {<br />
    string parameters = @" /u " + this.Context.Parameters["assemblypath"];<br />
    ProcessStartInfo psi = new ProcessStartInfo(this.regsvcsPath, parameters);<br />
    Process.Start(psi);<br />
  }<br />
  catch (Exception ex)<br />
  {<br />
    MessageBox.Show(ex.ToString(), "Uninstall error");<br />
  }<br />
}

Questionhow can i record voice and store it in files Pin
Mayood27-Apr-06 20:05
Mayood27-Apr-06 20:05 
AnswerRe: how can i record voice and store it in files Pin
mav.northwind28-Apr-06 11:43
mav.northwind28-Apr-06 11:43 
QuestionC# exercise Pin
rockxuyenmandem27-Apr-06 19:34
rockxuyenmandem27-Apr-06 19:34 
AnswerRe: C# exercise Pin
User 665827-Apr-06 21:42
User 665827-Apr-06 21:42 
AnswerRe: C# exercise Pin
J4amieC27-Apr-06 22:17
J4amieC27-Apr-06 22:17 
AnswerRe: C# exercise Pin
Guffa27-Apr-06 23:29
Guffa27-Apr-06 23:29 
AnswerRe: C# exercise Pin
alexey N27-Apr-06 23:50
alexey N27-Apr-06 23:50 
AnswerRe: C# exercise Pin
Colin Angus Mackay28-Apr-06 1:21
Colin Angus Mackay28-Apr-06 1:21 
AnswerRe: C# exercise Pin
Dan Neely28-Apr-06 2:09
Dan Neely28-Apr-06 2:09 
QuestionHi... Pin
KORCARI27-Apr-06 19:30
KORCARI27-Apr-06 19:30 
AnswerRe: Hi... Pin
CWIZO27-Apr-06 21:51
CWIZO27-Apr-06 21:51 
QuestionWindows Forms Error Pin
ranandbe27-Apr-06 19:07
ranandbe27-Apr-06 19:07 
AnswerRe: Windows Forms Error Pin
spaceus27-Apr-06 23:50
spaceus27-Apr-06 23:50 
QuestionReading XML into a Hashtable Pin
Wolfram Steinke27-Apr-06 18:50
Wolfram Steinke27-Apr-06 18:50 
AnswerRe: Reading XML into a Hashtable Pin
Guffa27-Apr-06 23:32
Guffa27-Apr-06 23:32 
QuestionHow to know about the author/owner of a file/folder? Pin
renata yasa putra27-Apr-06 17:24
renata yasa putra27-Apr-06 17:24 
AnswerRe: How to know about the author/owner of a file/folder? Pin
Christian Graus27-Apr-06 17:39
protectorChristian Graus27-Apr-06 17:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.