February 5, 2009

Installing a simple Web server on Windows Server 2008 from a script

  • Date: September 23rd, 2008
  • Author: Rick Vanover

While there are more advanced Web server configurations, many products require the IIS Web engine as a prerequisite. Here’s how to install a simple IIS Web server through a scripted role.

——————————————————————————————————————-

You can usually add features through the Windows Server 2008 Server Manager snap-in via a script. In the case of IIS 7.0, there are many options available for the cialis 20 mg cost feature install.

One way to ensure a consistent configuration for applications that require IIS (e.g., SQL Server) is to use a scripted installation. For IIS, the package manager can install the features locally. To install a basic IIS configuration, run the following script:

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServerManagementTools; IIS-ManagementService;IIS-Metabase;WAS-WindowsActivationService; WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI

The command provides little interaction and, by default, does not provide feedback of any type if an incorrect parameter is passed after the /iu parameter. Figure A shows IIS being added via the script.

Figure A

Figure A

Once the scripted task completes after a minute or so, and the Window Server 2008 Server Manager snap-in performs its next refresh, the Web server is listed as a role on the system and is running. Figure B shows an updated Server Manager snap-in with this basic IIS role.

Figure B

Figure B

Using this scripted install of IIS is a good way to ensure consistent server build configurations, and other Windows features can be automated through the package manager (pkgmgr). The package manager can also uninstall packages, which may be helpful for temporarily enabling a feature for a specified amount of time and for removing the feature from a scheduled task to ensure its decommissioning.

For more information on the package manager, read the TechNet article Package Manager Command-Line Options.

Permalink • Print • Comment

Convert Excel calculations to literal values

  • Date: September 2nd, 2008
  • Author: Jeff Davis

Copying Excel data to a different location can send your calculations into a tailspin.  Avoid problems by using Paste Special to copy values rather than formulas.


Suppose you have a worksheet with columns and rows chock full of calculations, running the gamut from Sum functions to If tests to vertical and horizontal lookups. The calculations are correct and your data is pristine. You save the worksheet.

Now you need to use a subset of that worksheet in another worksheet. If all you’re going to do is print the subset of columns or rows, you can simply hide those rows and columns, print what you need, and unhide the columns and rows later to restore the sheet to its normal state.

But if you’re going to e-mail a copy of the sheet to a coworker or a third party, you may not feel comfortable simply hiding certain rows and columns. You may want to delete them instead. The problem is, of course, if you start deleting rows and columns, you’re going to get error messages in the cells that depend on the cells you deleted.

The solution? First and foremost, save a copy of your pristine worksheet cialis 2.5mg under a new name. Just go to File | Save As and add “_work” to the end of the “real” name. Select the entire sheet and then copy it. Without moving the cursor, go to Edit | Paste Special. Now, select the Values option, as shown in Figure A, and click OK. When you do, Excel will replace all the formulas with the values they’re currently calculating and displaying. At that point, you can delete columns or rows and move cells around without generating a single error message.

Figure A

paste special values

Note

If you use the Paste Special | Values option and the data you’re pasting contains calculated dates or numbers formatted as currency, the date calculations will be pasted as the Julian date value, and the currency will lose its dollar signs and commas. To preserve that kind of formatting when you convert calculations to literals, simply choose the Values And Number Formats option instead of Values.

Permalink • Print • Comment

Use a single mailing list to send out two entirely different letters

  • Date: August 26th, 2008
  • Author: Mary Ann Richardson

Thanks to Word’s mail merge fields, you can automate the process of producing different letters based on criteria you specify. This example shows how it works.


When you need to send two or more different letters to your clients based on a value in a field in the client database, you don’t need to compile two separate mailing lists. Using the If… Then…Else rule with the INCLUDETEXT field, you can process both letters at once. For example, say you have saved two documents, one containing the body of the letter for clients located in Missouri and a second containing the body of the letter for clients located in Illinois. To create one mailing that will send the appropriate letter to each client, follow these steps:

  1. Open your mail merge document, which contains the merge fields and text common to both letters.
  1. Click below the greeting, where you want to insert the body of your letter.
  1. Click the drop-down arrow of the Insert Word Field button in the Mail Merge toolbar. (In Word 2007, click Rules in the Write & Insert Fields group of the Mailings tab.)
  1. Click If…Then…Else.
  1. Click the Field Name box drop-down arrow and select State (Figure A).

Figure A

cialis 2.5 />

  1. Click in the Comparison box and select Equal To.
  1. Click in the Compare To box and type MO.
  1. Click in the Insert This Text box and type This is the text for MO.
  1. In the Otherwise Insert This Text box, type This is the text for IL.
  1. Click OK.
  1. Right-click the field in the document and select Toggle Field Codes to display all the field codes (Figure B).

Figure B

  1. Select the following text inside the quotes: This is the text for MO. (Do not select the quotes.)
  1. Go to Insert | Field. (In Word 2007, click Quick Parts in the Text Group of the Insert tab.)
  1. Click Field.
  1. Under Field Names, select IncludeText (Figure C).

Figure C

  1. Click in the Filename Or URL box and type the full pathname for the file containing the body of the letter for Missouri clients.
  1. Click OK.
  1. Right-click the field and select Toggle Field Codes.
  1. Select the following text inside the quotes: This is the text for IL. (Again, do not select the quotes.)
  1. Repeat steps 13 through 15.
  1. Click in the Filename Or URL box and type the full pathname for the file containing the body of the letter for the Illinois clients.
  1. Click OK.

When you right-click the field and toggle the field codes, your rule should look like the one in Figure D, substituting your filenames for each of the letters. When you run the mail merge, Word will print the letter that pertains to the value of the State field in each client record. (If you prefer to enter the field codes entirely from the keyboard, be sure to use Ctrl + F9 to enter the brackets.)

Figure D

Note that you can use the If …Then… Else rule with INCLUDETEXT to print out different letters for any number of values in the field. Simply create a different If…Then…Else rule for each value, with INCLUDETEXT as the first variable and blank (nothing between the quotes) for the second variable.

Permalink • Print • Comment

Easy parallel columns in Word

Columns are easy to create in Word — usually. Newspaper columns flow from top to bottom and then snake around to the top and down to the bottom again. In Word, you just click a button and like magic, you have newspaper columns. On the other hand, parallel columns are a bit more troublesome. These columns are read left to right. You can use tabs, but the guesswork makes these columns awkward to work with. Moving or deleting a column is difficult at best. Displaying the tab characters make the chore easier, but you still have to delete or move items one by one.

Tina Norris Fields, a Michigan colleague, recently shared an easy way to create parallel columns: Use a table and then inhibit the borders. Now, that’s magic!

Use any method you like to create the table. I usually enter the first few rows and then let Word create the table based on the existing items. If you know the dimensions, you can create the table first and then enter data. It doesn’t really matter. Use the AutoFit format and let Word adjust the table as you enter the columnar data.

When you’re done, turn off the table’s borders as follows:

  1. Select the entire table by clicking anywhere inside it. Then, choose Select from the Table menu and choose Table. Or click the double-arrow icon in both Word 2003 and Word 2007.
  2. With the table selected, choose Borders And Shading from the Format menu and click the Borders tab. (In Word 2007, choose Borders And Shading from the Borders And Shading drop-down list in the Paragraph group on the Home tab. This list is also available in the Table Styles group on the Design tab.)
  3. Click the None option under Setting.

Word will gray out the borders on screen. However, Word won’t print the borders, which you can easily confirm by viewing the document in Print Preview.

Using the table structure allows you to easily move or even delete parallel columns.

Permalink • Print • Comment

How to combine text and dates in the same cell

  • Date: September 16th, 2008
  • Author: Mary Ann Richardson

cialis 100 mg class=”entry” align=”justify”>If you want to display both text and date data in one cell, you’ll need to include an extra formatting step. See how to use the TEXT function to get the desired results.


Excel does not normally let you combine text and dates together in the same cell. For example, suppose you have entered the formulas shown in Figure A.

Figure A

dates

Figure B shows the results.

Figure B

display

While the value in A2 displayed correctly, the value in A1 did not. This is because Excel displays the actual date data entered into the cell until it’s formatted. Thus, to show the data in A1 as a true date, we need add the TEXT function to change the format to text. When we replace the formula in B1 with

="Today is"&" "&TEXT(A1,"MM/DD/YYYY")

we get the results shown in Figure C.

Figure C

text function


Permalink • Print • Comment
« Previous PageNext Page »
Made with WordPress and a search engine optimized WordPress theme • Sky Gold skin by Denis de Bernardy