I have a need to update a specific registry key with the current date on the first boot of the machine after it is imaged.
Additionally, one issue is that the slashes have to be reversed. For example, if the date is 08/16/2009, the registry key needs to be updated to 08\16\2009.
What I'm visualizing is this:
A bat file of some sort that is set to run once on the first boot.
The bat file would somehow query for the current date, then create a reg file replacing the "/"s with "\"s.
Then execute the merging of the created reg file by invoking REGEDIT.EXE /S importfile.REG
This is just what I'm envisioning. If there's a better way, I'm definitely open to suggestions.
If it matters, this is what the created reg file with the current date would need to look like:
Thanks in advance for any help, assistance or advice!
Additionally, one issue is that the slashes have to be reversed. For example, if the date is 08/16/2009, the registry key needs to be updated to 08\16\2009.
What I'm visualizing is this:
A bat file of some sort that is set to run once on the first boot.
The bat file would somehow query for the current date, then create a reg file replacing the "/"s with "\"s.
Then execute the merging of the created reg file by invoking REGEDIT.EXE /S importfile.REG
This is just what I'm envisioning. If there's a better way, I'm definitely open to suggestions.
If it matters, this is what the created reg file with the current date would need to look like:
Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\PGP-IGA]
[HKEY_LOCAL_MACHINE\SOFTWARE\PGP-IGA\PREP]
"INSTALLDATE"="08\16\2009"
Thanks in advance for any help, assistance or advice!