Apache, PHP, MySQL, ASP.NET, JSP and Perl Solutions for your Web Development and Hosting Needs on Windows.
A Complete Web Development and Hosting Platform for Windows.

Building Software -- Working with the Command Shell for Windows 2000/XP/2003

Building a Web Server, for Windows

The Command Shell

Open the command shell (also referred to as the command-line)...

Default cmd.exe window
Start » Run : cmd.exe

Example: Change the directory and drive...

Directory and Drive change

Change to the root directory (C:\) of the current drive...

cd \

Change to another drive and its root directory (E:\)...

E:

Change to a top-level (specified by the beginning '\') directory (E:\Program Files\) that contains a space -- has to be quoted...

cd \"Program Files"

Change to directory (E:\Program Files\Apache2\) -- since no beginning '\' is used, this directory must be located under the present directory (E:\Program Files\)...

cd Apache2

Setting the Build Environment

When using the command-line with Visual C++, the environment has to be set. There are several ways to perform this task. Note that this will only hold for the current cmd.exe window.

  • VS.NET : open the Microsoft Visual Studio .NET Command Prompt, which will have the proper environment set.
  • VS.NET : run ...\Microsoft Visual Studio .NET\Common7\Tools\vsvars32.bat under the regular command prompt, which will set the environment.
  • VC++ (VS98) : run ...\Microsoft VisualStudio\VC98\bin\vcvars32.bat under the regular command prompt, which will set the environment.

Working with the Build Environment

  • The environment can be viewed with:
    • :\> set
  • An individual variable can be viewed with:
    • :\> echo %VAR%
  • A variable can be set with:
    • :\> set VAR=value
  • Multiple values for a variable can be set with:
    • :\> set VAR=value1;value2;value3
  • Values can be added to a variable with:
    • :\> set VAR=%VAR%;more_values

Example: Setting the PATH

Environmental variable 'PATH' specifies the search path for executables (EXEs), libraries (DLLs), and other important files. This variable is often updated to reflect the additional tools that will be used during the build process.

Example for adding executables perl (under C:\www\perl\bin), awk, bison, flex, sed (under C:\GnuWin32\bin) to the PATH -- tools used in the Apache2 (and related) build process...

If using the command-shell (or Visual Studio .NET Command Prompt)...

  • :\> set PATH=%PATH%;C:\www\perl\bin;C:\GnuWin32\bin
    [note that this method will only set the PATH temporarily and will only hold for the current cmd.exe window]

  • Setting the PATH temporarly
  • Set PATH under Start » Settings » Control Panel » System » Advanced » Environment Variables » System variables » Path
    [this will set the PATH permanently]

  • Setting the PATH permanently

If using the Visual Studio Workspace IDE...

  • Open menu Tools » Options » Projects » VC++ Directories
    • Select 'Executable files' under 'Show directories for:'
    • Add C:\www\perl\bin
    • Add C:\GnuWin32\bin

Information and Help

In the Spotlight

In the Spotlight

Developing and Hosting PHP+MySQL based websites and applications has never been simpler. The Web.Developer Server Suite provides a Platform & Framework on which to create standards-based CSS, XSLT, and XHTML sites running on PHP and MySQL. Save your time, focusing on core business. Reduce complexity and maximize your productivity.

Developers

Developers++

The Web.Developer Server Suite is more than just a Windows based Apache|PHP|MySQL Platform. Suitable for novices and professionals alike, a complete Hosting Solution is provided that is capable of creating and deploying websites and web applications both locally and on the internet. Create, test, publish and maintain your websites in-house, on your own server, where you are in full control.

Newsletter Signup

Newsletter Signup

Enter your e-mail address: