Windows

From TheBestLinux.com
Revision as of 22:56, 23 October 2024 by Jamie (talk | contribs)
Jump to navigation Jump to search

Microsoft Windows

Windows is the most popular desktop operating system most people use at home and at work. There are also "server" versions of MS Windows, which are used at big companies to manage their internal domains and active directory user account management systems, as well as other "server" type functions, even IIS, the Microsoft Internet Information Server to host websites on the Internet and MS SQL database servers, and many more functions I won't go into here.

Info, Tips & Tricks

How to clean up your Windows installation to free up drive space

Windows PowerShell Information

Windows command line tools, otherwise known as powerful stuff you can run from the DOS command prompt

The quickest easiest way to open up a DOS command prompt window is to just click the Windows "Start" button, type "cmd"(without the quotes) and hit the ENTER key!



'Command line tools'

'Winget - A command line tools to perform software installations from the command line and useful for creation of automation of required applications'

The Winget Windows package management tool is very useful for perform installation from the command line or from powershell, as well as used with script for automated installation, configuration, upgrading and removal of many Windows 10 & 11 applications.

Here is an example of it's usage to install the Git package for Windows from the command line using Powershell:

PS C:\Windows\system32> winget install --id Git.Git -e --source winget
Found Git [Git.Git] Version 2.47.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/git-for-windows/git/releases/download/v2.47.0.windows.1/Git-2.47.0-64-bit.exe
  ██████████████████████████████  65.5 MB / 65.5 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\Windows\system32>



During the installation, a GUI window pops up and displays the status of the installation progress to the end user. There is no interaction with the GUI pop-up windows. It will close on it's own after installation has completed. Many other Windows packages can be installed from the command line in a similar way, if the required package is supported by the Winget tool.

On Windows 10 systems, there is a "search" field just to the right of the "Start" button, which has a little magnifying glass and says "Type here to search", which is known as "Cortana", where you can type many commands directly into, including the "cmd" command to bring up a DOS type command windows.



Keyboard shortcuts to save you time from taking your hands off the keyboard to use the mouse!

Cscript.exe is a command-line version of the Windows Script Host that provides command-line options for setting script properties.

Excellent information on SCript!

There is also the wscript command, which is almost identical to csript, other than it being targeted to running Windows based scripts, whereas cscript is meant to run console based scripts - those which run and complete in a DOS, aka, a command prompt window.

Windows creates a HUGE file over time, which is a database of all of the updates it has done.
The one on my current Windows VM I run on top of my Linux desktop is just over 1GB in size now, which is a large amount for virtual hard drive of only 100GB in size to begin with!
This file is usually located at C:\Windows\SoftwareDistribution\DataStore and is named DataStore.edb.

In order to delete this file to free up the drive space it was hogging, you first need to stop the Update service,
and then just delete the contents of the DataStore folder.
Additionally you should also delete the contents of the Download folder, located at C:\Windows\SoftwareDistribution\Download,
which should free up a lot more drive space!

Then restart the service and run Windows updates again. The file should then get recreated, but it will be a lot smaller to star with, but will grow over time as the previous one had.



For more information on these and other Windows scripting and programming, see this excellent site: Experts Exchange Scripting and Programming

How to mount .img files: Mounting .img files

Windows Server Information, Tips & Tricks