A few solutions that I will post in the future will utilise Windows Batch scripts (.bat) files. Here is a quick tutorial on how to create a batch script in Windows:
- In Windows Explorer, click on Tools (press alt key if you can’t see it), then select Folder Options
- Click the View tab. Under Advanced settings, untick Hide extensions for known file types and click OK to save changes.
- Open your favorite text editor e.g. notepad
- Type in the Windows commands that you want to include in your batch script e.g. net stop spooler
- Click on File, then select Save as
- Under Save as type, click the dropbox and select All Files
Type in a relevant name and make sure you add a .bat at the end e.g. StopSpool.bat
- Save the file to your required location e.g. desktop. Browse to the saved location and TEST script to see if it works. You will notice that the .bat extension will be displayed.
Happy scripting 🙂