Mike Rockwell (Progress Software) asked a question.

Cisco IOS Firmware Update

From the original community.whatsupgold.com posted by Rich Makris.

 

Here is the default example script from the WhatsConfigured stand alone application. 

The text version is below for copy/paste and the xml version is attached for the import function.

 

# This script uploads firmware to a IOS device using TFTP

# NOTE: Updating router software can be a complex operation. YOU ARE RESPONSIBLE to

# ensure that you are following all of the proper vendor procedures.

# Wait times in this script may be longer than usual. It may be necessary to update

# the WaitTimeout in the device credentials

# DEFINE the following VARIABLES

# Filename of image being uploaded

# This file must be in the TFTP server root directory

SourceFilename = SOURCE-FILENAME-HERE

# File name given to the image when stored on the device

DestinationFilename = DEST-FILENAME-HERE

# Used if device contains a file with the same name as the destination file name

# Change to 'y' if you would like to overwrite the device file

OverWrite = n

# Indicates whether the current image should be erased before copying.

# Note that there must be enough memory for both images if the flash is not erased

EraseFlash = n

# TFTP Server IP Address

TFTPServerAddress = TFTP-IP-ADDRESS-HERE

# Used to verify the integrity of the uploaded image

# Comment/Remove this variable if you do not want to verify the image

ImagePath = flash:$(DestinationFilename)

# Used to update boot location after the image is loaded

# Comment/Remove this variable if you do not want to update the boot location

BootLocation = flash:$(DestinationFilename)

# If you would like to restart the device after image upload uncomment this variable

# NOTE: It doesn't matter what the value of this variable is, if it is defined the reload

# command will be issued

# RestartDevice = T

# BEGIN SCRIPT

# UPDATE command prompt to handle queries

CommandPrompt = /(>|#|\]\?|m\]) ?/

@login

@enable

copy tftp flash

# PROMPT: Address or name of remote host []?

$(TFTPServerAddress)

# PROMPT: Source filename []?

$(SourceFilename)

# PROMPT: Destination filename [SOURCE-FILENAME]?

$(DestinationFilename)

# QUERY PROMPT: Do you want to over write? [confirm]

{/over write.+confirm\]/, "$(OverWrite)"}

# PROMPT: Erase flash: before copying? [confirm]

$(EraseFlash)

# QUERY PROMPT: Erasing the flash filesystem will remove all files! Continue? [confirm]

# Shown if ErasePrompt is y or yes

{ /.*continue.*\]/, "y" }

@if ImagePath

verify $(ImagePath)

# Exit if the image doesn't verify

{/warning.*/, "exit"}

@endif