### Install application and log results (Batch Script) Source: https://learn.microsoft.com/en-us/windows/configuration/provisioning-packages/provisioning-script-to-install-app_source=recommendations This batch script example shows how to log the start of an application installation, execute an .exe installer silently, and then log the exit code of the installer. This provides a clear record of the installation process and its success or failure. The script assumes the installer and log file are accessible. ```batch set LOGFILE=%SystemDrive%\Fiddler_install.log echo Installing Fiddler.exe >> %LOGFILE% fiddler4setup.exe /S >> %LOGFILE% echo result: %ERRORLEVEL% >> %LOGFILE% ``` -------------------------------- ### Example JSON Response for Install Data Source: https://learn.microsoft.com/en-us/windows/uwp/monetize/get-desktop-app-installs Provides a sample JSON response body for a request to get desktop application install data. This structure includes an array of install data objects, a '@nextLink' for pagination, and the 'TotalCount' of results. Each object within the 'Value' array contains detailed information about the application's installation metrics. ```json { "Value": [ { "date": "2018-01-24", "applicationId": "123456789", "productName": "Contoso Demo", "applicationVersion": "1.0.0.0", "deviceType": "PC", "market": "All", "osVersion": "Windows 10", "osRelease": "Version 1709", "installBase": 348218.0 } ], "@nextLink": "desktop/installbasedaily?applicationId=123456789&startDate=2018-01-01&endDate=2018-02-01&top=10000&skip=10000&groupby=applicationVersion,deviceType,osVersion,osRelease", "TotalCount": 23012 } ``` -------------------------------- ### Verify Redis Installation and Version Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database After installing Redis, this command verifies the installation by displaying the installed Redis server version. It's a quick check to confirm that the installation was successful. ```bash redis-server --version ``` -------------------------------- ### SetupInstallFileEx Source: https://learn.microsoft.com/en-us/windows/win32/api/_setup Installs a file as specified either by an INFCONTEXT returned by SetupFindXXXLine or explicitly by the file name and path. ```APIDOC ## SetupInstallFileExA ### Description Installs a file as specified either by an INFCONTEXT returned by SetupFindXXXLine or explicitly by the file name and path. ### Method [Not Specified] ### Endpoint [Not Specified] ### Parameters [Not Specified] ### Request Example [Not Specified] ### Response #### Success Response (200) [Not Specified] #### Response Example [Not Specified] ``` -------------------------------- ### SetupQuerySourceList Source: https://learn.microsoft.com/en-us/windows/win32/api/_setup Queries the current list of installation sources. ```APIDOC ## SetupQuerySourceList ### Description Queries the current list of installation sources. The list is built from the system and user-specific lists, and potentially overridden by a temporary list. ### Method [Not specified, likely a function call in a programming language] ### Endpoint [Not applicable for function calls] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` // Example usage in C++ // SetupQuerySourceListA(sourceListBuffer, sourceListSize, requiredSize); // SetupQuerySourceListW(sourceListBuffer, sourceListSize, requiredSize); ``` ### Response #### Success Response A list of installation sources. #### Response Example ``` // Example return value: ["\\server\share\install", "C:\\InstallMedia"] ``` ``` -------------------------------- ### Install Docker Engine in WSL Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/gpu-compute_source=recommendations Installs the Docker engine directly within WSL using a curl script and starts the Docker service. This is a prerequisite for setting up NVIDIA CUDA with Docker. ```Bash curl https://get.docker.com | sh sudo service docker start ``` -------------------------------- ### Expand CAB and run setup.exe using batch script Source: https://learn.microsoft.com/en-us/windows/configuration/provisioning-packages/provisioning-script-to-install-app_source=recommendations This batch script demonstrates expanding a .cab file and then running the `setup.exe` installer contained within it. It includes logging for both the expansion and installation steps to track the process and any errors. This is useful for deploying applications packaged in a CAB format. ```batch set LOGFILE=%SystemDrive%\install_my_app.log echo Expanding installer_assets.cab >> %LOGFILE% expand -r installer_assets.cab -F:* . >> %LOGFILE% echo result: %ERRORLEVEL% >> %LOGFILE% echo Installing MyApp >> %LOGFILE% setup.exe >> %LOGFILE% echo result: %ERRORLEVEL% >> %LOGFILE% ``` -------------------------------- ### Install Software with apt-get (Ubuntu) Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/linux_source=recommendations Installs a specified software package on Ubuntu using the apt-get command. Requires root privileges. ```Bash sudo apt-get install ``` -------------------------------- ### SetupInitializeFileLog (ANSI/Unicode) Source: https://learn.microsoft.com/en-us/windows/win32/api/_setup Initializes a file to record installation operations and outcomes. ```APIDOC ## SetupInitializeFileLogA ### Description Initializes a file to record installation operations and outcomes. This can be the system log, where the system tracks the files installed as part of Windows, or any other file. (ANSI) ### Method [Not Specified] ### Endpoint [Not Specified] ### Parameters [Not Specified] ### Request Example [Not Specified] ### Response #### Success Response (200) [Not Specified] #### Response Example [Not Specified] ## SetupInitializeFileLogW ### Description Initializes a file to record installation operations and outcomes. This can be the system log, where the system tracks the files installed as part of Windows, or any other file. (Unicode) ### Method [Not Specified] ### Endpoint [Not Specified] ### Parameters [Not Specified] ### Request Example [Not Specified] ### Response #### Success Response (200) [Not Specified] #### Response Example [Not Specified] ``` -------------------------------- ### Install Software with Zypper (openSUSE) Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/linux_source=recommendations Installs a specified software package on openSUSE using the Zypper package manager. Requires root privileges. ```Bash sudo zypper install ``` -------------------------------- ### Install PyTorch-DirectML Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/gpu-compute_source=recommendations Installs necessary libraries (libblas3, libomp5, liblapack3) and then installs the PyTorch-DirectML package using pip. This allows PyTorch to utilize DirectML for GPU acceleration. ```Bash sudo apt install libblas3 libomp5 liblapack3 pip install torch-directml ``` -------------------------------- ### Product Key Source: https://learn.microsoft.com/en-us/windows/-hardware/manufacture/desktop/windows-setup-command-line-options Supplies Windows Setup with the specific product key for installation. ```APIDOC ## /PKey ### Description Supplies Windows Setup with the specific product key. ### Method Command-line argument ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` setup.exe /auto upgrade /pkey xxxxx-xxxxx-xxxxx-xxxxx-xxxxx ``` ### Response #### Success Response (200) N/A #### Response Example N/A ### Remarks This option is new starting in Windows 10. Support from WinPE starting in Windows 11, version 24H2. ``` -------------------------------- ### Install SQLite3 on WSL Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database Installs the SQLite3 command-line utility on your WSL Ubuntu system. SQLite is a lightweight, file-based database system. ```Bash sudo apt install sqlite3 ``` -------------------------------- ### Install TensorFlow-DirectML Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/gpu-compute_source=recommendations Installs the TensorFlow-DirectML package using pip. This enables TensorFlow to leverage DirectML for GPU acceleration on compatible hardware. ```Bash pip install tensorflow-directml ``` -------------------------------- ### SetupInstallFile (ANSI) Source: https://learn.microsoft.com/en-us/windows/win32/api/_setup Installs a file as specified either by an INFCONTEXT returned by SetupFindXXXLine or explicitly by the file name and path. ```APIDOC ## SetupInstallFileA ### Description Installs a file as specified either by an INFCONTEXT returned by SetupFindXXXLine or explicitly by the file name and path. (ANSI) ### Method [Not Specified] ### Endpoint [Not Specified] ### Parameters [Not Specified] ### Request Example [Not Specified] ### Response #### Success Response (200) [Not Specified] #### Response Example [Not Specified] ``` -------------------------------- ### Install Gatsby CLI and Create Gatsby Project (Bash) Source: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/gatsby-on-wsl This snippet demonstrates the bash commands to install the Gatsby CLI globally using npm and then create a new Gatsby.js project. It's a foundational step for starting any Gatsby development. ```bash npm install -g gatsby-cli gatsby new my-gatsby-app ``` -------------------------------- ### Example wsl.conf File Configuration Source: https://learn.microsoft.com/en-us/windows/wsl/wsl-config This is a comprehensive example of a wsl.conf file, demonstrating configurations for automount, network, interop, user, and boot settings. It showcases how to customize drive mounting, network behavior, interop capabilities, default user, and startup commands. ```bash # Automatically mount Windows drive when the distribution is launched [automount] # Set to true will automount fixed drives (C:/ or D:/) with DrvFs under the root directory set above. Set to false means drives won't be mounted automatically, but need to be mounted manually or with fstab. enabled=true # Sets the directory where fixed drives will be automatically mounted. This example changes the mount location, so your C-drive would be /c, rather than the default /mnt/c. root = / # DrvFs-specific options can be specified. options = "metadata,uid=1003,gid=1003,umask=077,fmask=11,case=off" # Sets the `/etc/fstab` file to be processed when a WSL distribution is launched. mountFsTab=true # Network host settings that enable the DNS server used by WSL 2. This example changes the hostname, sets generateHosts to false, preventing WSL from the default behavior of auto-generating /etc/hosts, and sets generateResolvConf to false, preventing WSL from auto-generating /etc/resolv.conf, so that you can create your own (ie. nameserver 1.1.1.1). [network] hostname=DemoHost generateHosts=false generateResolvConf=false # Set whether WSL supports interop processes like launching Windows apps and adding path variables. Setting these to false will block the launch of Windows processes and block adding $PATH environment variables. [interop] enabled=false appendWindowsPath=false # Set the user when launching a distribution with WSL. [user] default=DemoUser # Set a command to run when a new WSL instance launches. This example starts the Docker container service. [boot] command=service docker start ``` -------------------------------- ### MakeAppx Bundle Command Usage Examples Source: https://learn.microsoft.com/en-us/windows/msix/package/create-app-package-with-makeappx-tool Demonstrates how to use the MakeAppx bundle command in various scenarios. These examples show how to create app bundles, specify verbosity, output names, bundle versions, mapping files, and encryption options. ```bash MakeAppx bundle /v /d "C:\\My Files" /p MyBundle.msixbundle MakeAppx bundle /v /o /bv 1.0.1.2096 /f MyMapping.txt /p MyBundle.msixbundle MakeAppx bundle /v /o /bv 1.0.1.2096 /f MyMapping.txt /ep MyBundle.emsixbundle /kf MyKeyFile.txt MakeAppx bundle /v /o /bv 1.0.1.2096 /f MyMapping.txt /ep MyBundle.emsixbundle /kt ``` -------------------------------- ### Check SQLite3 Version on WSL Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database Verifies the installed version of SQLite3 on your WSL Ubuntu system. This command helps confirm a successful installation. ```Bash sqlite3 --version ``` -------------------------------- ### SetupQuerySourceListA and SetupQuerySourceListW Source: https://learn.microsoft.com/en-us/windows/win32/api/setupapi_source=recommendations The SetupQuerySourceList function queries the current list of installation sources. The list is built from the system and user-specific lists, and potentially overridden by a temporary list (see SetupSetSourceList). (ANSI and Unicode versions) ```APIDOC ## SetupQuerySourceListA / SetupQuerySourceListW ### Description Queries the current list of installation sources, which is built from system, user-specific, and potentially temporary lists. ### Method [Not specified, likely a C/C++ function call] ### Endpoint [Not applicable] ### Parameters [Parameters not specified in the provided text] ### Request Example [Not applicable] ### Response [Response details not specified in the provided text] ``` -------------------------------- ### Install Software with pacman (Arch Linux) Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/linux_source=recommendations Installs a specified software package on Arch Linux using the pacman package manager. Requires root privileges. ```Bash sudo pacman -S ``` -------------------------------- ### MakeAppx Pack Command Syntax Examples Source: https://learn.microsoft.com/en-us/windows/msix/package/create-app-package-with-makeappx-tool Provides various syntax examples for the MakeAppx pack command. These examples demonstrate how to create app packages using content directories or mapping files, with options for encryption, hash algorithms, and manifest generation. ```bash MakeAppx pack [options] /d /p MakeAppx pack [options] /f /p MakeAppx pack [options] /m /f /p MakeAppx pack [options] /r /m /f /p MakeAppx pack [options] /d /ep /kf MakeAppx pack [options] /d /ep /kt ``` -------------------------------- ### Specify Temporary Installation Drive with setup.exe Source: https://learn.microsoft.com/en-us/windows/-hardware/manufacture/desktop/windows-setup-command-line-options Instructs Windows Setup to place temporary installation files on a specified partition. The drive letter for the desired partition is provided as an argument. This option is available starting in Windows 10, version 1607. ```bash setup /tempdrive H ``` -------------------------------- ### Install Software with apk (Alpine Linux) Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/linux_source=recommendations Installs a specified software package on Alpine Linux using the Alpine Package Keeper (apk). Requires root privileges. ```Bash sudo apk add ``` -------------------------------- ### SetupOpenFileQueue Source: https://learn.microsoft.com/en-us/windows/win32/api/setupapi_source=recommendations The SetupOpenFileQueue function creates a setup file queue. ```APIDOC ## SetupOpenFileQueue ### Description Creates a setup file queue. ### Method [Not specified, likely a C/C++ function call] ### Endpoint [Not applicable] ### Parameters [Parameters not specified in the provided text] ### Request Example [Not applicable] ### Response [Response details not specified in the provided text] ``` -------------------------------- ### Suppress Windows Setup UI with /Quiet Source: https://learn.microsoft.com/en-us/windows/-hardware/manufacture/desktop/windows-setup-command-line-options The /Quiet option suppresses all Windows Setup user interface elements, including the rollback user experience. This is useful for unattended installations. It is available starting from Windows 10. ```bash setup /auto upgrade /quiet ``` -------------------------------- ### Advertisement Options Example with msiexec Source: https://learn.microsoft.com/en-us/windows/win32/msi/command-line-options This example shows how to advertise a sample MSI with a transform and logging enabled. Switches are not case-sensitive. ```bash msiexec /JM msisample.msi /T transform.mst /LIME logfile.txt ``` -------------------------------- ### Check PostgreSQL Version on WSL Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database Verifies the installed version of PostgreSQL on your WSL Ubuntu system. This command is useful for confirming a successful installation and for compatibility checks. ```Bash psql --version ``` -------------------------------- ### SetupQueryFileLog Source: https://learn.microsoft.com/en-us/windows/win32/api/_setup Retrieves information from a setup file log. ```APIDOC ## SetupQueryFileLog ### Description Returns information from a setup file log. ### Method [Not specified, likely a function call in a programming language] ### Endpoint [Not applicable for function calls] ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` // Example usage in C++ // SetupQueryFileLog(logHandle, entryIndex, buffer, bufferSize); ``` ### Response #### Success Response Information from the setup file log. #### Response Example ``` // Example return value depends on the data in the log. ``` ``` -------------------------------- ### MakeAppx Bundle Command Syntax Examples Source: https://learn.microsoft.com/en-us/windows/msix/package/create-app-package-with-makeappx-tool Presents the syntax options for the MakeAppx bundle command. These examples cover creating app bundles using content directories or mapping files, including options for encryption and specifying bundle versions. ```bash MakeAppx bundle [options] /d /p MakeAppx bundle [options] /f /p MakeAppx bundle [options] /d /ep /kf MyKeyFile.txt MakeAppx bundle [options] /f /ep /kt ``` -------------------------------- ### Install Software with yum/rpm (Red Hat) Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/linux_source=recommendations Installs a specified software package on Red Hat-based distributions like CentOS using yum or rpm. Requires root privileges. ```Bash sudo yum install ``` ```Bash sudo rpo -i ``` -------------------------------- ### Automate WinUI Environment Setup with PowerShell Source: https://learn.microsoft.com/en-us/windows/apps/get-started/get-set-up This PowerShell command automates the setup of your WinUI development environment by installing Visual Studio 2026 with the required workloads and enabling Developer Mode. It utilizes a WinGet Configuration file for a streamlined installation process. ```powershell winget configure -f https://aka.ms/winui-config ``` -------------------------------- ### Log output to a file (Batch Script) Source: https://learn.microsoft.com/en-us/windows/configuration/provisioning-packages/provisioning-script-to-install-app_source=recommendations This batch script example demonstrates how to create a log file and write a simple message to it. This is useful for debugging script execution within provisioning packages, as it allows you to review actions after the provisioning process completes. The log file is created on the system drive. ```batch set LOGFILE=%SystemDrive%\HelloWorld.log echo Hello, World >> %LOGFILE% ``` -------------------------------- ### SetupAddToSourceListW Function Source: https://learn.microsoft.com/en-us/windows/win32/api/_setup The SetupAddToSourceList function appends a value to the list of installation sources for either the current user or the system. If the value already exists, it is removed first, so that duplicate entries are not created. (Unicode) ```APIDOC ## SetupAddToSourceListW ### Description Appends a value to the list of installation sources for either the current user or the system. If the value already exists, it is removed first, so that duplicate entries are not created. (Unicode) ### Method N/A (This appears to be a function call, not an HTTP endpoint) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Verify Git and GCM Installation in WSL Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-git This command checks if Git and Git Credential Manager are installed and accessible within your WSL distribution. It's a basic verification step after installing Git for Windows. ```shell git --version; git credential-manager --version ``` -------------------------------- ### Download Application with Specific Installer Type Source: https://learn.microsoft.com/en-us/windows/package-manager/winget/download This example shows how to download an application by specifying the desired installer type. The '--installer-type' flag is used to filter the download. ```CMD winget download --id Microsoft.WingetCreate --installer-type msix ``` -------------------------------- ### WinGet Configuration File Example Source: https://learn.microsoft.com/en-us/windows/package-manager/configuration/create_source=recommendations This is a complete example of a WinGet configuration file written in YAML. It demonstrates how to define assertions for prerequisites and resources for desired system states, including OS version checks, enabling developer mode, installing applications via WinGet, and configuring Visual Studio components. ```yaml # yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2 properties: assertions: - resource: Microsoft.Windows.Developer/OsVersion directives: description: Verify min OS version requirement allowPrerelease: true settings: MinVersion: '10.0.22000' resources: - resource: Microsoft.Windows.Settings/WindowsSettings directives: description: Enable Developer Mode allowPrerelease: true securityContext: elevated settings: DeveloperMode: true - resource: Microsoft.WinGet.DSC/WinGetPackage id: vsPackage directives: description: Install Visual Studio 2022 Community securityContext: elevated settings: id: Microsoft.VisualStudio.2022.Community source: winget - resource: Microsoft.VisualStudio.DSC/VSComponents dependsOn: - vsPackage directives: description: Install required VS workloads from vsconfig file allowPrerelease: true securityContext: elevated settings: productId: Microsoft.VisualStudio.Product.Community channelId: VisualStudio.17.Release vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig' includeRecommended: true configurationVersion: 0.2.0 ``` -------------------------------- ### Get Patch ProductCode GUID (JScript) Source: https://learn.microsoft.com/en-us/windows/win32/msi/patch-productcode Retrieves the ProductCode GUID of a product using the Patch.ProductCode property. This is a read-only property and requires Windows Installer 3.0 or later. ```javascript propVal = Patch.ProductCode ``` -------------------------------- ### MakeAppx Pack Command Usage Examples Source: https://learn.microsoft.com/en-us/windows/msix/package/create-app-package-with-makeappx-tool Illustrates practical usage scenarios for the MakeAppx pack command. These examples show how to specify verbosity, hash algorithms, content directories, mapping files, output package names, and encryption options. ```bash MakeAppx pack /v /h SHA256 /d "C:\\My Files" /p MyPackage.msix MakeAppx pack /v /o /f MyMapping.txt /p MyPackage.msix MakeAppx pack /m "MyApp\\AppxManifest.xml" /f MyMapping.txt /p AppPackage.msix MakeAppx pack /r /m "MyApp\\AppxManifest.xml" /f MyMapping.txt /p ResourcePackage.msix MakeAppx pack /v /h SHA256 /d "C:\\My Files" /ep MyPackage.emsix /kf MyKeyFile.txt MakeAppx pack /v /h SHA256 /d "C:\\My Files" /ep MyPackage.emsix /kt ``` -------------------------------- ### Install and Manage MySQL on WSL Source: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database This snippet covers the essential commands for installing, starting, checking the status, and interacting with MySQL server on a Linux distribution within WSL. It includes commands for updating packages, installing the server, checking the version, managing the service, and performing basic database operations like showing, creating, and dropping databases. ```Bash sudo apt update ``` ```Bash sudo apt install mysql-server ``` ```Bash mysql --version ``` ```Bash systemctl status mysql ``` ```Bash sudo mysql ``` ```Bash SHOW DATABASES; ``` ```Bash CREATE DATABASE database_name; ``` ```Bash DROP DATABASE database_name; ``` ```Bash sudo service mysql start ``` ```Bash sudo mysql_secure_installation ``` -------------------------------- ### Accept Windows EULA during Setup Source: https://learn.microsoft.com/en-us/windows/-hardware/manufacture/desktop/windows-setup-command-line-options The /EULA accept option instructs Windows Setup to automatically accept the end-user license agreement. This is required for installations starting with Windows 11, especially when using unattended installations or when user interaction is not supported. It assumes the Windows license was acquired through volume licensing or that the user accepts the Microsoft Software License Terms. ```cmd setup /auto upgrade /quiet /eula accept ``` -------------------------------- ### SetupDiGetActualSectionToInstall Source: https://learn.microsoft.com/en-us/windows/win32/api/setupapi_source=recommendations Retrieves the appropriate INF DDInstall section to use when installing a device from a device INF file on a local computer. ```APIDOC ## SetupDiGetActualSectionToInstall ### Description Retrieves the appropriate INF DDInstall section to use when installing a device from a device INF file on a local computer. ### Method [Not specified, likely a system call] ### Endpoint [Not applicable] ### Parameters [Parameters not detailed in the provided text] ### Request Example [Not applicable] ### Response [Response details not detailed in the provided text] ``` -------------------------------- ### SetupQueryFileLogA and SetupQueryFileLogW Source: https://learn.microsoft.com/en-us/windows/win32/api/setupapi_source=recommendations The SetupQueryFileLog function returns information from a setup file log. (ANSI and Unicode versions) ```APIDOC ## SetupQueryFileLogA / SetupQueryFileLogW ### Description Retrieves information from a setup file log. ### Method [Not specified, likely a C/C++ function call] ### Endpoint [Not applicable] ### Parameters [Parameters not specified in the provided text] ### Request Example [Not applicable] ### Response [Response details not specified in the provided text] ```