Don't forget that quser.exe is only available in Windows "pro" versions.SilverAzide wrote:Wow, you've been logged on a really long time!
If you can do me a favor, I'd appreciate it... if you still see this, can you enter the command "quser" at a command prompt and post the results? It should look something like this:
I'm wondering what your logon time date format looks like...Code: Select all
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME ><username> console 1 Active none 8/4/2017 6:29 AM
It is currently April 19th, 2024, 11:17 am
Gadgets 7.6.1 - inspired by AddGadgets.com Sidebar Gadgets
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
-
- Rainmeter Sage
- Posts: 2603
- Joined: March 23rd, 2015, 5:26 pm
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
It is? Noooooooooo!jsmorley wrote:Don't forget that quser.exe is only available in Windows "pro" versions.
Well, crap. Back to the drawing board then. <sigh>
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
Yeah, and I have found no working alternative for it. I can find no way to get the login date and time of a "user account" that is distinct from the system boot time, other than quser.exe. All you can do is check for the version of windows, and if it is not "pro" or higher, then disable and hide the entire thing.SilverAzide wrote:It is? Noooooooooo!
Well, crap. Back to the drawing board then. <sigh>
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
Another alternative would be to watch for an error message from RunCommand, and if found, just use the system uptime for both the system and user values.
"is not recognized"
"is not recognized"
-
- Rainmeter Sage
- Posts: 2603
- Joined: March 23rd, 2015, 5:26 pm
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
I like that idea. Trying to determine "Pro-vs.-nonPro" on everything from XP to Server 2016 could get a little gnarly.jsmorley wrote:Another alternative would be to watch for an error message from RunCommand, and if found, just use the system uptime for both the system and user values.
Thanks for the suggestion!
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
So something like this perhaps...
I need the initial "check" measure due to the Substitute and FinishAction on the real deal.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
OnRefreshAction=[!CommandMeasure MeasureCheckQUSER "Run"]
[MeasureCurrentTime]
Measure=Time
[MeasureUpTime]
Measure=UpTime
Format="%4!i!d %3!i!h %2!i!m"
[MeasureGetUserName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=USER_NAME
UpdateDivider=-1
[MeasureCheckQUSER]
Measure=Plugin
Plugin=RunCommand
Parameter=quser "[MeasureGetUserName]"
State=Hide
OutputType=ANSI
DynamicVariables=1
IfMatch=USERNAME
IfMatchAction=[!SetOption MeterUserLogin MeasureName "MesureParseSeconds"][!CommandMeasure MeasureUserLoginTime "Run"]
IfNotMatchAction=[!SetOption MeterUserLogin MeasureName "MeasureUpTime"]
[MeasureUserLoginTime]
Measure=Plugin
Plugin=RunCommand
Parameter=quser "[MeasureGetUserName]"
State=Hide
OutputType=ANSI
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?si).* (.*)$":"\1","#CRLF#":""
FinishAction=[!EnableMeasureGroup UserTimes]
[MeasureUserFormat]
Measure=Time
Group=UserTimes
TimeStamp=[MeasureUserLoginTime]
TimeStampFormat=%#m/%#d/%Y %#I:%M %p
Format=%a, %b %#d - %#I:%M %p
DynamicVariables=1
Disabled=1
[MeasureUserDiff]
Measure=Time
Group=UserTimes
TimeStamp=([MeasureCurrentTime:timestamp] - [MeasureUserFormat:timestamp])
DynamicVariables=1
Disabled=1
[MesureParseSeconds]
Measure=UpTime
Group=UserTimes
SecondsValue=[MeasureUserDiff:timestamp]
Format="%4!i!d %3!i!h %2!i!m"
DynamicVariables=1
Disabled=1
[MeterUpTimeText]
Meter=String
X=15
Y=2R
StringAlign=Left
FontSize=10
FontColor=255,255,255,255
AntiAlias=1
Text=System
[MeterUpTime]
MeasureName=MeasureUpTime
Meter=String
X=154
Y=0r
StringAlign=Right
AutoScale=1
NumOfDecimals=1
FontSize=10
FontColor=255,255,255,255
AntiAlias=1
[MeterUserLoginText]
Meter=String
X=15
Y=2R
StringAlign=Left
FontSize=10
FontColor=255,255,255,255
StringCase=Proper
AntiAlias=1
DynamicVariables=1
Text=[MeasureGetUserName]
[MeterUserLogin]
Meter=String
MeasureName=MesureParseSeconds
X=154
Y=0r
StringAlign=Right
AutoScale=1
NumOfDecimals=1
FontSize=10
FontColor=255,255,255,255
AntiAlias=1
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
Got the same thing.
You do not have the required permissions to view the files attached to this post.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
This problem is different. The issue is that quser.exe is using the "locale" for the date and time format in Windows.CyberTheWorm wrote:Got the same thing.
Capture.PNG
Yours is:
2017-07-15 03:43
Mine is:
8/4/2017 10:23 AM
This makes it a bunch harder to parse and convert to timestamps.
I'm not entirely sure this bit of information is worth the effort it will take to get right on all systems...
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
http://windowsitpro.com/windows-server/jsi-tip-0311-regional-settings-registry
It would be complex in the extreme to get all the "International" stuff you would need from the registry, and then tailor the Substitute and TimeStampFormat options to match. I think the best bet is to just let it do its thing, based on the default US-English locale settings, and if the resulting value is an unreasonable number like >365 days, just bail out to using Uptime. I think it is pretty safe to say that you haven't been logged on for 417 years...
It would be complex in the extreme to get all the "International" stuff you would need from the registry, and then tailor the Substitute and TimeStampFormat options to match. I think the best bet is to just let it do its thing, based on the default US-English locale settings, and if the resulting value is an unreasonable number like >365 days, just bail out to using Uptime. I think it is pretty safe to say that you haven't been logged on for 417 years...
You do not have the required permissions to view the files attached to this post.
-
- Posts: 2
- Joined: August 4th, 2017, 2:48 pm
Re: Gadgets 3.0.0 - inspired by AddGadgets.com Sidebar Gadgets
Thanks for making these nice AddGadget monitors
I have used them since they were originally made for Windows 7 I think.
I have just loaded the latest rainmeter beta, and your latest AddGadgets.
But the Drives meter shows 100% load on all drives. I can not seem to find out how to fix this.
Is HWiNFO needed for this. Did not use that in an older version.
Have you seen this before?
I have used them since they were originally made for Windows 7 I think.
I have just loaded the latest rainmeter beta, and your latest AddGadgets.
But the Drives meter shows 100% load on all drives. I can not seem to find out how to fix this.
Is HWiNFO needed for this. Did not use that in an older version.
Have you seen this before?