www.pc3enter.tk
جمعه 20 فروردین 1395, 15:04 عصر
این کد قطعه کدی هست است برای بن دست اوردن ۴ جز از اطلاعات سیستم عامل هست
set wshShell = WScript.CreateObject( "WScript.Shell" )
' retrieve system variables
computername = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
os = wshShell.ExpandEnvironmentStrings("%OS%")
username = wshShell.ExpandEnvironmentStrings("%USERNAME%")
' execute command and get the output
set get_os_version = wshShell.exec("%comspec% /c ver")
os_version = get_os_version.stdout.readall
os_version = mid(os_version, 3, len(os_version)-3)
wscript.echo "Computer Name : " & computername
wscript.echo "Operating System: " & os
wscript.echo "OS Version : " & os_version
wscript.echo "User Name : " & username
set wshShell = WScript.CreateObject( "WScript.Shell" )
' retrieve system variables
computername = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
os = wshShell.ExpandEnvironmentStrings("%OS%")
username = wshShell.ExpandEnvironmentStrings("%USERNAME%")
' execute command and get the output
set get_os_version = wshShell.exec("%comspec% /c ver")
os_version = get_os_version.stdout.readall
os_version = mid(os_version, 3, len(os_version)-3)
wscript.echo "Computer Name : " & computername
wscript.echo "Operating System: " & os
wscript.echo "OS Version : " & os_version
wscript.echo "User Name : " & username