Aaron
Aaron

Reputation: 1986

Creating a batch file that runs a Command Prompt

I want to run this as a batch rather than through the command line:

w32tm /config /manualpeerlist:bigben.cac.washington.edu /syncfromflags:MANUAL
net stop w32time & net start w32time
w32tm /resync

Upvotes: 4

Views: 39472

Answers (1)

Bali C
Bali C

Reputation: 31251

I will assume that you are just trying to execute these commands one after another in a batch file?

If so you need to open notepad.

Copy and paste your commands into notepad as you have in your question and click File -> Save As.

Give the file a name i.e. MyBatchFile.bat. Underneath the filename box change the file type to All Files. The .bat on the end of the filename will instruct the PC to open it as a batch file.

Batch files by default open with Command Prompt so all you will have to do is run it.

Upvotes: 5

Related Questions