Git Product home page Git Product logo

Comments (13)

XhmikosR avatar XhmikosR commented on May 20, 2024

So we assume no KProcessHacker2 service is running anymore?

from systeminformer.

dmex avatar dmex commented on May 20, 2024

Yes, although someone might be upgrading from an older version with KPH2 which needs to be stopped/deleted (??) but all newer versions (and the last two releases) are using KPH3

from systeminformer.

VictorVG avatar VictorVG commented on May 20, 2024

Changes for installer, just diff:

--- Process_Hacker_installer.iss
+++ Process_Hacker_installer.iss
@@ -332,7 +332,7 @@
 var
   dwStart: DWORD;
 begin
-  if RegQueryDWordValue(HKLM, 'SYSTEM\CurrentControlSet\Services\KProcessHacker2', 'Start', dwStart) then begin
+  if RegQueryDWordValue(HKLM, 'SYSTEM\CurrentControlSet\Services\KProcessHacker3', 'Start', dwStart) then begin
     if dwStart = 1 then
       Result := True;
   end else
@@ -386,14 +386,18 @@
   if CurStep = ssInstall then begin
     if IsServiceRunning('KProcessHacker2') then
       StopService('KProcessHacker2');
-    if IsTaskSelected('delete_KPH_service') then
       RemoveService('KProcessHacker2');
+
+    if IsServiceRunning('KProcessHacker3') then
+      StopService('KProcessHacker3');
+    if IsTaskSelected('delete_KPH_service') then
+      RemoveService('KProcessHacker3');
   end;

   if CurStep = ssPostInstall then begin
     if (KPHServiceCheck() and not IsTaskSelected('delete_KPH_service') or (IsTaskSelected('create_KPH_service'))) then begin
-      StopService('KProcessHacker2');
-      RemoveService('KProcessHacker2');
+      StopService('KProcessHacker3');
+      RemoveService('KProcessHacker3');

       if not Exec(ExpandConstant('{app}\ProcessHacker.exe'), '-installkph -s', '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then begin
         // handle failure if necessary; iResultCode contains the error code
@@ -420,8 +424,8 @@
 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
 begin
   if CurUninstallStep = usUninstall then begin
-    StopService('KProcessHacker2');
-    RemoveService('KProcessHacker2');
+    StopService('KProcessHacker3');
+    RemoveService('KProcessHacker3');

     // When uninstalling ask user to delete Process Hacker's settings
     // based on whether the settings file exists only

from systeminformer.

XhmikosR avatar XhmikosR commented on May 20, 2024

@VictorVG: thanks, I already have made a patch for this locally.

from systeminformer.

VictorVG avatar VictorVG commented on May 20, 2024

Ok!, big thanks!

from systeminformer.

VictorVG avatar VictorVG commented on May 20, 2024

Patch correction:

--- Process_Hacker_installer_Full.iss
+++ Process_Hacker_installer_Full.iss
@@ -332,7 +332,7 @@
 var
   dwStart: DWORD;
 begin
-  if RegQueryDWordValue(HKLM, 'SYSTEM\CurrentControlSet\Services\KProcessHacker2', 'Start', dwStart) then begin
+  if RegQueryDWordValue(HKLM, 'SYSTEM\CurrentControlSet\Services\KProcessHacker3', 'Start', dwStart) then begin
     if dwStart = 1 then
       Result := True;
   end else
@@ -384,16 +384,16 @@
   iResultCode: Integer;
 begin
   if CurStep = ssInstall then begin
-    if IsServiceRunning('KProcessHacker2') then
-      StopService('KProcessHacker2');
+    if IsServiceRunning('KProcessHacker3') then
+      StopService('KProcessHacker3');
     if IsTaskSelected('delete_KPH_service') then
-      RemoveService('KProcessHacker2');
+      RemoveService('KProcessHacker3');
   end;

   if CurStep = ssPostInstall then begin
     if (KPHServiceCheck() and not IsTaskSelected('delete_KPH_service') or (IsTaskSelected('create_KPH_service'))) then begin
-      StopService('KProcessHacker2');
-      RemoveService('KProcessHacker2');
+      StopService('KProcessHacker3');
+      RemoveService('KProcessHacker3');

       if not Exec(ExpandConstant('{app}\ProcessHacker.exe'), '-installkph -s', '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then begin
         // handle failure if necessary; iResultCode contains the error code
@@ -420,8 +420,8 @@
 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
 begin
   if CurUninstallStep = usUninstall then begin
-    StopService('KProcessHacker2');
-    RemoveService('KProcessHacker2');
+    StopService('KProcessHacker3');
+    RemoveService('KProcessHacker3');

     // When uninstalling ask user to delete Process Hacker's settings
     // based on whether the settings file exists only
  • I overdid it. :) If someone has two different versions - eg branches 2.xx and 3.xx and even in different directories? Better to let you manually correct them with a copy of the program are removed.

from systeminformer.

VictorVG avatar VictorVG commented on May 20, 2024

Sorry, more fix - I accidentally mixed up files - my version Process_Hacker_installer_full.iss has more lines, because they would not match. Remade and tested team patch -i Process_Hacker_installer.diff - no error detected.

diff U3i Process_Hacker_installer.iss Process_Hacker_installer.iss
--- Process_Hacker_installer.iss    Sat Apr 02 17:22:51 2016
+++ Process_Hacker_installer.iss    Sat Jul 02 07:30:08 2016
@@ -270,7 +270,7 @@
 var
   dwStart: DWORD;
 begin
-  if RegQueryDWordValue(HKLM, 'SYSTEM\CurrentControlSet\Services\KProcessHacker2', 'Start', dwStart) then begin
+  if RegQueryDWordValue(HKLM, 'SYSTEM\CurrentControlSet\Services\KProcessHacker3', 'Start', dwStart) then begin
     if dwStart = 1 then
       Result := True;
   end else
@@ -327,16 +327,16 @@
   iResultCode: Integer;
 begin
   if CurStep = ssInstall then begin
-    if IsServiceRunning('KProcessHacker2') then
-      StopService('KProcessHacker2');
+    if IsServiceRunning('KProcessHacker3') then
+      StopService('KProcessHacker3');
     if IsTaskSelected('delete_KPH_service') then
-      RemoveService('KProcessHacker2');
+      RemoveService('KProcessHacker3');
   end;

   if CurStep = ssPostInstall then begin
     if (KPHServiceCheck() and not IsTaskSelected('delete_KPH_service') or (IsTaskSelected('create_KPH_service'))) then begin
-      StopService('KProcessHacker2');
-      RemoveService('KProcessHacker2');
+      StopService('KProcessHacker3');
+      RemoveService('KProcessHacker3');

       if not Exec(ExpandConstant('{app}\ProcessHacker.exe'), '-installkph -s', '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then begin
         // handle failure if necessary; iResultCode contains the error code
@@ -364,8 +364,8 @@
 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
 begin
   if CurUninstallStep = usUninstall then begin
-    StopService('KProcessHacker2');
-    RemoveService('KProcessHacker2');
+    StopService('KProcessHacker3');
+    RemoveService('KProcessHacker3');

     // When uninstalling ask user to delete Process Hacker's settings
     // based on whether the settings file exists only

Diff attached
Process_Hacker_installer.diff.zip

from systeminformer.

XhmikosR avatar XhmikosR commented on May 20, 2024

Thanks but don't beat yourself up; let me find some time to merge my local
changes and we can tweak it if needed.
On Jul 2, 2016 07:43, "Π’ΠΈΠΊΡ‚ΠΎΡ€" [email protected] wrote:

Sorry, more fix - I accidentally mixed up files - my version
Process_Hacker_installer_full.iss has more lines, because they would not
match. Remade and tested team patch -i Process_Hacker_installer.diff - no
error detected.

diff U3i Process_Hacker_installer.iss Process_Hacker_installer.iss
--- Process_Hacker_installer.iss Sat Apr 02 17:22:51 2016
+++ Process_Hacker_installer.iss Sat Jul 02 07:30:08 2016
@@ -270,7 +270,7 @@
var
dwStart: DWORD;
begin

  • if RegQueryDWordValue(HKLM, 'SYSTEM\CurrentControlSet\Services\KProcessHacker2', 'Start', dwStart) then begin

  • if RegQueryDWordValue(HKLM, 'SYSTEM\CurrentControlSet\Services\KProcessHacker3', 'Start', dwStart) then begin
    if dwStart = 1 then
    Result := True;
    end else
    @@ -327,16 +327,16 @@
    iResultCode: Integer;
    begin
    if CurStep = ssInstall then begin

  • if IsServiceRunning('KProcessHacker2') then

  •  StopService('KProcessHacker2');
    
  • if IsServiceRunning('KProcessHacker3') then

  •  StopService('KProcessHacker3');
    

    if IsTaskSelected('delete_KPH_service') then

  •  RemoveService('KProcessHacker2');
    
  •  RemoveService('KProcessHacker3');
    

    end;

    if CurStep = ssPostInstall then begin
    if (KPHServiceCheck() and not IsTaskSelected('delete_KPH_service') or (IsTaskSelected('create_KPH_service'))) then begin

  •  StopService('KProcessHacker2');
    
  •  RemoveService('KProcessHacker2');
    
  •  StopService('KProcessHacker3');
    
  •  RemoveService('KProcessHacker3');
    

    if not Exec(ExpandConstant('{app}\ProcessHacker.exe'), '-installkph -s', '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then begin
    // handle failure if necessary; iResultCode contains the error code
    @@ -364,8 +364,8 @@
    procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
    begin
    if CurUninstallStep = usUninstall then begin

  • StopService('KProcessHacker2');

  • RemoveService('KProcessHacker2');

  • StopService('KProcessHacker3');

  • RemoveService('KProcessHacker3');

// When uninstalling ask user to delete Process Hacker's settings
// based on whether the settings file exists only

Diff attached
Process_Hacker_installer.diff.zip
https://github.com/processhacker2/processhacker2/files/344410/Process_Hacker_installer.diff.zip

β€”
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#47 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAVVtUNsI8C_BwOAu4MzRmZ7kOe7WTF_ks5qRexYgaJpZM4JCI8r
.

from systeminformer.

VictorVG avatar VictorVG commented on May 20, 2024

Ok!, I wait Your. No problem. Big thanks!

from systeminformer.

VictorVG avatar VictorVG commented on May 20, 2024

Also I found value KProcessHacker2 in to ./trunk/tools/ProcessHackerSetup/ProcessHackerSetup\lib/appsup.c::733 - code string is:

`serviceHandle = OpenService(scmHandle, L"KProcessHacker2", SERVICE_STOP | DELETE); `

do you needed correct this string?

from systeminformer.

VictorVG avatar VictorVG commented on May 20, 2024

Sorry, but my patch it causes an error in the new versions of Process Hacker due to the recording of incorrect values of the driver KProcessHacker3 Parameters\SecurityLevel=2. Because for the assembly of Process Hacker v3.0.0.144 and later it does not apply.

from systeminformer.

dmex avatar dmex commented on May 20, 2024

I patched this some time ago but forgot to update the ticket πŸ˜„

from systeminformer.

VictorVG avatar VictorVG commented on May 20, 2024

Ok! :)

from systeminformer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.