473,396 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
Oct 30 '09 #1
3 1661
tlhintoq
3,525 Expert 2GB
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.
Oct 30 '09 #2
tlhintoq
3,525 Expert 2GB
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?
Oct 30 '09 #3
Plater
7,872 Expert 4TB
vb.net and vbScript are fairly similar.
Shouldn't be hard for you to convert.
Oct 30 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Sean | last post by:
Hi, I need a pop-up window for user to confirm change. The default button is the second option (No). As the user only use IE, I think the VBScript is an option. The following code only works for...
29
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
20
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
16
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other...
3
by: Asif Rahman | last post by:
Hi all! Please improve on the following code to make sure the record gets deleted only when the function returns false. Now I see the msgbox, but the record gets deleted no matter the user...
4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
2
by: duncan | last post by:
why does this work :- <HEAD> ...... <SCRIPT LANGUAGE="javascript"> function test() { alert("test 1") } </SCRIPT>
1
by: blaneyj | last post by:
HELP! What I've got going here is: a)Access database (mdb) b)VBScript from ArcGIS (modelbuilder) that processes said Access database to custom Personal GeoDatabase (PGD) I want that Access...
4
by: client site dll in vbscript | last post by:
Hi i have one dll on client site,i want to use it in aspx page, on clinet site Is it possible or not .Please tell me the solution Please email me at indipren@hotmail.com Regarda Indi
2
by: mdock | last post by:
Hello, I have a javascript grid on my ASP page which displays information about the history of specific units produced in our manufacturing facility. One of the results is the order number on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.