Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Microsoft Azure

You're reading from   Learning Microsoft Azure A comprehensive guide to cloud application development using Microsoft Azure

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher Packt
ISBN-13 9781782173373
Length 430 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Geoff Webber Cross Geoff Webber Cross
Author Profile Icon Geoff Webber Cross
Geoff Webber Cross
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Getting Started with Microsoft Azure FREE CHAPTER 2. Designing a System for Microsoft Azure 3. Starting to Develop with Microsoft Azure 4. Creating and Managing a Windows Azure SQL Server Database 5. Building Azure MVC Websites 6. Azure Website Diagnostics and Debugging 7. Azure Service Bus Topic Integration 8. Building Worker Roles 9. Cloud Service Diagnostics, Debugging, and Configuration 10. Web API and Client Integration 11. Integrating a Mobile Application Using Mobile Services 12. Preparing an Azure System for Production Index

Start-up tasks


Start-up tasks are command-line scripts that can be added to a role in the ServiceDefinition.csdef file, allowing the role to perform activities before the role has started. These activities might be things such as installing a third-party package or making environmental or configuration changes. Start-up tasks are the best way of customizing a server rather than making manual changes using a remote desktop. We're going to have a very brief look at this area, so it's worth doing some additional reading around this area yourself.

Creating a batch script

To get started, we need to create a .cmd batch script to perform a task (you can also write PowerShell .ps1 scripts) called DemoTasks.cmd and put it in a solution folder called Tasks:

Before we write the script, we'll set the Build Action property of the file to Content so that the file along with the Tasks folder is copied to the output (bin) folder, and Copy to Output Directory to Copy if newer so that the file is copied if it...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime