开发者

How to write an automated script to install a new cms

开发者 https://www.devze.com 2023-03-30 05:03 出处:网络
Does anyone know where I would begin to write an automation script to install a CMS to my wwwroot folder and create the database for it? For this round it would be for DNN on in a wi开发者_StackOverfl

Does anyone know where I would begin to write an automation script to install a CMS to my wwwroot folder and create the database for it? For this round it would be for DNN on in a wi开发者_StackOverflow中文版ndows environment.

I am looking for methods to speed up our development process in the office.

Many thanks!


First write a (textual) script of what you need to do.

Then convert these steps to automated steps.

The exact steps depend on the database and webserver you are using and on how you want everything to be configured, so get these steps clear before you start scripting.

Queries you need to execute can be put in separate files (usually with .sql extension). Most databases allow running those files from the command line. Most other commands, like creating folders and such can be run from the command line as well. If you can run it in the command window, you can put it in a batch file as well to run everything at once, so you can translate all possible steps to a line (or group of lines) in a .bat script.


  1. Identify the prerequisites, and generally they windows patches, db/sql server etc.
  2. Determine how to install all the prerequisites from the command line.
  3. Create your database manually and then script it out using something like sql server management studio or a third party tool such as the RedGate Sql Tool Belt.
  4. Read up on how to install the CMS from the command line
  5. Automate the installation of the above using a script language, such batch, Powershell, VB script etc.

Once you've got to step 5 you can ask more specific questions on particular aspects of this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号