Windows Archives - ISbyR https://isbyr.com/tag/windows/ Infrequent Smarts by Reshetnikov Sun, 11 Feb 2024 22:20:10 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 Fix time drift on UTM Windows VM https://isbyr.com/fix-time-drift-on-utm-windows-vm/ https://isbyr.com/fix-time-drift-on-utm-windows-vm/#respond Wed, 17 Jan 2024 22:08:43 +0000 https://isbyr.com/?p=1145 I mainly use Mac for work, but occasionally need access to a Windows box. I am using UTM to achieve that. I have noticed that if you leave your Windows VM running and then your host Mac goes to sleep (overnight for example), there will be a time drift on the VM. So here is … Continue reading Fix time drift on UTM Windows VM

The post Fix time drift on UTM Windows VM appeared first on ISbyR.

]]>
I mainly use Mac for work, but occasionally need access to a Windows box. I am using UTM to achieve that. I have noticed that if you leave your Windows VM running and then your host Mac goes to sleep (overnight for example), there will be a time drift on the VM. So here is how to fix time drift on UTM Windows VM.

Discovery and manual approach

The first thing I checked was if the time is set automatically, and yes it is

Then I tried to turn it off/on – and it helped! It fixed the time drift on the UTM Windows VM.

But that only lasted until the next time MAC went to sleep… 🙁

Semi-automatic approach

While toggling the switch using Windows UI I noticed that a pop-up message was displayed

That gave me an idea: instead of manually toggling the time switch, why don’t I run the above command?! Hmm, but what kind of parameters should I use?

Luckily there was the “Show more details” link.

So, I put the below command inside a batch file and every time I access the UTM Windows VM I just run it manually.

it.C:\Windows\System32\SystemSettingsAdminFlows.exe SetInternetTime 1

While not a fully an automatic approach it saves me from going into Time settings and toggling the switch.

How to automatically fix time drift on UTM Windows VM

Now if you want a fully hands-off approach just create a scheduled job to run this batch for you.

You could either do it on a scheduled basis, like let’s say every 5 minutes, or better on a certain “wake-up” Windows event. Once I figure out what is the best event to use as the trigger I’ll update this section.

More posts about UTM

The post Fix time drift on UTM Windows VM appeared first on ISbyR.

]]>
https://isbyr.com/fix-time-drift-on-utm-windows-vm/feed/ 0
Qwiklabs – GCP Essentials – Compute Engine Qwik Start – Windows Tips https://isbyr.com/qwiklabs-gcp-essentials-compute-engine-qwik-start-windows-tips/ https://isbyr.com/qwiklabs-gcp-essentials-compute-engine-qwik-start-windows-tips/#comments Tue, 27 Feb 2018 10:25:45 +0000 http://isbyr.com/?p=240 After finishing the Qwiklabs – GCP Essentials – Creating a Virtual Machine lab I was going over the  “Compute Engine Qwik Start – Windows” one and stumbled open a few misalignment between the lab and the actual environment. When you need to choose the OS the lab says: “Choose Windows Server 2012 R2,..”, however you will … Continue reading Qwiklabs – GCP Essentials – Compute Engine Qwik Start – Windows Tips

The post Qwiklabs – GCP Essentials – Compute Engine Qwik Start – Windows Tips appeared first on ISbyR.

]]>
After finishing the Qwiklabs – GCP Essentials – Creating a Virtual Machine lab I was going over the  “Compute Engine Qwik Start – Windows” one and stumbled open a few misalignment between the lab and the actual environment.

When you need to choose the OS the lab says: “Choose Windows Server 2012 R2,..”, however you will not find such to be available.

old boot disk config

What I had were:

actual boot disk config

So I’ve chosen the former.

 

When you start the VM you are advised  that it might take some time before the machine will be RDP-able and you need to run  gcloud compute instances get-serial-port-output instance-1  using Cloud Console and wait for the below output (which will indicate that now you can RDP to it)

2018/02/27 05:27:05 GCEInstanceSetup: ------------------------------------------------------------
2018/02/27 05:27:05 GCEInstanceSetup: Instance setup finished. instance-1 is ready to use. Activation will continue in the backgr
ound.
2018/02/27 05:27:05 GCEInstanceSetup: ------------------------------------------------------------

I’ve scanned the few last lines and couldn’t see it, I run the above command again a few more times (with additional parameter, that specifies to show only the delta from the previous output). but nothing changed. Then I decided to scroll all the way up and this message actually appeared almost in the few first lines of the output

The post Qwiklabs – GCP Essentials – Compute Engine Qwik Start – Windows Tips appeared first on ISbyR.

]]>
https://isbyr.com/qwiklabs-gcp-essentials-compute-engine-qwik-start-windows-tips/feed/ 1
Samsung Galaxy TabPro S screen dimming settings https://isbyr.com/samsung-galaxy-tabpro-s-screen-dimming-settings/ https://isbyr.com/samsung-galaxy-tabpro-s-screen-dimming-settings/#comments Tue, 17 Jan 2017 19:53:41 +0000 http://isbyr.com/?p=180 I’ve played recently with Samsung Galaxy TabPro S and liked it very much, especially its screen. However one thing was driving me crazy – the auto dimming of the screen. Setting the dimming timeout in Windows settings After searching for a while on the internet I’ve found how to change the Galaxy TabPro S screen … Continue reading Samsung Galaxy TabPro S screen dimming settings

The post Samsung Galaxy TabPro S screen dimming settings appeared first on ISbyR.

]]>
I’ve played recently with Samsung Galaxy TabPro S and liked it very much, especially its screen. However one thing was driving me crazy – the auto dimming of the screen.

Setting the dimming timeout in Windows settings

After searching for a while on the internet I’ve found how to change the Galaxy TabPro S screen dimming timeout.
You need to go to Settings – Extras – Galaxy Settings – AMOLED. The maximum timeout you can set there is 10 minutes. You can’t go any more then 10 minutes. This is done to protect your Samsung’s beautiful AMOLED screen from burnouts.

Workaround for manufacturer’s limit

I did find a workaround for that which I use only when I have non-static images (like games/presentations/videos) displayed.

Warning – use it at your own risk, and there is one (or two):

  • You are needing with settings that manufacturer decided to limit.
  • You will be touching Windows registry

Samsung Galaxy TabPro S – screen dimming timeout setting can be changed in registry by setting the Interval property under HKEY_CURRENT_USER\Samsung\SamsungSettings\DimmingOption


Reverting back

Changing back to one of the values provided my Samsung (1, 5 or 10 minutes) can be done via Settings as described previously, no need to touch Windows Registry.

The post Samsung Galaxy TabPro S screen dimming settings appeared first on ISbyR.

]]>
https://isbyr.com/samsung-galaxy-tabpro-s-screen-dimming-settings/feed/ 9
How to copy PuTTY SSH Hosts Keys between different users/machines on Windows https://isbyr.com/copy-putty-ssh-hosts-keys-different-usersmachines-windows/ https://isbyr.com/copy-putty-ssh-hosts-keys-different-usersmachines-windows/#respond Fri, 20 Nov 2015 01:09:52 +0000 http://isbyr.com/?p=141 Intro Sometimes you would want to copy PuTTY hosts SSH keys between different users or machines. Having the keys stored will prevent the pop-up message in PuTTY (or Plink/PSCP) when you try to connect to the remote host for the first time. Some of the cases you would want to do that is: Solution was … Continue reading How to copy PuTTY SSH Hosts Keys between different users/machines on Windows

The post How to copy PuTTY SSH Hosts Keys between different users/machines on Windows appeared first on ISbyR.

]]>
Intro

Sometimes you would want to copy PuTTY hosts SSH keys between different users or machines. Having the keys stored will prevent the pop-up message in PuTTY (or Plink/PSCP) when you try to connect to the remote host for the first time.

Some of the cases you would want to do that is:

  • Solution was developed and tested on one machine but will need to run on an other
  • You want to carry you host keys from one machine to another

This article is about copying PuTTY SSH hosts keys focused on doing so on Windows machines.

Method

The Putty SSH hosts keys are saved in registry in

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys]

for the current user.
So if you are copying keys for the current user you are logged in with (but between different machines) its easy. Just export the relevant registry path and import it on the destination machine.

The problem raises when you want to copy keys to profile of a user other then the user you are currently logged in with.

Identify your destination in registry

  • Open command line (on the target server) and run
    REG QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist | findstr TARGETUSER
  • For example I want to copy my keys to user ilya_adm
C:\REG QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist | findstr ilya_adm
    \Registry\User\S-1-5-21-1229272821-1123561945-839522115-123456    REG_SZ    \Device\HarddiskVolume1\Users\ilya_adm\NTUSER.DAT
    \Registry\User\S-1-5-21-1229272821-1123561945-839522115-123456_Classes    REG_SZ    \Device\HarddiskVolume1\Users\ilya_adm\AppData\Local\Microsoft\Windows\UsrClass.dat
  • Note the GUID S-1-5-21-1229272821-1123561945-839522115-123456
  • Due to the above the destination location in registry will be [HKEY_USERS\S-1-5-21-1229272821-1123561945-839522115-123456\Software\SimonTatham\PuTTY\SshHostKeys]

Manually update the registry

You can manually duplicate a single host key entry by creating a new STRING value in the destination registry location ( [HKU\S-1-5-21-….-123456\Software\SimonTatham\PuTTY\SshHostKeys]) and copy the Name and Value from the source location (HKCU\Software\SimonTatham\PuTTY\SshHostKeys)

Export/Import PuTTY SSH Hosts keys

Perform with caution and preferably back up the destination registry location

  • Export the they host keys from source location to a file.

From command line run

REG EXPORT HKCU\Software\SimonTatham\PuTTY\SshHostKeys c:\temp\source.reg

  • Open the c:\temp\source.reg file
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys]
"rsa2@22:123.xx.1237"="0x10001,0xaeda610d2dea35d252c8410cb6c7
"rsa2@22:123.xx.12319"="0x10001,0xd9f47896e1aaebb85d801ac5d75
"rsa2@22:123.xx.1238"="0x10001,0xf3ce0d57f72f09b4f48d23c763fe
"rsa2@22:123.xx.123213"="0x10001,0xd9f47896e1aaebb85d801ac5d7
  • In the file the change the location to be the destination. for example

update
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys]
to be
[HKEY_USERS\S-1-5-21-1229272821-1123561945-839522115-123456\Software\SimonTatham\PuTTY\SshHostKeys]

Windows Registry Editor Version 5.00
[HKEY_USERS\S-1-5-21-1229272821-1123561945-839522115-123456\Software\SimonTatham\PuTTY\SshHostKeys]
"rsa2@22:123.xx.1237"="0x10001,0xaeda610d2dea35d252c8410cb6c7
"rsa2@22:123.xx.12319"="0x10001,0xd9f47896e1aaebb85d801ac5d75
"rsa2@22:123.xx.1238"="0x10001,0xf3ce0d57f72f09b4f48d23c763fe
"rsa2@22:123.xx.123213"="0x10001,0xd9f47896e1aaebb85d801ac5d7
  • Save the file and import

From command line run

    REG IMPORT c:\temp\source.reg

Done

That’s it. Now you have the all the PuTTY SSH hosts keys from the source (user/machine) registry in the  destination (user/machine) registry.

Image by Brenda Clarke

The post How to copy PuTTY SSH Hosts Keys between different users/machines on Windows appeared first on ISbyR.

]]>
https://isbyr.com/copy-putty-ssh-hosts-keys-different-usersmachines-windows/feed/ 0