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
Creating Groundhog Day (in Win XP or Win 8)
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Creating Groundhog Day (in Win XP or Win 8)
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.
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.
-
PeteThePen1
- Posts: 18
- Joined: 11. Oct 2012, 13:59
Re: Creating Groundhog Day (in Win XP or Win 8)
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
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