Jump to content

vbs convert au3 (help)


Recommended Posts

Hello, I am new members. Help me please. I want vbs convert to au3 .

This vbs code : 

'deneme
Set SystemSet = GetObject("winmgmts:").InstancesOf ("Win32_OperatingSystem") 
strOSArch = GetObject("winmgmts:root\cimv2:Win32_OperatingSystem=@").OSArchitecture
Set objNetwork = CreateObject("Wscript.Network")
Set wshShell = CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
Set oShell = WScript.CreateObject("WScript.Shell")
proc_arch = oShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%")
Set oEnv = oShell.Environment("SYSTEM")

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colMB = objWMIService.ExecQuery("Select * from Win32_BaseBoard") 
Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") 
Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor") 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItemsx = objWMIService.ExecQuery( _
    "SELECT * FROM Win32_VideoController",,48)
'-------------------------------------------------------------------

Set obj = GetObject("winmgmts:").InstancesOf("Win32_PhysicalMemory") 
i = 1
For Each obj2 In obj 
memTmp1 = obj2.capacity / 1024 / 1024
TotalRam = TotalRam + memTmp1 
i = i +1
Next
'--------------------------------------------------------------------
Dim objWMIService   : Set objWMIService  = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select Architecture from Win32_Processor")
For Each objItem in colItems
    if objItem.Architecture = 0 then 
       strArchitecture = "x86"
    end if
    if objItem.Architecture = 9 then 
       strArchitecture = "x64"
    end if
next
'--------------------------------------------------------------------
strComputer = "." ' Local computer
strMemory = ""
i = 1
      
set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory")

For Each objItem In colItems

	if strMemory <> "" then strMemory = strMemory & vbcrlf
	strMemory = strMemory &  "Bank" & i & " : " & (objItem.Capacity /1024 /1024) & " Mb"
	i = i + 1
Next
installedModules = i - 1

Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray")

For Each objItem in colItems
	totalSlots = objItem.MemoryDevices
Next
'----------------------------------------------------------------------
Set objWMISvc = GetObject( "winmgmts:\\.\root\cimv2" )
Set colItems = objWMISvc.ExecQuery( "Select * from Win32_ComputerSystem" )
For Each objItem in colItems
    strComputerDomain = objItem.Domain
Next
for each System in SystemSet
For Each objItem in colItemsx
For Each objProcessor in colProcessors
For Each bbType In colMB   
MbVendor = bbType.Manufacturer
MbModel = bbType.Product
MsgBox "İşletim Sistemi : " & System.Caption & vbNewLine & _
"İşletim Sistemi Versionu :  " & + System.Version & vbNewLine & _
"Windows Mimari Yapısı: " & strOSArch & vbNewLine & _
"Kullanıcı isminiz:  " & objNetwork.UserName & vbNewLine & _
"Bilgisayar ismi: " & strComputerName & vbNewLine & _
"Çalışma Grubu: " & strComputerDomain & vbNewLine & _
"--------------------------------------" & vbNewLine & _
"Anakart: " & MbVendor & " " & "[" & MbModel & "]" & vbNewLine & _
"--------------------------------------" & vbNewLine & _
"Grafik Kartı: " & objItem.Caption & vbNewLine & _
"Driver Version: " & objItem.DriverVersion & vbNewLine & _
"--------------------------------------" & vbNewLine & _
"İşlemci Üreticisi: " & objProcessor.Manufacturer & vbNewLine & _
"İşlemci İsmi: " & objProcessor.Name & vbNewLine & _
"CPU Mimarisi: " & strArchitecture & vbNewLine & _
"İşlemci Çekirdek sayısı: " & oEnv("NUMBER_OF_PROCESSORS") & vbNewLine & _
"--------------------------------------" & vbNewLine & _
"Toplam RAM: " & TotalRam & " MB" & vbNewLine & _
"Toplam Slot: " & totalSlots & vbNewLine & _
"Boş Slot: " & (totalSlots - installedModules) & vbNewLine & _
"Ramlerin bulunduğu slotlar:" & vbcrlf & strMemory,0,"deneme"
Next
Next
Next
Next

please help me , thanks.

Link to comment
Share on other sites

  • Developers
13 minutes ago, ufukreis1212 said:

Help me please. I want vbs convert to au3

Ok, so what do you have that isn't working or are you supposed to do it for you?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

@ufukreis1212

I think you should read better Forum Etiquette, especially the 1st, 2nd, 3rd, 4th ones, and the note:

Usually asking for a script is not taken too well, within reason. Keep in mind that this is a support forum, so please acknowledge that. We are here to help you with your scripts, not to spoon-feed code to you.

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

  • 4 years later...

Sometimes we don't understand people, for example he stole the codes (v1.0) that we are still developing and tried to get you to convert them to Autoit. HUH, what can we say?
The code is now improved (v1.3), but there are still some bugs. 

<snip>

Edited by Melba23
Removed payware links added later
Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...