Had this happen on a Dutch Windows 10 system today, a retry did not work, but a manual reboot solved it [WayBack] Windows 10: Update error 0x8024a112 | Born’s Tech and Windows World.
–jeroen
Posted by jpluimers on 2018/03/13
Had this happen on a Dutch Windows 10 system today, a retry did not work, but a manual reboot solved it [WayBack] Windows 10: Update error 0x8024a112 | Born’s Tech and Windows World.
–jeroen
Posted in Power User, Windows, Windows 10 | Leave a Comment »
Posted by jpluimers on 2018/03/09
Windows 10 (and 8) include a new virtual memory file named swapfile.sys. It’s stored in your system drive, along with the pagefile.sys and hiberfil.sys. But why does Windows need both a swap file and a page file?
…
In summary, the swapfile — swapfile.sys — is currently used for swapping out Microsoft’s new style of app. Microsoft has called these universal apps, Windows Store apps, Metro apps, Modern apps, Windows 8 apps, Windows 8-style UI apps, and other things at various points.
via:
Posted in Power User, Windows, Windows 10, Windows 8, Windows 8.1, Windows 9 | Leave a Comment »
Posted by jpluimers on 2018/03/08
When git on Windows suddenly gives you this when the repository URL opens fine in Chrome:
C:\Users\jeroenp\Versioned>git clone https://bitbucket.org/jeroenp/libssh2-delphi Cloning into 'libssh2-delphi'... remote: Not Found fatal: repository 'https://bitbucket.org/jeroenp/libssh2-delphi/' not found
but this worked fine:
C:\Users\jeroenp\Versioned>git clone https://github.com/jpluimers/GExperts.git Cloning into 'GExperts'... remote: Counting objects: 12031, done. remote: Total 12031 (delta 0), reused 0 (delta 0), pack-reused 12031R Receiving objects: 100% (12031/12031), 9.77 MiB | 1.36 MiB/s, done. Resolving deltas: 100% (9284/9284), done.
I first thought “huh?”.
Then I remembered: this was a Mercurial repository, but I hardly use Mercurial any more…
C:\Users\jeroenp\Versioned>hg clone https://jeroenp@bitbucket.org/jeroenp/libssh 2-delphi destination directory: libssh2-delphi requesting all changes adding changesets adding manifests adding file changes added 30 changesets with 56 changes to 25 files updating to branch default 12 files updated, 0 files merged, 0 files removed, 0 files unresolved
Since I wanted to switch away from bitbucket for a long time anyway, it was time to say goodbye and find out how to make the conversion to git.
A quick search revealed there were many tedious manual ways involving command-lines: [WayBack] Convert Mercurial project to Git – Stack Overflow
But then I found out that github can fully automagically import a Mercurial Repository (of course without the BitBucket attached bells and whistles like issue tracker):
So it is now at github.com/jpluimers/libssh2-delphi with one user still to be mapped at github.com … libssh2-delphi/import/authors: Zeljko Marjanovic. If I ever get in contact with him (I tried over the last 2 years), then I will add him.
For now, I will be in touch with Vadum Lou (a.k.a. https://github.com/pult, full nameVadim V. Lopushansky) who already made another manually copied fork and get his additions integrated.
I might redo the conversion process later on as at least some of his submissions are at least partially in a Mercurial pull request.
Then I need to merge the develop branch into the master branch and prepare a release.
Oh: if it fails to debug in Delphi, then run the EXE alone. You will get an error like this:
---------------------------
SftpClientDemo.exe - System Error
---------------------------
The program can't start because MSVCR120.dll is missing from your computer. Try reinstalling the program to fix this problem.
---------------------------
OK
---------------------------
I need to document this better in the README.md: the underlying libssh2 DLLs require the Visual Studio 2013 C++ run-time library to be installed. The latest version I could find as of writing is vcredist_x86.exe version 12.0.40649.5 from the Update for Visual C++ 2013 and Visual C++ Redistributable Package at https://support.microsoft.com/en-us/kb/3138367 (download selection) or http://download.microsoft.com/download/C/C/2/CC2DF5F8-4454-44B4-802D-5EA68D086676/vcredist_x86.exe (direct download).
I need to update If a program you wrote can’t start becuase MSVCR*.dll is missing, then you forgot to ship the Visual C++ runtime… from 2012 on this as well as there are more versions available now than listed there.
Another error I got was the one below when running .NET stuff, but that might be because Windows Update was in progress:
---------------------------
SourceTree.exe - System Error
---------------------------
The program can't start because D3DCOMPILER_47.dll is missing from your computer. Try reinstalling the program to fix this problem.
---------------------------
OK
---------------------------
Later: yes, that was indeed fixed during Windows update. Apparently, Microsoft has an update installation order issue or a dependency requirement issue where part of .NET depends on that DLL, even though it is not yet present.
–jeroen
Posted in .NET, Delphi, Development, Power User, Software Development, Windows, Windows 7 | Leave a Comment »
Posted by jpluimers on 2018/02/26
This seems to work on other Windows versions as well: [WayBack] Windows 10 auto-logout on <5 minutes of inactivity – Super User
Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016 | Leave a Comment »
Posted by jpluimers on 2018/02/21
Searching for shutdown isn’t enough as frequent WAS messages also contain that search string.
Searching for shutdown of will work as they match both these:
The process C:\Windows\system32\shutdown.exe (COMPUTERNAME) has initiated the shutdown of computer COMPUTERNAME on behalf of user COUNTERS\Administrator for the following reason: No title for this reason could be found
Reason Code: 0x800000ff
Shutdown Type: shutdown
Comment:
and
The reason supplied by user DOMAIN\Username for the last unexpected shutdown of this computer is: Other (Unplanned)
Reason Code: 0xa000000
Problem ID: ######
Bugcheck String:
Comment: VM host failure
–jeroen
Posted in Power User, Windows, Windows Server 2008 | Leave a Comment »
Posted by jpluimers on 2018/02/19
You might think the Console.log belongs Console.exe. That’s right, but that’s a different thing than the Windows Command prompt that many people call console, but is in fact C:\Windows\System32\cmd.exe on a default Windows installation.
C:\Program Files\Windows Small Business Server\Logs>dir console.log
It belongs to the SBS 2008 console which you can access using the https://sbs2008serverIP/remote (for more details, read [WayBack] Accessing Windows SBS Console) and is served by:
C:\Program Files\Windows Small Business Server\Bin\console.exe
It is started when any user logs on (which is sort of odd) and never log-rotates the log file but keeps the log file locked when the process executes.
So the only way to get rid of a really big console.log file is this:
taskschd.msc)C:\Program Files\Windows Small Business Server\Logs>dir console.log fileFurther reading:
–jeroen
Posted in Power User, Windows, Windows Server 2008 | Leave a Comment »
Posted by jpluimers on 2018/02/19
When cleaning out an old SBS 2008 Servers, I saw a huge “DataServiceComponents.log” file. [WayBack] SBS 2008 disk space and the DataServiceComponents.log file – Oxford SBS Guy indicated how to clean it up and pointed to [WayBack] Recovering Disk Space on the C: Drive in Small Business Server 2008 | The Windows Server Essentials and Small Business Server Blog.
Both posts have the problem that many backslashes missing in the the various paths.
So this is how I cleaned the DataServiceComponents.log file using an UAC command prompt:
C:\Program Files\Windows Small Business Server\Logs\MonitoringServiceLogs
net stop DataCollectorSvc
"C:\Program Files\7-Zip\7z.exe"a -t7z -m0=lzma2 -mx=9 -aoa -mfb=64 -md=32m -ms=on -sdel DataServiceComponents-backup.7z DataServiceComponents.log
net start DataCollectorSvc
Note that DataCollectorSvc is the shorthand for the Windows SBS Manager service.
–jeroen
Posted in Power User, Windows, Windows Server 2008 | Leave a Comment »
Posted by jpluimers on 2018/02/05
I often wonder why do they make changing the network location more difficult in each Windows version.
Anyway: for Windows 10, the secpol.msc way still works even though by default you now need to use a command prompt or the Windows-R key-combo to start it as typing it in the “Ask me Anything” search often gets you to bing (the search is too slow to figure out it is available locally even if you’re running a machine with SSD).
So from [WayBack] Top 10: Windows Firewall Netsh Commands (via: Windows Server content from Windows IT Pro), this still works in Windows 10:
a secpol.msc way that is easy:
- Press Win+R, then type
secpol.msc- Click on “Network List Manager Policies”
- Double-click on your network
- Optionally give your network another name
- Click on “Tab Network Location”
- Set “Location Type” to “Private”
Go back to Network and Sharing Center to check the result.
In Windows 10 there are half a dozen other ways: [WayBack] Network Location – Set to Private or Public in Windows 10 – Windows 10 Tutorials
- Option One: To Change a Network Location in Settings app
- Option Two: To Change a Network Location in Registry Editor
- Option Three: To Change a Network Location Local Security Policy
- Option Four: To Change a Network Location in PowerShell
- Option Five: To Change Network Location of Current Network Connection in PowerShell
- Option Six: To Change Network Location of Current Network Connection using a VBS file
I like this PowerShell script too via [WayBack] networking – How do I force Windows 10 to see a network as private? – Super User:
## Change NetWorkConnection Category to Private
#Requires -RunasAdministrator
Get-NetConnectionProfile |
Where{ $_.NetWorkCategory -ne 'Private'} |
ForEach {
$_
$_|Set-NetConnectionProfile -NetWorkCategory Private -Confirm
}
–jeroen
Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1 | Leave a Comment »
Posted by jpluimers on 2018/02/02
Here’s how you can find out when your domain password will expire.
net user %USERNAME% /domain
It figures this out for the current logon domain (so it doesn’t work cross-domain) but it is a great help, especially when filtering out just the password information:
net user %USERNAME% /domain | findstr "Password"
This can be done in a more complex way with dsquery or adinfo that are tools to query
Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Vista, Windows XP | Leave a Comment »
Posted by jpluimers on 2018/01/26
When running Windows VMs on Proxmox and you want to make snapshot backups you really want to run the qemu-agent inside the Windows VMs.
First of all you really want snapshot mode backups as of all backup modes they have the least downtime. By default they have a small inconsistency risk, but on Windows that can be alleviated by running qemu-agent as described in [WayBack] Backup and Restore – Proxmox VE: Backup Modes
snapshot backup modeBackup modes for VMs:
- snapshot mode
- This mode provides the lowest operation downtime, at the cost of a small inconstancy risk. It works by performing a Proxmox VE live backup, in which data blocks are copied while the VM is running. If the guest agent is enabled (agent: 1) and running, it calls guest-fsfreeze-freeze and guest-fsfreeze-thaw to improve consistency.
A technical overview of the Proxmox VE live backup for QemuServer can be found online here (https://git.proxmox.com/?p=pve-qemu-kvm.git;a=blob;f=backup.txt -> https://git.proxmox.com/?p=pve-qemu-kvm.git;a=blob;f=vma_spec.txt;).
Proxmox VE live backup provides snapshot-like semantics on any storage type. It does not require that the underlying storage supports snapshots.
On Windows the trick is that qemu-agent can use VSS to get a frozen state of the filesystem as described in [WayBack] Qemu-guest-agent – Proxmox VE:
In Proxmox VE, the qemu-guest-agent is used for mainly two things:
- To properly shutdown the guest, instead of relying on ACPI commands or windows policies
- To freeze the guest file system when making a backup (on windows, use the volume shadow copy service VSS).
Don’t make the mistake to start at [WayBack] Qemu-guest-agent – Proxmox VE: Installation; guest; Windows as it will give you a hard time. Always use the full [WayBack] Qemu-guest-agent Installation steps beginning at the[WayBack] Host; these steps worked for me:
/var/lib/vz/template/iso on the Proxmox host so they show up as local:iso for mounting.devmgmt.msc)D:\vioserial\[OS-Version]\ where OS-Version is your Windows Version and ensure “Include subfolder” has a checkmark so it will find the Win32 or Win64 drivers depending on your processor architecture.



D:\guest-agent install either qemu-ga-x64.msi for Win64 or qemu-ga-x86.msi for Win32.Red Hat, Inc.: 
services.msc) and execute from any command promt the following statments to verify the check if these services are running: Note you can obtain the same information from the console by executing these commands.
sc queryex "QEMU-GA"sc queryex "QEMU Guest Agent VSS Provider"Before the reboot, they should show output like this:
C:\Windows\system32>sc queryex "QEMU-GA"
SERVICE_NAME: QEMU-GA
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 4444
FLAGS :
C:\Windows\system32>sc queryex "QEMU Guest Agent VSS Provider"
SERVICE_NAME: QEMU Guest Agent VSS Provider
TYPE : 10 WIN32_OWN_PROCESS
STATE : 1 STOPPED
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 0
FLAGS :
After reboot it should have become this:
C:\Windows\system32>sc queryex "QEMU-GA"
SERVICE_NAME: QEMU-GA
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 1680
FLAGS :
C:\Windows\system32>sc queryex "QEMU Guest Agent VSS Provider"
SERVICE_NAME: QEMU Guest Agent VSS Provider
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 1624
FLAGS :
Verifying the qemu-agent is reachable from the Proxmox host:
shutdown -r -t 0)
# socat /var/run/qemu-server/112.qga -
{"execute":"guest-sync", "arguments":{"id":1234}}
It should get you this result:
{"return": 1234}
Note there’s all sorts of nice stuff you can do with socat /var/run/qemu-server so maybe I’ll put more about it in a future blog post.
–jeroen
Some more links with background information:
Posted in Power User, Proxmox, Virtualization, Windows | Leave a Comment »