Showing posts with label win11. Show all posts
Showing posts with label win11. Show all posts

Nov 1, 2022

Debugging Windows 11

I was installing my printer driver to my new Windows 11.

And I need a debugger to troubleshoot my printer driver. It is time to get a Windows Debugger for the new OS.

The Windows Debugger (WinDbg) can be used to debug kernel-mode and user-mode code, analyze crash dumps, and examine the CPU registers while the code executes. 

Before get start with Windows debugging, we need to complete 2 things.

Seem like the easiest way to get Windows symbols is to use the Microsoft public symbol server. The symbol server makes symbols available to your debugging tools as needed and make it easier to debug your code. 

After a symbol file is downloaded from the symbol server it is cached on the local computer for quick access. And Microsoft no longer publishing the offline symbol packages for Windows.

While looking for WinDBG, I also found WinDbg Preview (at MS Store).

WinDbg Preview is the latest version of WinDbg with more modern visuals, faster windows, a full-fledged scripting experience, built with the extensible debugger data model front and center. In short, simply more user friendly.

And the best part is, WinDbg Preview is available in MS Store. Simply run the cmdline below to install it.

C:\> winget install WinDbg --source msstore

Links:

Oct 31, 2022

How fun is Windows?

Received new laptop that runs Windows 11 over the weekend.


Had spent some times on customize a few things:
  1. Install Google_Pinyin 
  2. Setup the input method switching to (left) ctrl-shift notkey.
  3. Install WSL/WSL2
  4. Install Windows Terminal
  5. Install Multipass (VM orchestrator)
  6. Setup ssh-keygen
  7. Create sample multipass VM with cloud-init
  8. Install python3 (in Windows 11)

Between WSL and Multipass, I need to setup the routing in order for them to communicate.

PS> Set-NetIPInterface -ifAlias "vEthernet (WSL)" -Forwarding Enabled
PS> Set-NetIPInterface -ifAlias "vEthernet (Default Switch)" -Forwarding Enabled

And to show the final routing table:
PS> Get-NetIPInterface | select ifIndex,InterfaceAlias,AddressFamily,ConnectionState,Forwarding | Sort-Object -Property IfIndex | Format-Table

One the routing is configured, then I proceed with ssh-keygen and setup the public key authentication between WSL and multipass.

~$ cd .ssh
~/.ssh$ ssh-keygen -t ed25519 -C "xx@wsl2"
~/.ssh$ ssh-keygen -l -f id_ed25519.pub
~/.ssh$ ssh-copy-id -i id_ed25519.pub xx@remote_server


Next, I need to setup multipass VM with cloud-init.

Create a cloud-init.yaml file for multipass:
-------------------------------
users:
  - default
  - name: xx
    groups: sudo
    shell: /bin/bash
    sudo: ['ALL=(ALL) NOPASSWD:ALL']
    ssh_authorized_keys:
      - ssh-rsa <rsa keys in one line>
package_update: true
package_upgrade: true
packages:
  - nodejs
  - python3
-------------------------------


PS> multipass multipass launch -c 2 -m 2G -d 20G -n ubuntu-vm --cloud-init cloud_init.yaml


Learnt some tricks in Windows command line. I install Python (with cmdline) and locate where is the python.exe.

PS> winget install python --source msstore
PS> where python

Aug 25, 2022

Windows 10/11 Installation Bypass

In the past, we can choose to use Microsoft account (Hotmail/Outlook) to setup the login or use an offline account (like how we did traditionally) during the installation.

Recently, the "offline account" option isn't available any more if Internet connection is available during the installation. 

There are some advantages to use online account, but if you still prefer offline account, there are 2 ways.

First, cut off the Internet during the Windows 10/11 installation.

Second, cheat them while maintain the Internet connection. 

Microsoft will continue to ask for a valid Microsoft account if you provide an invalid Hotmail/Outlook account. So, simply enter "sample@hotmail.com" and fill in with any random password, till the system gives up. 

Then the offline account option will be available.

Aug 7, 2022

Start MSIE Browser Even Replaced by MS-Edge Browser

Internet Explorer 11 (on Windows 10)

Still miss your MS Internet Explorer browser?

Here's a way to "start" your IE browser even it has been replaced by MS Edge.

  1. Press "win" key, and start typing "Internet Options".
  2. Click on "Internet Options", and you should see "Internet Properties" control panel.
  3. Click on "Programs" tab.
  4. Click on "Manage add-ons" button, and see the "Manage Add-ons" window.
  5. At the bottom, click on "Learn more about toolbars and extensions" link.
  6. MSIE browser is back!! 😜

 

Note that this method works in both Windows 10 and 11. Let's start 🏄 with MSIE again.

Jun 7, 2022

Windows Virtual Machines

Here're the 2 ways to actually get a pre-made Windows Virtual Machine directly from Microsoft. Note that this isn't a permanent solution. 

The first is the Microsoft Edge Developer page under Tools and then VMS. You can choose between Windows 8, 8.1, and 10. For VM platform, we can choose between VirtualBox, Vagrant, VMware, HyperV, and Parallels (Mac).

For Windows 11 VM, we need to head over to the Windows 11 development environment page. Again, we can choose between 4 different virtualization software options. Note the expiration date!

Microsoft recommends to save a "snapshot" of the VM. But this only works for the first method.


Links: