NetAlias.exe: New Freeware Tool

M

Marty List

I posted a new freeware tool on my website, called 'Network Alias' or
NetAlias.exe.

http://www.optimumx.com/download/#NetAlias

C:\>NetAlias.exe /?

Network Alias [Version 1.00]

Displays, adds or removes NetBIOS names for the Server service. This allows
a
computer to be accessed using an alias, or a name other than the computer
name.
The Server service will also announce this alias to the browse list where it
will be displayed in apps such as My Network Places and the NET VIEW
command.

After a system restart, this alias will no longer exist. To make the alias
persistent, this tool would need to be scheduled to execute at system
startup.
This alias will only be available as a UNC path (\\server\share), tools like
ping and nslookup will not be able to resolve it.


The syntax of this command is:

NetAlias.exe [/ALIAS:NEWNAME] [/DOMAIN:NAME] [/DELETE] [/Y] [\\COMPUTERNAME]

/ALIAS: Allows you to specify a new name to add (or delete). A new alias
can
be up to 15 characters. Names with spaces must be enclosed in "double
quotes".

/DOMAIN: Optional, rarely needed. Allows you to specify the
domain/workgroup
that the new alias will be announced to. Ignored if /ALIAS is not
specified.

/DELETE Allows you to delete the specified alias.

/Y Allows you make changes without being prompted.

\\COMPUTERNAME Allows you to manage the names on a remote system.


A Windows NT based operating system is required (2003/XP/2000/NT), and the
user must be a member of the Administrators or Server Operators group. The
maximum number of names that can be added will vary between 128 and 1024,
depending on the length of the names. The new alias should be available on
the local subnet immediately, but may not be available on remote subnets or
appear in browse lists for up to 30 minutes, depending on the complexity of
network. Likewise, deleted names are not immediately removed from the
browse
list. For more information, see Microsoft KB articles 150800 and 102878.

An argument of /? or -? displays this syntax and always returns 1.
A successful completion will return 0.
 
M

Mark V

Marty List wrote in
I posted a new freeware tool on my website, called 'Network Alias'
or NetAlias.exe.

http://www.optimumx.com/download/#NetAlias

C:\>NetAlias.exe /?

Network Alias [Version 1.00]

Displays, adds or removes NetBIOS names for the Server service.
This allows a
computer to be accessed using an alias, or a name other than the
computer name.
The Server service will also announce this alias to the browse
list where it will be displayed in apps such as My Network Places
and the NET VIEW command.

After a system restart, this alias will no longer exist. To make
the alias persistent, this tool would need to be scheduled to
execute at system startup.
This alias will only be available as a UNC path (\\server\share),
tools like ping and nslookup will not be able to resolve it.


The syntax of this command is:

NetAlias.exe [/ALIAS:NEWNAME] [/DOMAIN:NAME] [/DELETE] [/Y]
[\\COMPUTERNAME]

/ALIAS: Allows you to specify a new name to add (or delete). A
new alias
can
be up to 15 characters. Names with spaces must be enclosed in
"double
quotes".

/DOMAIN: Optional, rarely needed. Allows you to specify the
domain/workgroup
that the new alias will be announced to. Ignored if /ALIAS is not
specified.

/DELETE Allows you to delete the specified alias.

/Y Allows you make changes without being prompted.

\\COMPUTERNAME Allows you to manage the names on a remote system.


A Windows NT based operating system is required (2003/XP/2000/NT),
and the user must be a member of the Administrators or Server
Operators group. The maximum number of names that can be added
will vary between 128 and 1024, depending on the length of the
names. The new alias should be available on the local subnet
immediately, but may not be available on remote subnets or appear
in browse lists for up to 30 minutes, depending on the complexity
of network. Likewise, deleted names are not immediately removed
from the browse
list. For more information, see Microsoft KB articles 150800 and
102878.

An argument of /? or -? displays this syntax and always returns 1.
A successful completion will return 0.

Thanks Marty for another great free tool.
I did not check the KB articles listed but persistent "aliases" may
be stored at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver
\parameters\
OptionalNames=
(REG_SZ)
for those that need it. (W2K. Likely W2K and up. Not certain on
NT4)
 
M

Marty List

Mark V said:
Thanks Marty for another great free tool.
I did not check the KB articles listed but persistent "aliases" may
be stored at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver
\parameters\
OptionalNames=
(REG_SZ)
for those that need it. (W2K. Likely W2K and up. Not certain on
NT4)

Good point Mark, although using REGEDT32.EXE to add a REG_MULTI_SZ is better
so you can add multiple names. I thought about adding something about this
to the tool's "/?" syntax, but I couldn't find anything official to
reference, like a KB article that describes it.

I think the registry value and my tool are doing the same thing just a
little differently, but each has it's advantage. The registry value has the
advantage of being persistent, although you can schedule my tool with the
Task Scheduler to run at system startup. My tool allows you to add & remove
names dynamically without restarting the machine or the server service.
Another "accidental" advantage of my tool is it allows you to see the actual
MAC addresses that are bound to the Server service (a.k.a. 'File and Printer
Sharing for Microsoft Networks'), both locally and remotely.
 
M

Mark V

Marty List wrote in
Good point Mark, although using REGEDT32.EXE to add a REG_MULTI_SZ
is better so you can add multiple names. I thought about adding

Hmm. I've never added more than one but assumed (stupid) it was a
comma-separated list.

Just checked a "source" (JSIINC) and Jerold states multi-string for
more than one as you do. Learned something new!
something about this to the tool's "/?" syntax, but I couldn't
find anything official to reference, like a KB article that
describes it.

I've never seen it in any MS articles either. Although it seems
well-referenced outside official MS channels. It might be nice for
NetAlias to have a "make persistent" switch, but if you don't it is
still most useful as is. Perhaps just a README notation and
disclaimer would be of benefit?
I think the registry value and my tool are doing the same thing
just a little differently, but each has it's advantage. The
registry value has the advantage of being persistent, although you
can schedule my tool with the Task Scheduler to run at system
startup. My tool allows you to add & remove names dynamically
without restarting the machine or the server service. Another

And that (no reboot required) is a very valuable point in my opinion!
"accidental" advantage of my tool is it allows you to see the
actual MAC addresses that are bound to the Server service (a.k.a.
'File and Printer Sharing for Microsoft Networks'), both locally
and remotely.

Yup. I like that functionality too. It's a "keeper" in any case.

PS I have had no opportunity to test failure modes when "System
Requirements" were not met. (W2K Pro, SP4 stand-alone)
 
M

Marty List

Mark V said:
It might be nice for NetAlias to have a "make persistent" switch

That's a great idea, I never thought of doing a combination API
call/Registry edit to make it persistent. I'll wait a while to see if any
other feature requests or bugs get reported, and then add your idea to the
next version.
 
J

Joe Richards [MVP]

Hey Marty.

When I read your original post the first thing I thought of myself was to have a /p option to slam it into the
registery.

One thing you will find though, at least the last time I was playing with it is that DC's will register the name in the
registry entry and then will clear it shortly after again during the reboot. It is sort of like server starts up and
registers and then when netlogon starts it changes what is registered.

And REG_MULTI_SZ is definitely the way to go with it.

Good job.

joe
 
M

Mike

Thank's for your tool.
What surprises me is that yout tools works - the same entry to
registry (OptionalNames) + reboot does not work. The computer is a
2000 dc.

It would be nice to get the additional name persistent - but if the
registry setting does not work - what could be the way?

Thanks in advance

Mike
 
S

Shuffled

That's a great idea, I never thought of doing a combination API
call/Registry edit to make it persistent. I'll wait a while to see if any
other feature requests or bugs get reported, and then add your idea to the
next version.

It'll be nice use NetAlias to add/remove a name of a remote computer
on the network.
 
J

Joe Richards [MVP]

Yep that is what I was mentioning in my post to Marty.

The reg entry does actually work for a bit, then I believe NETLOGON clears the table and repopulates it with what it
wants. If you do the add AFTER the NETLOGON process is done dorking with it, it will get in and stay in.

--
Joe Richards
www.joeware.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top