Reluctantly, Windows

Windows 11

How to install Win11 on unsupported PC:

  1. Download the ISO

  2. Mount the ISO

  3. Change dir to that drive, e.g., f:

  4. cd sources

  5. setupprep.exe /product server

  6. Proceed with install as normal

This video explains it well:

.. raw:: html

<iframe width=”560” height=”315” src=”https://www.youtube.com/embed/ug__CVQQQsc” frameborder=”0” allow=”accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>

<hr style=”height:4px;border-width:0;color:gray;background-color:gray”>

Cloning VDIs Win11

robyn@Robyns-MBP ~ % sudo Virtualbox

Password:

robyn@Robyns-MBP ~ % VBoxManage clonehd Windows10.vdi clnWin10.vdi –format VDI –variant Standard

VBoxManage: error: Could not find file for the medium ‘/Users/robyn/Windows10.vdi’ (VERR_FILE_NOT_FOUND)

VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee nsISupports

VBoxManage: error: Context: “OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())” at line 201 of file VBoxManageDisk.cpp

robyn@Robyns-MBP ~ % cd ./Virtualbox VMs

cd: string not in pwd: ./Virtualbox

robyn@Robyns-MBP ~ % cd ./”Virtualbox VMs”

robyn@Robyns-MBP Virtualbox VMs % cd Windows10

robyn@Robyns-MBP Windows10 % VBoxManage clonehd Windows10.vdi clnWin10.vdi –format VDI –variant Standard

0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

Clone medium created in format ‘VDI’. UUID: 639753b2-fd68-4640-be7e-9c2f8534f131

robyn@Robyns-MBP Windows10 %

Which Updates to Avoid

…depends on how paranoid you want to be about MS invading your privacy, and how much you’re prepared to put up with having Windows 10 forced on you. (Oh, and also thirdly, wanting to get away with using a pirated version of Windows, or at least one that won’t activate as genuine, which isn’t always the same thing)…

So… If you don’t want Windows 10, you’re best off avoiding these:

KB2952664
KB2976978
KB2977759
KB2990214
KB3021917
KB3044374
KB3035583
KB3139929
KB3150513

as they’re all Windows 10 preparation updates. If you’re worried about being spied upon, I’d give these a miss:

KB3021917
KB3022345
KB3068708
KB3075249
KB3080149
KB3081954

as they bring Windows 7 “telemetry” stuff into line with Windows 10 (this is info that gets phoned-home from your copy of Windows back to Microsoft).

KB971033, if it hasn’t been finally retreated. Same for KB2505438… have to hide them on installs as these two will kill Windows activation.


Upgrade - OEM to Retail

Upgraded my Vbox install of Win7 to retail, purchased on 08-Dec-2021 from PCSalesOnline.com for AUD$37.11. Converted the OEM licence in cmd (run as admin):

SLUI 3

brings up a GUI to enter the new activation code. Done. Hope I can upgrade to Win10 now.

100 GB (Google One)

Barton Capalaba Hyundai Antenna assemply $217 on CC purchase ref# 35042


Install - Convert MBR to GPT

Converting to GPT format using Command Prompt in Windows Setup:

  • Power off the computer, and insert or connect the Windows installation DVD or USB drive.

  • Power on the computer and tap F12 key until the One-Time Boot Menu appears.

  • Select the Windows installation DVD or USB in the menu and press Enter key.

  • From the Windows Setup screen, press Shift + F10 key to open a Command Prompt window.

  • In the Command Prompt window, type diskpart and press [Enter] key.

  • To identify the disk drive to reformat, type list disk and press [Enter] key.

  • To select the drive and reformat it, type select disk # (substitute # with the disk number for example select disk 1) and press [Enter] key.

  • Type clean and press [Enter] key.

  • Type convert gpt and press [Enter] key.

  • Type exit and press [Enter] key.

Close the Command Prompt window. If you are installing Windows, go to the Windows Setup process.

VBA-Custom Popup

The following code example shows how to create a custom menu with four menu options, each of which calls a macro. Sample code provided by: Holy Macro! Books, Holy Macro! It’s 2,500 Excel VBA Examples.

The following code example sets up the custom menu when the workbook is opened, and deletes it when the workbook is closed:

Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
   With Application.CommandBars("Worksheet Menu Bar")
          On Error Resume Next
          .Controls("&MyFunction").Delete
          On Error GoTo 0
   End With
End Sub

Private Sub Workbook_Open()
   Dim objPopUp As CommandBarPopup
   Dim objBtn As CommandBarButton
   With Application.CommandBars("Worksheet Menu Bar")
          On Error Resume Next
          .Controls("MyFunction").Delete
          On Error GoTo 0
          Set objPopUp = .Controls.Add( _
                 Type:=msoControlPopup, _
                 before:=.Controls.Count, _
                 temporary:=True)
   End With
   objPopUp.Caption = "&MyFunction"
   Set objBtn = objPopUp.Controls.Add
   With objBtn
          .Caption = "Formula Entry"
          .OnAction = "Cbm_Active_Formula"
          .Style = msoButtonCaption
   End With
   Set objBtn = objPopUp.Controls.Add
   With objBtn
          .Caption = "Value Entry"
          .OnAction = "Cbm_Active_Value"
          .Style = msoButtonCaption
   End With
   Set objBtn = objPopUp.Controls.Add
   With objBtn
          .Caption = "Formula Selection"
          .OnAction = "Cbm_Formula_Select"
          .Style = msoButtonCaption
   End With
   Set objBtn = objPopUp.Controls.Add
   With objBtn
          .Caption = "Value Selection"
          .OnAction = "Cbm_Value_Select"
          .Style = msoButtonCaption
   End With
End Sub

The menu “MyFunction” is added when the workbook opens, and is deleted when the workbook closes. It provides four menu options, with a macro assigned to each option. The user-defined function (UDF) “MyFunction” multiplies three values in a range together and returns the result:

Function MyFunction(rng As Range) As Double
   MyFunction = rng(1) * rng(2) * rng(3)
End Function

Formula Entry: This menu option is assigned the macro “Cbm_Active_Formula”, which calls the UDF named “MyFunction” that multiplies the numbers in the preceding 3 cells, and stores value of the UDF in the active cell. You must have values in the range B6:D6 and select cell E6 before clicking this menu option:

Sub Cbm_Active_Formula()
   'setting up the variables.
   Dim intLen As Integer, strRng As String

   'Using the active cell, E6.
   With ActiveCell
          'Check to see if the preceding offset has valid data, and if there are three values
          If IsEmpty(.Offset(0, -1)) Or .Column < 4 Then

                  'If the data is not valid, call MyFunction directly as a formula, but with no parameters.
                 .Formula = "=MyFunction()"
                  Application.SendKeys "{ENTER}"
          Else

                 'If the data is valid, create a range of the preceding 3 cells
                 strRng = Range(Cells(.Row, .Column - 3), _
                        Cells(.Row, .Column - 1)).Address
                 intLen = Len(strRng)

                 'Call MyFunction as a formula, with the range as the parameter.
                 .Formula = "=MyFunction(" & strRng & ")"
                        Application.SendKeys "{ENTER}"
          End If
   End With
End Sub

Value Entry: This menu option is assigned the macro “Cbm_Active_Value”, which enters the value produced by the UDF named “MyFunction” into the active cell. You must have values in the range B6:D6 and select cell E6 before clicking this menu option:

Sub Cbm_Active_Value()
   'Set up the variables.
   Dim intLen As Integer, strRng As String

   'Using the active cell, E6.
   With ActiveCell
          'If there isn't enough room in the column, then send a warning.
          If .Column < 4 Then
                 Beep
                 MsgBox "The function can be used only starting from column D!"

          'Otherwise, call MyFunction, using the range of the previous 3 cells.
          Else
                 ActiveCell.Value = MyFunction(Range(ActiveCell.Offset(0, -3), _
                        ActiveCell.Offset(0, -1)))
          End If
   End With
End Sub

Formula Selection: This menu option is assigned the macro “Cbm_Formula_Select”, which uses an InputBox for the user to select the range which the UDF “MyFunction” should calculate. The return value of the UDF is stored in the active cell:

Sub Cbm_Formula_Select()
   'Set up the variables.
   Dim rng As Range

   'Use the InputBox dialog to set the range for MyFunction, with some simple error handling.
   Set rng = Application.InputBox("Range:", Type:=8)
   If rng.Cells.Count <> 3 Then
          MsgBox "Length, width and height are needed -" & _
                 vbLf & "please select three cells!"
          Exit Sub
   End If
   'Call MyFunction in the active cell, E6.
   ActiveCell.Formula = "=MyFunction(" & rng.Address & ")"
End Sub

Value Selection: This menu option is assigned the macro “Cbm_Value_Select”, which uses an InputBox for the user select the range which the UDF “MyFunction” should calculate. The value is stored in the active cell directly, instead of being returned by the UDF:

Sub Cbm_Value_Select()
   'Set up the variables.
   Dim rng As Range

   'Use the InputBox dialog to set the range for MyFunction, with some simple error handling.
   Set rng = Application.InputBox("Range:", Type:=8)
   If rng.Cells.Count <> 3 Then
         MsgBox "Length, width and height are needed -" & _
                 vbLf & "please select three cells!"
          Exit Sub
   End If

   'Call MyFunction by value using the active cell, E6.
   ActiveCell.Value = MyFunction(rng)
End Sub

Oracle’s VirtualBox

Avoiding Win10 Deactivation

Background

On December 2nd, I purchased a Windows 10 Pro licence to create a fresh install of Windows in VirtualBox on my Mac. I got the system all the way I wanted it including activation and removing all the cruft with a Windows debloat script by Chris Titus, then did an export.

To test that everything wortked fine, I deleted the existing install then imported the OVA… and found that Win10 had lost its activation.

Research

Looking on StackExchange revealed that the culprit was a changing set of UUIDs. The commenter was using VMWare so he was referencing .VMX files. The analog to that appears to be the .VBOX file in your current install.