Does not start automatically in standard accounts

Callistemon

Active Member
Every time HWiNFO is installed on a new computer when only the administrator account has been set up, it starts up automatically every time and is available instantly after logging in. As soon as a standard account is created, it no longer works. The "Auto Start" setting was checked while the application settings was open in the standard account, and the Task Scheduler entry refers to the correct file. It is set to run in the standard account with the highest privileges. Manually running the task in Task Scheduler does nothing.
 

Attachments

  • 1639350224861.png
    1639350224861.png
    110.1 KB · Views: 8
  • 1639350236763.png
    1639350236763.png
    59.5 KB · Views: 8
  • 1639350247058.png
    1639350247058.png
    68.2 KB · Views: 6
  • 1639350255414.png
    1639350255414.png
    131.5 KB · Views: 5
  • 1639350264862.png
    1639350264862.png
    123.5 KB · Views: 7

Martin

HWiNFO Author
Staff member
It's not sufficient to set it to run with highest privileges, you need to provide Administrative account credentials.
 

Callistemon

Active Member
It's not sufficient to set it to run with highest privileges, you need to provide Administrative account credentials.
It was set to run with the administrator account in the past, but that did not work either. Task Scheduler was run as administrator.
 

Martin

HWiNFO Author
Staff member
That's not the same as configuring the task to be run under an Admin account.
 

Callistemon

Active Member
Unlike in the previous screenshot, it is now set to run under the administrator account. I believe it was that way in the past, and did not work either. It still does nothing when the task is manually run.
 

Attachments

  • 1639435057821.png
    1639435057821.png
    110 KB · Views: 8

Dalai

Well-Known Member
It can't work that way because of the option right under the one you marked - the user the process is run as isn't logged on. You can try to change the user to "Interactive". That way it doesn't matter which user is logged on as long as it's an interactive session. Unfortunately it looks like this pseudo user can't be set via the GUI. So you need to export the task (via right-clicking on it) to an XML file and change the Principals section to this
XML:
  <Principals>
    <Principal id="Interactive">
      <GroupId>S-1-5-4</GroupId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
and then reimport the task.

Also, I'm not sure if this works when running a program that requires administrative privileges (like HWiNFO).

HTH

Regards
Dalai
 

Callistemon

Active Member
Okay so it's changed to "Run whether the user is logged on or not" since being logged on apparently refers to the administrator being logged on. It still does not appear in the standard account. The SSD alert script incidentally turned the fans on even though HWiNFO did not appear in the standard account, and the administrator account was not logged on since startup. That makes it appear that the task is opening it into the administrator account, which is why I had it set to run in the standard account at first (but with highest privileges).

An error occurs when exporting, modifying, and importing the XML file:
1639464034249.png
 

Dalai

Well-Known Member
Okay so it's changed to "Run whether the user is logged on or not" since being logged on apparently refers to the administrator being logged on. It still does not appear in the standard account.
That won't work because tasks run this way won't be shown on the user's desktop. The task is executed, and this works fine for non-interactive things, but it doesn't make sense for programs which require interaction. Actually, it's quite logical it works this way when you think about it. There can be multiple users logged on simultaneously - which one should be shown the program's GUI?

Note: Take a look at the task's execution result in Task Scheduler. That way you won't have to guess whether or not the process was actually run properly, and if it's still active.

An error occurs when exporting, modifying, and importing the XML file:
View attachment 7215
Sorry, I forgot to say that the Actions line must be like this
XML:
<Actions Context="Interactive">
I.e. Principal id and Actions Context must be identical.

Regards
Dalai
 

Callistemon

Active Member
It should work the way described here: https://www.hwinfo.com/forum/thread...atically-in-standard-accounts.7759/post-33321
and when the user is logged on. Did the system ask you to provide Admin password when you set it up that way?
Yes, after being set to run in the administrator, closing the task properties requires entering the administrator password. Likewise, the password for the standard account is required after setting it to run in the standard account.

That won't work because tasks run this way won't be shown on the user's desktop. The task is executed, and this works fine for non-interactive things, but it doesn't make sense for programs which require interaction. Actually, it's quite logical it works this way when you think about it. There can be multiple users logged on simultaneously - which one should be shown the program's GUI?

Note: Take a look at the task's execution result in Task Scheduler. That way you won't have to guess whether or not the process was actually run properly, and if it's still active.

Sorry, I forgot to say that the Actions line must be like this
XML:
<Actions Context="Interactive">
I.e. Principal id and Actions Context must be identical.

Regards
Dalai
It imported without error this time, but manually running it did not appear to do anything. Logging into the administrator account shows that it opened there. Wouldn't "Interactive" mean whichever account is currently being used?

I tested with a VBS message box. When a task is set to open in the Administrator, the message box appears there. When it is set to open in Spindle, it appears here. It should therefore be set to run in the standard account, but with the highest privileges. Why wouldn't that work either?

It appears that the Task Scheduler function of "Run with the highest privileges" is broken, which is not surprising since it is part of Microsoft Management Console that looks neglected for decades. I tested opening Command Prompt with "Highest privileges" under this account, and then tried sfc /scannow, which returned the "You must be administrator" error message.
 

Martin

HWiNFO Author
Staff member
If I'm not wrong Non-interactive means that it would be started in context of a service and such processes don't have access to GUI.
 

Dalai

Well-Known Member
Wouldn't "Interactive" mean whichever account is currently being used?
Yes, that's what it means, and if you run a simple program like Notepad you'll see that it's exactly what it does. I used that approach on several occasions so far, though I admit that the programs I've been running didn't require administrative privileges.

You could try to run the Elevate tool which then launches HWiNFO. Elevate itself doesn't require administrative privileges according to the manifest embedded in its executable. Something like this should work:
Code:
D:\somepath\elevate.exe d:\rive\path\to\hwinfo64.exe



I myself use a completely different approach to run HWiNFO in a regular/limited user account by making use of a tool called RunAs Professional, but I understand that that may not be for everybody. I bought that shareware back in 2004 long before UAC became a thing to be able to run administrative tasks on systems where users aren't supposed to have more privileges than they need.

Regards
Dalai
 
Top