The VNC Manager - SmartCode Solutions Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



VB Script to show Serial Number or Service... Expand / Collapse
Author
Message
Posted 5/21/2008 7:18:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/21/2008 8:22:47 AM
Posts: 1, Visits: 2
Hey guys,  I have just started using VNC Manager and I have to say it is very impressive!  well worth the cost! 

anyway,

here is a VB Script that you can remote execute to get the Manufacturer of the machine as well as the serial number.   I have tested this with HP and the serial number displays just as it should... I tested it on a dell machine and was plesently suprised to see that it flawlessly displays the service tag so every dell I tried it on.  very handy to have that information remotely at a click of a mouse.

here is the code:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_BIOS")
For each objBIOS in colBIOS
    WScript.StdOut.WriteLine "Manufacturer: " & objBIOS.Manufacturer
    WScript.StdOut.WriteLine "Serial Number: " & objBIOS.SerialNumber
Next

I got this script from HP's website and edited it so the output would work with VNC Manager.

the original script is located here:

http://h41111.www4.hp.com/hps/carepack/emea_middle_east/en/getserial.html

have to give credit where credit is due!

Post #2075
Posted 8/18/2008 8:43:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/19/2008 5:04:27 AM
Posts: 3, Visits: 7
How do we link this .vbs script up to work in VNC manager?

The limited help files only go as far as explaining how to add a .exe file...
Post #2162
Posted 8/18/2008 10:14:25 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Yesterday @ 3:30:09 AM
Posts: 1,162, Visits: 1,908
In case if you want to create an external tool launching a VBscript you should enter the following values into the properties dialog:

Command: cscript.exe
Arguments: [Path to your .vbs file] , you can also enter optional arguments like ($SERVER_IP)

Most probably you would have to have "Keep console window" checkbox checked.





Kindest Regards,
SmartCode Solutions Support
Post #2165
Posted 8/19/2008 1:01:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/19/2008 5:04:27 AM
Posts: 3, Visits: 7
I have followed your guide above. The problem is though this only returns the localhost service tag and not the remote host.

I would prefer it to return the remote computers service tag.
Post #2168
Posted 8/19/2008 2:21:45 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Yesterday @ 3:30:09 AM
Posts: 1,162, Visits: 1,908
That's because the script posted by jeffs24 has strComputer variable assigned to localhost (".")

You should replace the first line with:
strComputer = WScript.Arguments.Item(0)




Kindest Regards,
SmartCode Solutions Support
Post #2169
Posted 8/19/2008 5:04:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/19/2008 5:04:27 AM
Posts: 3, Visits: 7
That works brilliantly now

Cheers
Post #2170
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Support (s-code), Alex (s-code)

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 8:49am

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.531. 6 queries. Compression Disabled.