|
Sorry, I thought it did - I guess I only skim-read it
Just typing help lists the commands that the help program knows about. Of course help knows about itself:
C:\>help help
Provides help information for Windows XP commands.
HELP [command]
command - displays help information on that command. You probably want to look at least at help if and help goto .
|
|
|
|
|
And help for , help call and help exit as well. It's actually a surprisingly capable little language these days. Here's the contents of the which.cmd file in my tools path:
@echo off
setlocal enableextensions
if "%1" == "" (
echo usage: which ^<command^>
exit /b 1
)
if "%~x1" == "" (
call :pathext %1 %PATHEXT%
) else (
call :search %1
)
if %ERRORLEVEL% neq 0 echo %1 not found.
exit /b %ERRORLEVEL%
:pathext
:loop
call :search %1%2
if %ERRORLEVEL% equ 0 exit /b 0
shift /2
if not "%2" == "" goto loop
exit /b 1
:search
if not "%~f$PATH:1" == "" (
echo %~f$PATH:1
exit /b 0
) else (
exit /b 1
)
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Ah yes, I see from help call that the parameter syntax has been extended to support different parameter expansions, and also to allow essentially a subroutine call into the same batch file.
Cunning use of the %PATHEXT% variable, there.
I must copy this to my Windows 2000 computer - the Platform SDK's where now requires Windows XP.
|
|
|
|
|
Heh, good catch. It was exactly due to where.exe being broken that I wrote it.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
I just set up a win2k advanced server locally for my business to develop locally on, and I have set up a few websites on it. They are accessible via their allocated ports, e.g. http://server:88, http://server:89, etc.
At my old job, our sysadmin used to set up website development environments for me but he was able to actually assign them a computer name, even though they were on the server, so I could, say, type in http://cmsdev/ for one website, and http://oursite/ for another site. Is this related to DHCP or anything? The server isn't the DHCP server, we have a router that does that, in case it's relevant. How to do I assign actual names to the development websites I create?
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
Mate, what I did here is alocate an IP address to each of my multiple websites. You can assign multiple IPs to a server then in your IIS Console in the properties in each of the websites you can allocate the ips out. I then use DNS to allocate a name to the ip...
|
|
|
|
|
Ah, ok. But, how do you allocate multiple IP addresses to the server? Is that something I have to set up via the DHCP server?
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
The DHCP server gives out IPs to your network, which tells them that they have a DNS, WINS server etc etc... Rather that using static IPs.
I sent you an email about the Multiple IP thing... It wasn't the yahoo one..
|
|
|
|
|
Got your email, thanks for that! I have set up multiple static IPs on the web server now. My last hurdle is now to try and allocate names to each of those IP addresses for each website. Haven't had any luck making that work yet, unfortunately...
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
In Internet Services Manager, create new applications for each site, and assign each a unique IP address using port 80. The IP address and port # combination must be unique for each site. In DNS provide a host (A) record for each IP address using the name of the application as the hostname.
"Some people are like Slinkies... not really good for anything, but you still can't help but smile when you see one tumble down the stairs."
|
|
|
|
|
|
Do the IP addresses have to be available in that drop-down list? (The one that also has the option "All Unassigned") Do I have to get the DHCP server to assign extra addresses to the IIS box? There seems to be an option on our router's web server to assign extra IP addresses but it wants a MAC address too, when I try to add an IP address, but I wouldn't have the faintest idea what a MAC address is, why I have to specify it, and how I know what to type in...
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
A MAC address is the globally unique identifier assigned by the manufacturer to the Network Interface Card (NIC). Windows 2000 allows you to assign multiple IP addresses to a single NIC, though I've never had reason to do this and don't know how off hand. You do not want to have DHCP assign IP addresses to a server; these should be statically addressed. Spend some time at the Microsoft Technet site and review the Resource Kit documentation - it actually has some useful information in it.
"Some people are like Slinkies... not really good for anything, but you still can't help but smile when you see one tumble down the stairs."
|
|
|
|
|
Ok, thanks for the info.
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
Ok, have done some more investigation on this. Is it possible to, instead of mapping a name to a single IP address, instead map multiple names to the same IP address, but on different ports?
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
Probably, but I doubt that you'd want to. Your users' browsers will default to port 80 for http requests, and in order for them to reach the different sites you'll have to provide them with links that override the default port. Instead, you could create each site in a different virtual directory and access them through a URL such as www.mydomain.com/site1/ www.mydomain.com/site2 etc.
"Some people are like Slinkies... not really good for anything, but you still can't help but smile when you see one tumble down the stairs."
|
|
|
|
|
I must be doing it wrong, or maybe doing something in the wrong order because I can't seem to get it to work...
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
Sorry, looking at this confusing thread, I'll elaborate. I have set up static IPs for each website and they work fine now. Last hurdle is trying to assign a name to each website so I don't have to use the IP address to get there. Haven't had much luck making it work yet though...
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
Try setting up each website in its own virtual directory. Visual InterDev does this each time you create a new web on the server, and the sites are accessed by the URL www.mydomain.com/sitename/.
"Some people are like Slinkies... not really good for anything, but you still can't help but smile when you see one tumble down the stairs."
|
|
|
|
|
The problem is that some of the sites require a reference to the root as part of their code. I'm using win2k advanced server, so I have just used "New -> Website" to add websites. Although.. as I think about it... if I am assigning an IP address to a virtual directory, that would work pretty much the same way, wouldn't it? What's the advantage of using one method over another? i.e. virtual directory vs standalone website. Oh, also, I don't have Visual Interdev, because I use Dreamweaver MX for my coding environment
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
I just went spelunking in ISM and realized that assigning a separate IP to a virtual directory isn't an option - I must have been thing of the new site wizard. Sorry about that... I use the www.mydomain.com/sitename method for hosting multiple sites for development. That requires just one IP address and port 80 for all of them, and gives them all access to root functions as needed. It's easier for users to understand than the separate port option, too. When I have a site ready for production I can simply ftp the entire directory containing the code to the server used for hosting with a couple of clicks.
BTW - How do you like Dreamweaver? I've read great reviews and terrible, and I know from experience that Visual InterDev sucks. I wonder which one sucks less...
"Some people are like Slinkies... not really good for anything, but you still can't help but smile when you see one tumble down the stairs."
|
|
|
|
|
I find Dreamweaver MX quite good, however the ftp upload function seems to be unstable, and you can't perform simply ftp functions such as CHMOD.. I use Dreamweaver to code, and WS-FTP to upload ...
|
|
|
|
|
For the little bit I used it, I hated InterDev. DW on the other hand seems very nice to me (I'm currently using MX), but as Baldcat said, I also use a separate FTP client.
Paul
That demands capital punishment!! Death by a herd of marauding Bobs! - Ryan Binns
modified 18-Jul-18 11:59am.
|
|
|
|
|
With HTTP 1.0, all sites need an individual IP address/port combination.
HTTP 1.1 adds the 'Host' header, which permits the client to tell the server which name it thinks it's talking to.
It looks like you can configure this by going to the web site's properties in the Internet Information Services Admin Tool, then on the Web Site tab, hit Advanced next to IP Address. Under 'Multiple identities for this Web Site', highlight 'Default' and hit Edit. Under Host Header Name, enter the name of the site. Repeat for each website, making sure they're all on port 80 (since the port is encoded in the URL, defaulting to 80).
You then need to add each name to your DNS either as an A record pointing to the server's IP address, or, preferably, a CNAME record pointing to the server's canonical name.
You'll need to check that all your clients are using HTTP 1.1 before doing this, but all new browsers are 1.1 capable.
If you need to support 1.0, you'll need to add some IP addresses. In Network Connections, go to Properties for your Local Area Connection. Highlight 'Internet Protocol (TCP/IP)' in the list, then click Properties. Hit Advanced, then under IP Addresses, hit Add to add a new address.
Add your new IP addresses to DNS, then set your websites up as appropriate.
The 1.0 solution is very wasteful of addresses and resources, so the Host header is preferable.
|
|
|
|
|
quick question regarding your use of cmsdev as a server name .... are you in charlotte ??
|
|
|
|