Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - VBscript, VirtualPC and WMI

Reply
 
Old 09-17-2008   #1 (permalink)
Mario - Roma


 
 

VBscript, VirtualPC and WMI

Given a VM running as a guest in VirtualPC, is there any way to get
information about the PC hosting VirtualPC?
In other words, can I run a VBscript in the guest PC and get information
(via WMI?) about the host, i.e. the hostname, the IP address, the serial
number and so on?
Regards
Mario




My System SpecsSystem Spec
Old 09-17-2008   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: VBscript, VirtualPC and WMI

Mario wrote:
Quote:

> Given a VM running as a guest in VirtualPC, is there any way to get
> information about the PC hosting VirtualPC?
> In other words, can I run a VBscript in the guest PC and get information
> (via WMI?) about the host, i.e. the hostname, the IP address, the serial
> number and so on?
Yes, it's like any other PC you can ping. Just use the NetBIOS name of the
host PC when binding with WMI.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Old 09-17-2008   #3 (permalink)
Mario - Roma


 
 

Re: VBscript, VirtualPC and WMI

Thank you for your message.

I suspect I misposed my question: I need to get information from the guest
about the host.

Up to now the only information I was able to get is the hostname of the
host, while inspecting the:

HKLM\Software\Microsoft\Virtual Machine\Guest\Parameters\PhysicalHostName

registry key.

Is there any way to get more detailed information, i.e. the BIOS serial
mumber, the MAC address, and so on?

A possible solution could be running a script from the guest to be executed
to the host and passing back the results to the guest.

I made some tests using the COM port, with no success...

Regards

Marius



"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> ha scritto
nel messaggio news:eUSSUiMGJHA.5944@xxxxxx
Quote:

> Mario wrote:
>
Quote:

>> Given a VM running as a guest in VirtualPC, is there any way to get
>> information about the PC hosting VirtualPC?
>> In other words, can I run a VBscript in the guest PC and get information
>> (via WMI?) about the host, i.e. the hostname, the IP address, the serial
>> number and so on?
>
> Yes, it's like any other PC you can ping. Just use the NetBIOS name of the
> host PC when binding with WMI.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab - http://www.rlmueller.net
> --
>
>

My System SpecsSystem Spec
Old 09-17-2008   #4 (permalink)
Richard Mueller [MVP]


 
 

Re: VBscript, VirtualPC and WMI

Once you have the NetBIOS name of the host computer, you should be able to
use these examples. First for BIOS information:

http://www.microsoft.com/technet/scr.../hwbavb10.mspx

and this for network adapter information (including MAC address):

http://www.microsoft.com/technet/scr.../nwlsvb05.mspx

Just use the computer name in place of "." (which means the local computer).
If you are a member of the local administrators group on the host computer
you have sufficient privileges.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"Mario - Roma" <mario@xxxxxx> wrote in message
news:e4FW7oMGJHA.5448@xxxxxx
Quote:

> Thank you for your message.
>
> I suspect I misposed my question: I need to get information from the guest
> about the host.
>
> Up to now the only information I was able to get is the hostname of the
> host, while inspecting the:
>
> HKLM\Software\Microsoft\Virtual Machine\Guest\Parameters\PhysicalHostName
>
> registry key.
>
> Is there any way to get more detailed information, i.e. the BIOS serial
> mumber, the MAC address, and so on?
>
> A possible solution could be running a script from the guest to be
> executed to the host and passing back the results to the guest.
>
> I made some tests using the COM port, with no success...
>
> Regards
>
> Marius
>
>
>
> "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> ha scritto
> nel messaggio news:eUSSUiMGJHA.5944@xxxxxx
Quote:

>> Mario wrote:
>>
Quote:

>>> Given a VM running as a guest in VirtualPC, is there any way to get
>>> information about the PC hosting VirtualPC?
>>> In other words, can I run a VBscript in the guest PC and get information
>>> (via WMI?) about the host, i.e. the hostname, the IP address, the serial
>>> number and so on?
>>
>> Yes, it's like any other PC you can ping. Just use the NetBIOS name of
>> the host PC when binding with WMI.
>>
>> --
>> Richard Mueller
>> MVP Directory Services
>> Hilltop Lab - http://www.rlmueller.net
>> --
>>
>>
>
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
virtualpc printing Virtual PC
How to do No hang up VBScript (nohup for VBScript) VB Script
VirtualPC modem Vista General
VirtualPC Security Vista General
VirtualPC In VHP Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46