AMH
AMH

Reputation: 6451

How can I create batch file to run a command?

I've writen this command line successfully:

c:\windows\system32\inetsrv\appcmd set config "Default Web Site" -section:requestFiltering -requestLimits.maxAllowedContentLength:157286400

I want to create a batch file to execute this line.

Any suggestions please?

Upvotes: 1

Views: 837

Answers (2)

RJFalconer
RJFalconer

Reputation: 11731

  1. Create a new text document

  2. Rename it "mybatfile.bat"

  3. Press yes when prompted "If you change a file name extension, the file might become unusable. Are you sure you want to change it?"

  4. Right click on the bat file, "edit"

  5. Put in your command:

c:\windows\system32\inetsrv\appcmd set config "Default Web Site" -section:requestFiltering -requestLimits.maxAllowedContentLength:157286400

Upvotes: 3

samack
samack

Reputation: 815

Well at the command prompt you could type

copy con myfile.bat 
c:\windows\system32\inetsrv\appcmd set config "Default Web Site" -section:requestFiltering -requestLimits.maxAllowedContentLength:157286400
"press F-6"

then enjoy your bat file.

Is this not a setting you could change in a config file somewhere so it is permanent though?

Upvotes: 0

Related Questions