Page 1 of 1

Creating Groundhog Day (in Win XP or Win 8)

Posted: 9. Mar 2022, 23:46
by PeteThePen1
I have what is probably the oddest query of the week. I would like to set up a Guest in Win 10 using Win XP or Win 8 that always starts with the date and time set to a fixed past date.

Why? I have some old and rarely used software that I find useful occasionally, but it checks the data and time. If the date is too soon it falls over and if the date is too late it shuts down.

As a secondary question, would I be right in assuming that if I set up a Guest with no network adapter it cannot see the Internet and should thus be safe from virus attack?

Many thanks.

Pete

Re: Creating Groundhog Day (in Win XP or Win 8)

Posted: 10. Mar 2022, 01:17
by scottgus1
There are two commands necessary to get a "Groundhog Day"-dated VM to always start on a particular day:

VBoxManage setextradata "VM name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
VBoxManage modifyvm "VM name" --biossystemtimeoffset -milliseconds

'milliseconds' is negative for time set to the past in the VM. You have to calculate the number of milliseconds needed. I believe the number has to be increased for each start, to compensate for real time's advance. See viewtopic.php?f=32&t=100959 for a 3rd-party app that purports to make the millisecond calculation automatically. Or you can calculate based on 86,400,000 milliseconds per 24-hour day, and use whatever method you can find to determine the number of days between now and your groundhog date.

https://www.dostips.com/DtTipsDateTime.php shows a DOS batch file that might be modifiable to make a how-many-days-since-Groundhog-date calculation, then multiply by 86400000 then run the vboxmanage commands, then run the VM. VBscript 'datediff' can also calculate days, even seconds, between your Groundhog date and now.

Re: Creating Groundhog Day (in Win XP or Win 8)

Posted: 15. Mar 2022, 22:40
by PeteThePen1
Hi Gus

Many thanks for your post. That will be really useful. All I need to do now is to persuade it to work for me.

Best wishes

Pete