Category Archives: Microsoft Windows

InnoSetup disable DesktopIcon via command-line

First make sure you have a task named “desktopicon”: [Tasks] Name: desktopicon; Description: Create a &desktop icon; GroupDescription: "Additional icons:"; Flags: checkedonce[Tasks] Name: desktopicon; Description: Create a &desktop icon; GroupDescription: "Additional icons:"; Flags: checkedonce You may also have the desktop icon in the [Icon] section: [Icons] Name: {userdesktop}\YourApp; Filename: {app}\YourApp.exe; Tasks: desktopicon[Icons] Name: {userdesktop}\YourApp; Filename: […]

Get Laptop Battery DeviceID and Name via WMIC

Query the Win32_Battery class via WMIC from command-line: WMIC Path Win32_Battery get DeviceID,Name /format:listWMIC Path Win32_Battery get DeviceID,Name /format:list The output is like this: DeviceID= ASUSTeKASUS Battery Name=ASUS BatteryDeviceID= ASUSTeKASUS Battery Name=ASUS Battery

Get Windows 7, 8, 10 License Information

Here is how to get Windows 10 license information via command-line: C:\Windows\SysWOW64\cscript.exe "C:\Windows\SysWOW64\slmgr.vbs" /dlvC:\Windows\SysWOW64\cscript.exe "C:\Windows\SysWOW64\slmgr.vbs" /dlv * You can even get if Windows is activated and genuine. This is an example output: icrosoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved.   Software licensing service version: 6.1.7601.17514   Name: Windows(R) […]

Convert InnoSetup EXE Installer to MSI

If you need to convert a InnoSetup EXE setup into MSI installer: Here you can download a Mozilla Firefox MSI package example: Product is free but has also a paid version.

Get Serial Number of CPU, RAM, Motherboard, HDD

Use WMIC to get useful hardware details on a Windows PC: Get serial number of local computer: wmic bios get serialnumber /format:listwmic bios get serialnumber /format:list Get RAM part and serial number: wmic memorychip get PartNumber,SerialNumber /format:listwmic memorychip get PartNumber,SerialNumber /format:list Get processor name: wmic cpu get Name / format:listwmic cpu get Name / format:list […]

Get Number of Intel Processor Cores via Registry

Open this Windows registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\intelppm\EnumHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\intelppm\Enum Look for value “Count”

Delphi Function to Parse JSON Unicode Chars

You can correctly parse/convert these JSON unicode characters: \u3048\u305F\u5834\u5408\u3001\u305D\u306E\u307E\u307E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u3068\u3048\u305F\u5834\u5408\u3001\u305D\u306E\u307E\u307E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u3068 Into their real UTF-8 characters like: えた場合、そのままシリアライズするとえた場合、そのままシリアライズすると procedure DecodeJsonUnicodeBytes(const sJson: String): String; var LJSONObject: TJSONObject; begin LJSONObject := nil; try LJSONObject := TJsonObject.Create; { convert String to JSON } LJSONObject.Parse(BytesOf(sJson), 0);   { get the JSON as String } result := LJSONObject.ToString; finally LJSONObject.Free; end; end;procedure […]

Make a HTTP GET or POST Request with InnoSetup

You can use WinHttpRequest class: *** To avoid run-time errors surround the code with try/except *** To make a HTTP GET request with InnoSetup use this: var WinHttpReq: Variant; begin WinHttpReq := CreateOleObject(‘WinHttp.WinHttpRequest.5.1’); WinHttpReq.Open(‘GET’, ‘’, False); WinHttpReq.Send(”); if WinHttpReq.Status <> 200 then begin Log(‘HTTP Error: ‘ + IntToStr(WinHttpReq.Status) + ‘ ‘ + WinHttpReq.StatusText); end else […]

Visual C++ Redistributable Runtimes All-in-One

From this link you can download all VC++ redistributable runtimes: Download Visual C++ Redistributable Runtimes All-in-One Extract the ZIP and right-click on -> Run as Administrator File size is ~85 MB and works on XP/7/8/10 32/64-bit.