|
|
|
Forum 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!
|
|
|
|
|
Forum 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...
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Yesterday @ 2:45:57 AM
Posts: 825,
Visits: 1,333
|
|
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
|
|
|
|
|
Forum 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.
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Yesterday @ 2:45:57 AM
Posts: 825,
Visits: 1,333
|
|
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
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 8/19/2008 5:04:27 AM
Posts: 3,
Visits: 7
|
|
That works brilliantly now 
Cheers
|
|
|
|