# Confused



## gilmore03 (Jun 18, 2004)

Hey everyone, i have to type a bunch of commands into DOS to get a deticated server up for a game i play, but when im typing the command, at a certain point it wont let me type anymore. When i hit key it makes that "ding" sound (lol  )., and it wont let me type nothing. Laugh while you can  im just not good with DOS? lol. Thanx alot


----------



## plejon (Jul 26, 2001)

The old DOS had a limit on the number of characters you could type on a single command line. I believe it was 255 characters. If you tried to type an extremely long command, it would just go DING DING. It simply wasn't possible to type more than 255 characters in one command.

A workaround was to use variables to store long filenames.
E.g. : you couldn't type the following on a command line:
COPY <200 char source filename> <200 char target filename>
because the total length is larger than 255 characters.

A workaround was to use variables:
set sourcefile=<200 char source filename>
set targetfile=<200 char target filename>
COPY %sourcefile% %targetfile%

I just tried to reproduce the problem in an XP command shell box, but it didn't occur. I could type as many characters as I wanted.


----------



## DaveBurnett (Nov 11, 2002)

I thought it was 128, but it was a L...O...N...G time ago.


----------



## plejon (Jul 26, 2001)

Could have been 128, I'm not sure anymore. The point is that there's a limit and the DING's start coming when you try to pass it


----------



## Perfesser (Jun 2, 2003)

If it's true DOS a batch file should work; surely the command isn't one long string but a series of commands separated by <enter>??
Use notepad or any editor, type the list of commands and then save it as a .bat file.
Here's a short example:
To use a .bat just type the filename at a DOS prompt.

filename 'runkeen.bat':

cd\games\keen6
keen6e.exe


----------



## gilmore03 (Jun 18, 2004)

plejon im actually using 98. Can you show me exactly what i have to do in order to get around it?

perfesser: i tried your suggestion, but didnt work  thank though. Im actually just using a dos prompt from 98


----------



## gilmore03 (Jun 18, 2004)

This is what im trying to type into DOS:

-command create -username kamakazze15 -email [email protected] -password whatever -question "whatever" -answer "whatever"


----------



## gilmore03 (Jun 18, 2004)

really need help here


----------



## Perfesser (Jun 2, 2003)

-command create -username kamakazze15 -email [email protected] -password whatever -question "whatever" -answer "whatever"
This doesn't look like a DOS command string...more like LINUX to me, from my admittedly limited experience. It's been a few years since I've been near LINUX.


----------



## gilmore03 (Jun 18, 2004)

Nah im positive it goes in DOS, any suggestions


----------



## squidboy (Dec 29, 2004)

It looks like a HL2 DS...perhaps the HL forums could help you? They have some good tips there if you're trying to run a DS on an older box or unusual config.

www.steampowered.com


----------



## gilmore03 (Jun 18, 2004)

Thanx squid, its actually for digital paintball, a mod for HL. Ill go check out the forums, thanx alot


----------



## plejon (Jul 26, 2001)

The -command looks strange to me. Most EXE's in DOS don't start with a minus sign. Are you sure these aren't just the command options? Maybe you have to type the real executable in front of these options

E.g. something like this

HL2.EXE -command create -username kamakazze15 ....


----------



## gilmore03 (Jun 18, 2004)

HL2.EXE -command create -username kamakazze15 ....

yea that is what i write, sry i forgot the file name, but still won let me write enough text


----------



## plejon (Jul 26, 2001)

The line doesn't seem that long to me. You could try this :

set part1=-command create -username kamakazze15 -email [email protected]

set part2=-password whatever -question "whatever" -answer "whatever"

hl2.exe %part1% %part2%

Use more parts if needed
It's probably easier to do this in a batch file rather retype the whole instruction every time.


----------



## gilmore03 (Jun 18, 2004)

plejon, u would have to explain how id put that in, im not really sure, when i do part 1 then hit enter it wont work, cause everything has to be together


----------



## plejon (Jul 26, 2001)

Normally, it should even work outside a batch file.

Just open a DOS box (command shell) and type

set part1=-command create -username kamakazze15 -email [email protected]

followed by

set part2=-password whatever -question "whatever" -answer "whatever"

DOS won't give you any feedback since the command was correct. You can check if you have the desired result by typing SET. This will give you a list of all DOS variables. You should see your variables part1 and part2, and also some others.

Another way to verify if the variables are correct is to type

echo %part1% (or echo %part2% of course)

Alternatively, open notepad and enter the following commands :

set var1=-command create
set var2=-username kamakazze15
set var3=-email [email protected]
set var4=-password whatever
set var5=-question "whatever"
set var6=-answer "whatever"
hl2.exe %var1% %var2% %var3% %var4% %var5% %var6%

Then save the file as yourname.bat
This is clearly the preferred method. You can easily edit the batch file and change options. Once all options are set correctly, you don't have to retype them each time. Just click on the batch file or type it's name in DOS and your server will start.

Good luck !


----------



## gilmore03 (Jun 18, 2004)

thanx alot plejon, but teh file name is hldsupdatetool.exe i would replace that Hl2.exe with it rite?


----------



## gilmore03 (Jun 18, 2004)

haha nice i got it, thanx alot man.


----------



## plejon (Jul 26, 2001)

hl2.exe was just an example. Feel free to replace with the EXE file you need. But you already figured that one out yourself, since you got it running...


----------

