Connecting Tech Pros Worldwide Help | Site Map

I have Vbscript code.but i want vbscript to vb.net code

Newbie
 
Join Date: Oct 2009
Posts: 2
#1: 3 Weeks Ago
Expand|Select|Wrap|Line Numbers
  1. strMsg = "This script will test the HardwareInfo object by reporting the values for the hardware info properties."
  2. strMsg = strMsg & " Please check the bios and computer properties to verify the tests. This test should be run on a "
  3. strMsg = strMsg & " variety of hardware platforms to verify it's successful operation."
  4. strMsg = strMsg & " Press OK to begin the tests."
  5. idResult = MsgBox (strMsg, VBOkCancel)
  6.  
  7. If idResult = VBCancel Then wscript.quit
  8.  
  9. Set objHardware = CreateObject ("icf.hardwareinfo")
  10. Call showem
  11. Set wargs = wscript.arguments
  12. If wArgs.count > 0 Then
  13. objHardware.computername = wargs (0)
  14. Call showem
  15. Else
  16. wscript.echo "Call script " & wscript.scriptfullname & " with a parameter to test collection from a remote machine."
  17. End If
  18. Set objHardware = nothing
  19.  
  20. Sub ShowEm ()
  21. 'On Error Resume Next
  22. strMsg = ""
  23. strMsg = strMsg & vbcrlf & "===== Computer = " &        objHardware.computername & " ====="
  24. strMsg = strMsg & vbcrlf & "Hardware Model = " & objHardware.Model
  25. strMsg = strMsg & vbcrlf & "Serial Number = " & objHardware.SerialNumber
  26. strMsg = strMsg & vbcrlf & "Type = " & objHardware.Type
  27. strMsg = strMsg & vbcrlf & "Asset Tag = " & objHardware.assetTag
  28. strMsg = strMsg & vbcrlf & "Manufacturer = " & objHardware.Manufacturer
  29. strMsg = strMsg & vbcrlf & "SuiteMask = " & objHardware.SuiteMask 
  30. strMsg = strMsg & vbcrlf & "OSCSD = " & objHardware.OSCSD 
  31. strMsg = strMsg & vbcrlf & "OSMajor = " & objHardware.OSMajor 
  32. strMsg = strMsg & vbcrlf & "OSMinor = " & objHardware.OSMinor 
  33. strMsg = strMsg & vbcrlf & "OSBuild = " & objHardware.OSBuild 
  34. strMsg = strMsg & vbcrlf & "OsEx = " & objHardware.OsEx 
  35. strMsg = strMsg & vbcrlf & "OSBootTime = " & objHardware.OSBootTime 
  36. strMsg = strMsg & vbcrlf & "OSInstallTime = " & objHardware.OSInstallTime 
  37. strMsg = strMsg & vbcrlf & "OSID = " & objHardware.OSID 
  38. strMsg = strMsg & vbcrlf & "OSStr = " & objHardware.OSStr 
  39. strMsg = strMsg & vbcrlf & "OSStrProductType = " & objHardware.OSStrProductType
  40. strMsg = strMsg & vbcrlf & "OSCurrentTimeZoneOffset = " & objHardware.OSCurrentTimeZoneOffset
  41. strMsg = strMsg & vbcrlf & "OSTimeZone = " & objHardware.OSTimeZone
  42. strMsg = strMsg & vbcrlf & "IPAddress = " & objHardware.IPAddress
  43.  
  44. For each aDrive in objHardware.drives 
  45. strMsg = strMsg & vbcrlf & "Drive " & adrive.letter & " size " & adrive.size & " mb Freespace " & adrive.freespace & " mb"
  46.  
  47. Next
  48.  
  49. wscript.echo strMSg
  50. End Sub
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#2: 3 Weeks Ago

re: I have Vbscript code.but i want vbscript to vb.net code


TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#3: 3 Weeks Ago

re: I have Vbscript code.but i want vbscript to vb.net code


I can see no questions nor any attempt on your part to convert this.

Should the volunteers here then assume you are putting this out for bids? Are you looking to hire someone to do this for you?
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#4: 3 Weeks Ago

re: I have Vbscript code.but i want vbscript to vb.net code


vb.net and vbScript are fairly similar.
Shouldn't be hard for you to convert.
Reply