Archive for the ‘General’ Category

Repairing Windows 10 and 11

Friday, March 29th, 2024

Awesome list, detailed and commented on, all links from the same Windows tech guy

windows-10-performance-and-install-integrity

how-to-create-a-system-image-in-windows-11-and

How to Troubleshoot Problems in Windows Via Event Viewer

How to Troubleshoot Problems in Windows Via Event Viewer

 

Software to create Windows install disks from existing setup

Friday, February 9th, 2024

This is about using software to take an existing Windows operating system (10 and 11) and creating an install disk to do a fresh install of the installation on other machines.

Convert the existing OS to a VHD using https://learn.microsoft.com/en-us/sysinternals/downloads/disk2vhd

After VHD is created you can load it into VirtualBox and make changes. ThenĀ  recreate a VHD while in VirtualBox. Convert the VHD to .wim, then perhaps install .wim to .esd if necessary, create an install USB from a current Windows ISO using RUFUS, then replace the .wim or .esd file with the one from the VHD you edited.

Maybe. Yet to be tested fully.

https://www.tenforums.com/tutorials/72031-create-windows-10-iso-image-existing-installation.html

Script to create wim file in powershell

Here is a simple powershell script to convert VHD file to WIM file

#set the VHD mount folder
$Mount="c:\mount"
#create a folder c:\mount
Mkdir $Mount

#mount the c:\temp\spiderip.vhd to $Mount folder

Mount-WindowsImage -ImagePath "c:\temp\spiderip.vhd" -Path "$Mount" -Index 1
#Create new Wim image to c:\temp\spiderip.wim folder

New-WindowsImage -CapturePath "$Mount" -Name "spiderip image" -ImagePath "c:\temp\spiderip.wim" -Description "spiderip image" -Verify
#dismount  the $Mount folder
Dismount-WindowsImage -Path "$Mount" -Discard

Convert from .wim to .esd (my win10 install disk uses .esd and when converting vhd to wim I need to change it).

dism /export-image /sourceimagefile:<file location>:\install.wim /sourceindex:<1,2,3,4> /destinationimagefile:<output location>:\install.esd /compress:recovery

 

DISM++ has tool to create a wim image (to replace the install iso one). Just a note.

DISM++ free software, but now 5 years old so not so much
Video: https://www.youtube.com/watch?v=2hEde5WuCSY
Site to download: https://github.com/Chuyu-Team/Dism-Multi-language

NT Lite, paid software
Video: https://www.youtube.com/watch?v=xLCWtC6UYrM
Video makers website on NT Lite: https://christitus.com/ntlite-guide/
Video, also on NT Lite: https://www.youtube.com/watch?v=_gMJNQ3yWNE
Site for download: https://www.ntlite.com

 

 

Windows 10 11 User settings backup and restore

Saturday, February 3rd, 2024

Pre work

If the user folders are linked to OneDrive there may be a difference in how user folders are addressed in a command prompt or powershell. I haven’t had a chance to test it.

If you go into explorer and right click the Documents folder that looks like it’s under “This PC” and select properties, the window that pops up will give the directory of the folder.

To find the true location of the user’s folders open regedit and go to:

Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

There you will see a list that includes the true path of user’s folders.

To include the whole source folder in the destination you must include the source folder’s name in the destination. You must also, for some stupid reason, include a space after the source and destination names.

Following is an example of a batch file, or command lines

Backup

echo.
echo.
echo Be sure you have the correct source directory paths!
echo Right click on file explorer and select properties for each user folder
echo.
echo.
pause

echo off
set month=%DATE:~4,2%
set day=%DATE:~7,2%
set month=%DATE:~,2%
set day=%DATE:~3,2%
set year=%DATE:~-2%
set hour=%time:~0,2%
set min=%time:~3,2%
set sec=%time:~6,2%
set milsec=%time:~9,2%
echo on
set FolderDateTime=%month%%day%%year%-%hour%%min%%sec%
set BackupDestination=Z:\UserBackup\%computername%\%username%\%FolderDateTime%

set src1=Documents
set src2=Pictures
set src3=Downloads
set src4=Desktop
set src5=Music
set src6=Videos

robocopy "%homedrive%%homepath%\src1 " "%BackupDestination%\src1 " /MIR /COPY:DAT /DCOPY:T
robocopy "%homedrive%%homepath%\src2 " "%BackupDestination%\src2 " /MIR /COPY:DAT /DCOPY:T
robocopy "%homedrive%%homepath%\src3 " "%BackupDestination%\src3 " /MIR /COPY:DAT /DCOPY:T
robocopy "%homedrive%%homepath%\src4 " "%BackupDestination%\src4 " /MIR /COPY:DAT /DCOPY:T
robocopy "%homedrive%%homepath%\src5 " "%BackupDestination%\src5 " /MIR /COPY:DAT /DCOPY:T
robocopy "%homedrive%%homepath%\src6 " "%BackupDestination%\src6 " /MIR /COPY:DAT /DCOPY:T

echo.
echo.
echo Copy has completed
echo To open the destination directory continue 
echo.
echo.
pause
start %homedrive%%homepath%
pause

 

password never expires

Monday, January 29th, 2024

net accounts /maxpwage:unlimited

net user %username% [new password]

That first command sets all users’ passwords to never expire.

The second can be used to change the user’s password

Windows to VHD virtual hard drive

Friday, January 19th, 2024

Pretty basic process. Video helps a lot

https://docs.microsoft.com/en-us/sysinternals/downloads/disk2vhd