The ‘Batch file programming’ Archives
Posted November 21, 2013 by

Install Network Printers Via Batch File or Command Line in Windows 7/8 and Server 2008

network connection feature

As a desktop administrator I like to automate as many tasks as possible.  I had a need to automate the installation of network printers in a Windows 7 / Server 2008 environment and after some digging through manuals found a solution to installing TCP/IP printers via a batch file.  I’ll outline the VBS script we’ll leverage for port creation and also the using of rundll32 to silently install print drivers and create printers.

Posted May 2, 2011 by

Multi-Threaded Robocopy by First-Level Subfolder

Robocopy is a wonderful tool for synchronizing directories, migrating servers, or just generally copying data on or between Windows systems. The built-in version of Robocopy on Windows 7/Server 2008 R2 introduced a multi-threaded copy option; however, this is not available in earlier editions of Windows. Read on to discover how to do multi-threaded Robocopy operations […]

Posted January 19, 2011 by

Windows 7: Mounting and Unmouting WIMs Using a DISM Batch File Menu

This tech-recipe will include a batch file that lets you mount and unmount .WIM files in Windows 7 Professional / Ultimate and Windows Server 2008. I will also explain some the basics of WIM files and discuss how to manage them using DISM from the command prompt.

Posted December 3, 2010 by

How to run your own PowerShell scripts / cmdlets

By default, Microsoft has prevented the running of custom PowerShell scripts, a.k.a. cmdlets, by setting the PowerShell “ExecutionPolicy” to “Restricted”. This can be changed easily.

Posted November 3, 2010 by

7-Zip: How to list contents of a folder and subfolder of zip files without extracting (Win XP,Vista,7 and Command Line)

This tech-recipe will explain how to use 7-Zip to create a text file (tab delimited) listing of the contents of a zip file.  You can run this .bat file in a directory and get the listings of every ZIP file contained in that directory and any sub-directories.  Keep reading for the commands and explanation.

Posted October 4, 2010 by

Batch File: How to retrieve Asset Tag / Serial Number for a Dell computer

This guide is a quickie on how you can use a batch file to retrieve asset tag and / or serial number information for a Dell desktop or laptop.  This recipe assumes that the Dell computer has had its asset tag entered into the BIOS. Note, not all computer motherboards use this field in WMIC […]

Posted March 31, 2010 by

Batch File Scripting: How to export, find and replace, and reimport a registry key (XP, Win2k3, Vista, Windows 7)

This recipe is designed for the more operating system savvy persons and for those who work in an app deployment corporate setting. Many times when you work in IT and in an app deployment team you run into situations where you need to either find a registry key and find a key and replace with a new entry. However, sometimes there are cases where you know the main registry entry key but are not sure which entries below it may need to be changed. Lets find a solution!

Posted February 22, 2008 by

Windows XP/Vista: Use a Batch File for Quickly Restarting explorer.exe

Explorer.exe is the user shell on your Windows system (taskbar, desktop, etc.) and periodically it requires a restart to resume proper functionality. Additionally, if you do a lot of tweaking to your system registry like I do, it’s much easier to restart explorer.exe to reload the registry instead of restarting the entire system. By creating […]

Posted November 7, 2007 by

XCOPY command : Using the /EXCLUDE flag

This recipe will briefly explain how to use the /EXCLUDE flag with XCOPY. This can be very handy if you need to backup a full directory but do not need or want specific file types or folder or file names.

Posted August 18, 2007 by

Batch Files : Get users default printer via registry (WinXP)

This is another quickie recipe for you admins. This recipe shows how to get the current user’s default printer via the registry and output the information to a text file via a batch file and in turn combine the result files into a larger file to then import into excel.