Jump to content

Computer names with spaces in Windows 98se


Recommended Posts

Hi there :hello:

I'm just finalizing some code for the upcoming alpha release of v4 of the unattended boot cd for Windows 98se and I've come across an interesting curiosity regarding computer names ...

I didn't know what the limitations were for computer names in Windows 98se so I thought I'd test them out. I knew there was a character number limit (its 15) and so the code checks for that. Next, I thought that you definitely can't have any spaces in the name so I checked for that. It seems you can!!!

I tried using "Blank space" (by going into Network Neighborhood properties , and then the Identification tab) and it accepted it with no worries. I was able to view shared folder files on the network with no worries. But when I tried to set a name with spaces using the Windows XP networking tool, it said that I couldn't use spaces in the name.

My question is: which is right? Can you use spaces or not?

My research threw up this page: http://www.microsoft.com/technet/archive/w...4.mspx?mfr=true

which says there must not be any blank spaces. So why does it seems to work?

Any help much appreciated! :thumbup

Here's a screenshot of me being able to see via the network, the computer with the blank space in the computer name --- weirdness !!!! :wacko:

Blank.gif

And yes i can view the files in those directories.

Link to comment
Share on other sites


Does it really matter?

Yes, yes & yes.

Yes, from the point of view that I'd prefer my projects to work and not crash people's computers. If I go ahead and not restrict spaces in the computer name, this may occur.

Yes because I haven't written any code to restrict spaces, and I'd prefer not to if I don't have to.

And yes from the point of view that understanding stuff is always better than not understanding it.

There's enough confusion already in the world!! I mean, most people don't recognise that capitalism is a system of exploitation and oppression when it totally is ...

Link to comment
Share on other sites

Any problems arising from the use of spaces so far?

If not, then it's a good assumption that M$ just maybe was thinking about something else at the time.

I wouldn't put any restrictions in my code, only let the restrictions be the stricter of the code itself or the underlying API.

As in your case the API seems to be doing fine with it, I wouldn't worry.

Just like detecting invalid characters in a filename is the OS's job, and all you need to do is pass ASCIIZ strings to the functions.

It will eliminate many redundant checks in your code, and possibly make it forward-compatible.

An excellent example is the filename one above; back in the days of DOS I had already understood that the file paths for the (then) new filefunctions were passed as ASCIIZ strings, and did not make any assumptions about their content. Those programs back then that I wrote now work for long filenames with spaces and whatever else characters there are (as long as not null - because that was the delimiter), all because I made sure to not treat filenames as being in a fixed format (which is up to the OS to decide, after all.)

Same goes for your computer names. If your APIs use ASCIIZ strings, pass them what the user gives and don't care about what's in them.

Link to comment
Share on other sites

Any problems arising from the use of spaces so far?

No, and I think your explanation makes good sense from what I'm experiencing. I haven't bothered to add any code to check for spaces ... I'll deal with it if it comes up. Thanks for your reply ...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...