Category Windows 10

Super simple Windows 10 and Windows 11 automated installation

Update 11 October 2021: This autounattend.xml script also works for Windows 11 version 21H2. There are a lot of ways you can automate a Windows installation. The most obvious and simple way is using an answer file. So what’s an answer file? A Windows answer file is basically just an XML file that gives Windows instructions on how and what to install. So you don’t have to sit and click next, next, next… 😉 When installing Windows you just place the answer file at the root of the installation media and name it autounattend.xml. Of course, the file has to be a valid XML answer file for it to work. You can’t just put anything in it. Here is an example of an automated installation of Windows 10 using an answer file. Here is an example of the same script installing Windows 11. Making an answer file can be a little complicated and involves using Microsoft System Image Manager. If you want you can create one from scratch, but in this post, I am just going to share my go-to script. The following code is a simple file that will: Make a local Administrator called “User” without any password. Set the keyboard and regional settings to Norwegian. There is no activation, no license, no nothing. Just save the file as autounattend.xml and place it at the root of your Windows installation media. The only thing that is not automated is which disk Windows should be installed on. I intentionally skipped that step because of the risk of accidentally deleting a drive/partition.

Windows 10 language settings with PowerShell

Language settings in Windows 10 is a little more complicated than just setting the display language and keyboard input. Let me explain further. Region settings The region settings control a number of things. If you change the language here, you will also change “cultural” properties such as date format, currency, number formatting and so on. These settings are linked together with the region language. That means you can’t have English display language and Danish currency and time format. Because if you change the region to English you will also get English cultural settings. 😲 Stupid right? Note: this behavior may have changed in Windows 10 1903, but I have not tested this thoroughly. This is super frustrating for those who would like to have Windows in English, but different region settings. The solution is a simple PowerShell command: As the documentation says, this disables the action of dynamically setting the “culture” for the current user based on changes to the Windows display language. So now you can set the region in one of two ways. You can either set the region with the cmdlet: or you can edit the region language in Control Panel – > Region. Display language and keyboard language In Windows 10 there is also something called “language lists“. Languages in Windows 10 can be a little more complicated than just setting the right display language and keyboard language. I mean, if you think about it… Switzerland, for example, has four national languages; German, French, Italian and Romansh. People living in the cities Canton of Valais, Fribourg, and Bern are bilingual (speaking French and German), while Canton Graubünden is trilingual (German, Romansh and Italian). So what language settings would you use in Switzerland? My point here is that although you may have one main language, you might […]

Edit user accounts with the command line in Windows 10

Add an admin account with password “123abc”: Make the account administrator: Add a domain user to the domain administrator group Activate the hidden administrator account: Change password for the hidden administrator account Activate the guest user account: Create a new user without a password: Change the password of a user: Delete a user account You will have to manually delete the user folder after deleting the account.

WinRAR archiver script

This script will make an archive of all files in a source folder. Furthermore, it will add a date stamp to the file name of the archive. @echo off set rardirectory="C:\Program Files\WinRAR\Rar.exe" set source=%AppData% set destination="C:\Users\admin\Desktop\" if not exist %destination% mkdir %destination% %rardirectory% -dh -r a -agYYYY-MM-DD-HH-MM-SS %destination% %source% -ep1 -r -m5 You will have to install WinRAR first, and set the appropriate file paths for the script to work. Make sure you replace the source and destination path. You might also need to set the right path to rar.exe if you have a different path. I also noticed that you might need to include a backslash \ after the folder name to make it work. I guess this is just an attempt at a very primitive version control 😜 You can get more commands and information by opening WinRAR -> Help -> Help topics -> Command line mode