این کد قطعه کدی هست است برای بن دست اوردن ۴ جز از اطلاعات سیستم عامل هست
set wshShell = WScript.CreateObject( "WScript.Shell" )
' retrieve system variables
computeame = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
os = wshShell.ExpandEnvironmentStrings("%OS%")
useame = 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 : " & computeame
wscript.echo "Operating System: " & os
wscript.echo "OS Version : " & os_version
wscript.echo "User Name : " & useame
برچسب:
نویسنده: محمد رضا جوادیان