Announcement

Collapse
No announcement yet.

Windows 10 / HS3 automatic start from a cold boot

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Originally posted by RoChess View Post

    The answer is pretty much in the response, just add /F to it, so use:

    taskkill /F /IM HS4Sentry.exe
    pause
    taskkill /F /IM HS4.exe
    pause
    ya know, i'm not sure if you are a smart *** or just smart. you have stated the obvious, but since you have almost 700 posts, i'm betting that happens a lot.

    it was the WISDOM of applying a force to the shutdown that I question, maybe i needed to spell it out for the keyboard warriors out there.

    Comment


      #47
      I have had a persistent startup problem with HS3 and now HS4. The Task Scheduler starts HS4 program as expected but the Speaker.exe never executes unless I log in and manually run it. Even though the Start Speaker checkbox in HS Setup is ticked, it never runs.

      I created a Startup Task with a one minute start delay, allowed it to stop any running copies, run if logged in not, highest permission, startup folder is set C:\HS4
      When I look at the Task Scheduler it shows that the speaker task is running.

      I have tried using the netplwiz but in the advanced settings it warns me that this version of Windows does not support that feature.


      HS4Pro 4.1.9.0
      Win10 Home
      C:\HS4 is the install folder

      Comment


        #48
        Originally posted by aimless View Post

        Any ideas? I wrote the script and tested, got this back (using pause to debug):
        ________________________________________
        taskkill /IM HS4Sentry.exe
        pause
        taskkill /IM HS4.exe
        pause
        ________________________________________
        C:\Windows\system32>taskkill /IM HS4Sentry.exe
        ERROR: The process "HS4Sentry.exe" with PID 1816 could not be terminated.
        Reason: This process can only be terminated forcefully (with /F option).

        C:\Windows\system32>pause
        Press any key to continue . . .

        C:\Windows\system32>taskkill /IM HS4.exe
        ERROR: The process "HS4.exe" with PID 11500 could not be terminated.
        Reason: This process can only be terminated forcefully (with /F option).

        C:\Windows\system32>pause
        Press any key to continue . . .
        ________________________________________
        Are you testing via an actual windows shutdown event? Or testing in just the .cmd?

        I'm not sure why it doesn't work for HS4. I would NOT use the /F switch as that will almost guarantee corruption.

        I don't think there is any need to shut down the Sentry, So I would get rid of everything in except for taskkill /IM HS4.exe. (don't pauses) and try it in an actual shutdown or restart event.
        RJ_Make On YouTube

        Comment


          #49
          Originally posted by aimless View Post
          ya know, i'm not sure if you are a smart *** or just smart.
          The truth often lies in the middle

          It is indeed risky to use /F because it can lead to corruption on open-file handles, such as for example database not closing properly. This can be compensated in SQLite for example with a PRAGMA check, but then it relies on HS4.exe to do that check before it starts. Backups are always a good idea, but that is regardless of you using such a script or not. The other option is to check for open-file handles with an advanced tool such as procexp.exe from SysInternals, which can also be batch-scripted via command-line.

          However, you ommitted a lot of details, because the key question obviously in your case is digging deep to find out why a normal shutdown process isn't working. Do the logs give you any insight? or it is just a matter of patience and that things take a little longer for you? Are there any errors preventing it? Have you looked into launching HomeSeer is a different way so that it shuts down easier?

          Still, power can fail, computers can abruptly halt processing for other reasons, so it is always wise to have the ability to survive such a shut-down, and I've got batch-scripts myself to /F(orce) the close down of applications remotely. For me it is when I RDP into a system via concurrent-RDP and need to shut down an application on the main session. Without /F I cannot do this, because I don't have visual or physical access to 'Okay' the normal shutdown process.

          Have you looked into BLShutdown plugin?

          Comment


            #50
            Originally posted by Kitar View Post
            I have had a persistent startup problem with HS3 and now HS4. The Task Scheduler starts HS4 program as expected but the Speaker.exe never executes unless I log in and manually run it. Even though the Start Speaker checkbox in HS Setup is ticked, it never runs.

            I'm on 20H2 as of a few days, and HomeSeer, SpeakerClient and Sentry load just fine on a single TaskScheduler task to load HS3.exe (no time yet to upgrade) at log-on of the primary Windows 10 user. I've also have it check for "Run whether user is logged on or not", however the primary task itself triggers at "At log on of HOMESEER\HomeSeer" (yes, I was super creative in naming WORKGROUP and User account).

            I've got one extra task added that runs shutdown.exe /l to then immediately log-off the user and keep things somewhat more secure.

            This works well if you can use the 'Netplwiz' method, but I have a feeling you are using "Windows 10 Home" and not the "Windows 10 Pro" that this tool is designed for which might be why you're seeing errors.

            For "Windows 10 Home", use WinKey+R (or right click on Windows 10 Start menu item and select "Run...") try "control userpasswords2" without the quotes and confirm any UAC notice you might get that you wish to allow access. Switch to the "Users" tab if needed.

            If the checkbox for "Users must enter a username and password to use this computer" is already checked then simply uncheck it and click "Apply" button, which will then ask you to enter password and you can verify that your username is listed in the box underneath checkbox. Otherwise re-enable checkbox, and use the "Add..." button to add your username, and then uncheck the checkbox again to ensure Windows will boot into desktop without requiring password.

            PS: HomeSeer > Tools > Setup > On the 'General' tab, the "Launch Speaker Client on Startup" entry is CHECKED, right? Also wise to have the "HSSentry (Software System Monitor)" option checked as well.

            PPS: Are you perhaps trying to boot into the system without a password on a Microsoft account? Far as I know a true local-user-account is needed, so be sure to create one and use that one to boot into the system. Never tried that on a Microsoft account, unless it was tied to a local-user account.

            Comment


              #51
              Thanks for the input. I am on Win10 Home edition. Actually I do have a Win10 Pro key so I am going to see if I can upgrade that machine without a re-install.

              Comment

              Working...
              X