Can I create and manage NetBIOS shares on an XP PC using WMI?
If not, is there any procedure to create and manage file shares using
generic VBScript?

For the curious:
I need to replicate my office network structure on a development
laptop in my home, in order to test an application that makes generous
use network resources via UNC-style paths. I have already written a
WMI vbscript that uses the lanmanserver 'OptionalNames' registry key
to define Netbios aliases matching the server names at the office; I
now need to share local folders, giving them the share names that
match those on the office servers. The end result being C:\work-from-
home\db is AKA \\Workserver1\database_share, and C:\work-from-home
\files is AKA \Workserver22\file_share; the app thinks it's in the
office, without having to be reconfigured in any way.
I need to _script_ this process because a) the work is constantly
changing, and b) if I have \\Workserver as an OptionalName for my
laptop, and I bring that laptop into the office for any reason, and \
\Workserver happens to be rebooted, there will be a name conflict
(it's actually happened).

Thanks!

Re: Netbios file shares via WMI? by Mark

Mark
Mon Jan 28 02:05:27 CST 2008

Create a share
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_grpq.mspx?mfr=true

Delete a share
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_zzcu.mspx?mfr=true
Regards
Mark Dormer




"robert.waters" <robert.waters@gmail.com> wrote in message
news:e5ebc0f6-9a16-464e-8551-fe538462be70@s8g2000prg.googlegroups.com...
> Can I create and manage NetBIOS shares on an XP PC using WMI?
> If not, is there any procedure to create and manage file shares using
> generic VBScript?
>
> For the curious:
> I need to replicate my office network structure on a development
> laptop in my home, in order to test an application that makes generous
> use network resources via UNC-style paths. I have already written a
> WMI vbscript that uses the lanmanserver 'OptionalNames' registry key
> to define Netbios aliases matching the server names at the office; I
> now need to share local folders, giving them the share names that
> match those on the office servers. The end result being C:\work-from-
> home\db is AKA \\Workserver1\database_share, and C:\work-from-home
> \files is AKA \Workserver22\file_share; the app thinks it's in the
> office, without having to be reconfigured in any way.
> I need to _script_ this process because a) the work is constantly
> changing, and b) if I have \\Workserver as an OptionalName for my
> laptop, and I bring that laptop into the office for any reason, and \
> \Workserver happens to be rebooted, there will be a name conflict
> (it's actually happened).
>
> Thanks!
>