Once you complete the steps, the batch file will map the network folder without opening a Command Prompt window. Confirm a name for the script - for example, mount-z-network-drive.bat.If you are accessing the files from another computer that uses a specific username and password, do not forget to use the /user: option with the correct credentials. It was added in this example to take a screenshot of the console. Quick note: The screenshot includes the "pause" command, but this is not required.
This example maps a network folder as a drive inside File Explorer using the "Z" drive letter:
In the command, replace the \PATH-NETWORK-SHARE\FOLDER-NAME for the folder network path to mount on the device, and YOUR-USERNAME YOUR-PASSWORD with the username and password that authenticates access to the network share. Type the following command to map a network drive in the text file: net use z: \\PATH-NETWORK-SHARE\FOLDER-NAME /user:YOUR-USERNAME YOUR-PASSWORD
To create a non-interactive batch file on Windows 10, use these steps:
For instance, to map a network drive, install an application, change system settings, and more. You can also write batch scripts for any task that does not require user interaction. bat file to run it or use the steps below to execute the script with Command Prompt, File Explorer, or Task Scheduler.
The above script runs each line to query a series of system details, and the result will be divided into three categories, including "WINDOWS INFO," "HARDWARE INFO," and "NETWORK INFO." Also, the "START" command will open the web browser in the official support page outlining the Windows 10 system requirements, which you can check against your information. Wmic path win32_VideoController get CurrentHorizontalResolution,CurrentVerticalResolution
Systeminfo | findstr /c:"Total Physical Memory" :: This batch file details Windows 10, hardware, and networking configuration.ĮCHO Please wait. Type the following lines in the text file to create a more advanced Windows 10 batch file: OFF To create an advanced Windows batch file with multiple commands, use these steps: Alternatively, you can use the steps below to learn the different ways you can run a batch file with Command Prompt, File Explorer, or Task Scheduler. Once you complete the steps, double-click the file to run it. bat file extensions, you can also find them using the. Quick note: While batch files typically use the. You can use this command at the end of the script or after a specific command when running multiple tasks and want to pause between each line.Ĭonfirm a name for the script - for example, first_basic_batch.bat. Otherwise, the window will close automatically as soon as the script finishes executing.