[GH-ISSUE #288] Software installation dates showing as 0001-01-01 #2133

Open
opened 2026-03-14 02:41:47 +03:00 by kerem · 10 comments
Owner

Originally created by @djsvi on GitHub (Feb 22, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/288

Originally assigned to: @wh1te909 on GitHub.

Many (but not all) software installations are displaying a date of 0001-01-01. I have confirmed correct dates are showing under control panel > add/remove programs.

image

image

Any ideas?

Originally created by @djsvi on GitHub (Feb 22, 2021). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/288 Originally assigned to: @wh1te909 on GitHub. Many (but not all) software installations are displaying a date of 0001-01-01. I have confirmed correct dates are showing under control panel > add/remove programs. ![image](https://user-images.githubusercontent.com/79456430/108712377-cb233f00-756a-11eb-9bb0-cabad6bb9f24.png) ![image](https://user-images.githubusercontent.com/79456430/108712768-5ef50b00-756b-11eb-825b-96ddc79d0ef3.png) Any ideas?
Author
Owner

@aftechro commented on GitHub (Feb 23, 2021):

same here

<!-- gh-comment-id:784614808 --> @aftechro commented on GitHub (Feb 23, 2021): same here
Author
Owner

@wh1te909 commented on GitHub (Feb 25, 2021):

check the following 2 registry paths
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

For software that's showing 0001-01-01, you'll notice they are missing the InstallDate string value.

It's the responsibility of the software developer to make sure they set the InstallDate value in their installer.

It shows up in control panel cuz Windows is getting it from somewhere else, maybe WMI but not 100% sure.

This is pretty low priority for me atm, so if you guys wanna research and see where else I can check for an install date let me know.

<!-- gh-comment-id:786128965 --> @wh1te909 commented on GitHub (Feb 25, 2021): check the following 2 registry paths ```HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall``` ```HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall``` For software that's showing 0001-01-01, you'll notice they are missing the `InstallDate` string value. It's the responsibility of the software developer to make sure they set the `InstallDate` value in their installer. It shows up in control panel cuz Windows is getting it from somewhere else, maybe WMI but not 100% sure. This is pretty low priority for me atm, so if you guys wanna research and see where else I can check for an install date let me know.
Author
Owner

@djsvi commented on GitHub (Mar 6, 2021):

check the following 2 registry paths
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

For software that's showing 0001-01-01, you'll notice they are missing the InstallDate string value.

It's the responsibility of the software developer to make sure they set the InstallDate value in their installer.

It shows up in control panel cuz Windows is getting it from somewhere else, maybe WMI but not 100% sure.

This is pretty low priority for me atm, so if you guys wanna research and see where else I can check for an install date let me know.

I have looked into this. Apparently if the value of InstallDate isn't populated for an application then Add/Remove Programs simply looks up the 'last write time' for that application's registry key and uses that. Since I note you're referencing 3rd party code to generate the installed applications list, it might be better to have them incorporate that kind of change.

Two side points on this (not wishing to deviate too far from the original issue):

  1. In the UI you might want to format the date as just YYYY-MM-DD, the time and time zone aren't meaningful and clutter the UI.
  2. I note the code you reference collects the uninstallstring as well - it would be handy to surface that in the UI.

Cheers.

<!-- gh-comment-id:791852224 --> @djsvi commented on GitHub (Mar 6, 2021): > check the following 2 registry paths > `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall` > `HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall` > > For software that's showing 0001-01-01, you'll notice they are missing the `InstallDate` string value. > > It's the responsibility of the software developer to make sure they set the `InstallDate` value in their installer. > > It shows up in control panel cuz Windows is getting it from somewhere else, maybe WMI but not 100% sure. > > This is pretty low priority for me atm, so if you guys wanna research and see where else I can check for an install date let me know. I have looked into this. Apparently if the value of InstallDate isn't populated for an application then Add/Remove Programs simply looks up the 'last write time' for that application's registry key and uses that. Since I note you're referencing 3rd party code to generate the installed applications list, it might be better to have them incorporate that kind of change. Two side points on this (not wishing to deviate too far from the original issue): 1. In the UI you might want to format the date as just YYYY-MM-DD, the time and time zone aren't meaningful and clutter the UI. 2. I note the code you reference collects the uninstallstring as well - it would be handy to surface that in the UI. Cheers.
Author
Owner

@wh1te909 commented on GitHub (Mar 6, 2021):

@djsvi thanks for that! i'll look into getting the last write time.

For the date format I had the same idea lol, I think you're still on an old version of the RMM because in latest version i already changed the date format to match what shows up in control panel add/remove programs. So just update to latest version and once your agents update you'll see the new date format.

Yea the uninstall string is currently stored in the rmm's database just not displaying it in the UI yet. Was thinking to add an "uninstall" button next to each software and just have it call the uninstall cmd

<!-- gh-comment-id:792068889 --> @wh1te909 commented on GitHub (Mar 6, 2021): @djsvi thanks for that! i'll look into getting the last write time. For the date format I had the same idea lol, I think you're still on an old version of the RMM because in latest version i already changed the date format to match what shows up in control panel add/remove programs. So just update to latest version and once your agents update you'll see the new date format. Yea the uninstall string is currently stored in the rmm's database just not displaying it in the UI yet. Was thinking to add an "uninstall" button next to each software and just have it call the uninstall cmd
Author
Owner

@djsvi commented on GitHub (Mar 6, 2021):

Thanks @wh1te909, I've updated and the new date format is showing, but it's in US date format.. might have been better to use YYYY-MM-DD which is more universally recognised. Otherwise a 'date format' setting under user preferences would allow you to display the user's preferred format everywhere, but I guess would require a bunch of extra code.

With the uninstall string - a button would be good if it allows 1) the string to be copied to clipboard, say for later use in a script and 2) modification of the string before it gets executed on the agent, as there are often additional parameters needed for truly silent uninstallation.

<!-- gh-comment-id:792101874 --> @djsvi commented on GitHub (Mar 6, 2021): Thanks @wh1te909, I've updated and the new date format is showing, but it's in US date format.. might have been better to use YYYY-MM-DD which is more universally recognised. Otherwise a 'date format' setting under user preferences would allow you to display the user's preferred format everywhere, but I guess would require a bunch of extra code. With the uninstall string - a button would be good if it allows 1) the string to be copied to clipboard, say for later use in a script and 2) modification of the string before it gets executed on the agent, as there are often additional parameters needed for truly silent uninstallation.
Author
Owner

@wh1te909 commented on GitHub (Mar 7, 2021):

Thanks @wh1te909, I've updated and the new date format is showing, but it's in US date format.. might have been better to use YYYY-MM-DD which is more universally recognised. Otherwise a 'date format' setting under user preferences would allow you to display the user's preferred format everywhere, but I guess would require a bunch of extra code.

With the uninstall string - a button would be good if it allows 1) the string to be copied to clipboard, say for later use in a script and 2) modification of the string before it gets executed on the agent, as there are often additional parameters needed for truly silent uninstallation.

Ok i'll change it to YYYY-MM-DD format in the next agent. User preference for date would be nice we can add that later.

And sounds good for the uninstall stuff I can definitely implement those

<!-- gh-comment-id:792128067 --> @wh1te909 commented on GitHub (Mar 7, 2021): > Thanks @wh1te909, I've updated and the new date format is showing, but it's in US date format.. might have been better to use YYYY-MM-DD which is more universally recognised. Otherwise a 'date format' setting under user preferences would allow you to display the user's preferred format everywhere, but I guess would require a bunch of extra code. > > With the uninstall string - a button would be good if it allows 1) the string to be copied to clipboard, say for later use in a script and 2) modification of the string before it gets executed on the agent, as there are often additional parameters needed for truly silent uninstallation. Ok i'll change it to `YYYY-MM-DD` format in the next agent. User preference for date would be nice we can add that later. And sounds good for the uninstall stuff I can definitely implement those
Author
Owner

@djsvi commented on GitHub (Mar 7, 2021):

Great! Can I suggest keeping all dates/times in UTC / 'native' format in the agent and database and then applying the required formatting at display time, i.e. this should (generally) be a UI change, not an agent change.

<!-- gh-comment-id:792195915 --> @djsvi commented on GitHub (Mar 7, 2021): Great! Can I suggest keeping all dates/times in UTC / 'native' format in the agent and database and then applying the required formatting at display time, i.e. this should (generally) be a UI change, not an agent change.
Author
Owner

@wh1te909 commented on GitHub (Mar 7, 2021):

Great! Can I suggest keeping all dates/times in UTC / 'native' format in the agent and database and then applying the required formatting at display time, i.e. this should (generally) be a UI change, not an agent change.

yes this is how we already do it currently for the majority of things, dates are all stored as UTC and then are converted and displayed in the web UI based on the agent's timezone which you can set per agent. In this case however I just did a quick temp fix since for the installed software, since the software list is stored as just a simple json field in the db, not creating a separate row for each software which then i could add a datetime db field. Not super priority atm but eventually can rework it.

<!-- gh-comment-id:792246515 --> @wh1te909 commented on GitHub (Mar 7, 2021): > Great! Can I suggest keeping all dates/times in UTC / 'native' format in the agent and database and then applying the required formatting at display time, i.e. this should (generally) be a UI change, not an agent change. yes this is how we already do it currently for the majority of things, dates are all stored as UTC and then are converted and displayed in the web UI based on the agent's timezone which you can set per agent. In this case however I just did a quick temp fix since for the installed software, since the software list is stored as just a simple json field in the db, not creating a separate row for each software which then i could add a datetime db field. Not super priority atm but eventually can rework it.
Author
Owner

@subzdev commented on GitHub (Apr 28, 2021):

Having an uninstall button would be a REALLY nice feature IMO.

<!-- gh-comment-id:828355045 --> @subzdev commented on GitHub (Apr 28, 2021): Having an uninstall button would be a REALLY nice feature IMO.
Author
Owner

@silversword411 commented on GitHub (Sep 21, 2021):

Not sure if this is complete (date addition is) or it if's still in-process because of the "add uninstall button" addon.

Add uninstall button could auto-run this auto-magically: https://github.com/wh1te909/tacticalrmm/blob/develop/scripts/Win_Software_Uninstall.ps1

<!-- gh-comment-id:923999671 --> @silversword411 commented on GitHub (Sep 21, 2021): Not sure if this is complete (date addition is) or it if's still in-process because of the "add uninstall button" addon. Add uninstall button could auto-run this auto-magically: https://github.com/wh1te909/tacticalrmm/blob/develop/scripts/Win_Software_Uninstall.ps1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#2133
No description provided.