I Need to change the ForegroundApplicationBoost and LargeSystemCache
properties of the WMI Win32_OperatingSystem class.
I've worte this script, but it does not work ! Anyone knows why ???
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objNetworkSettings = objWMIService.Get("Win32_OperatingSystem")
objNetworkSettings.ForegroundApplicationBoost(1)
bjNetworkSettings.LargeSystemCache(1)
A similar script (below) to change the TCPMaxDataRetransmissions value works
!!!
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")Set objNetworkSettings =
objWMIService.Get("Win32_NetworkAdapterConfiguration")objNetworkSettings.Set
TCPMaxDataRetransmissions(10)
You are accessing these as if they were methods. Both are documented as
*properties*. Note that LargeSystemCache is XP or higher.
>
> A similar script (below) to change the TCPMaxDataRetransmissions
> value works !!!
>
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:\\" & strComputer &
> "\root\cimv2")Set objNetworkSettings =
>
objWMIService.Get("Win32_NetworkAdapterConfiguration")objNetworkSettings.Set
> TCPMaxDataRetransmissions(10)
--
Michael Harris
Microsoft.MVP.Scripting
Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp
TechNet Script Center Sample Scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942
WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en
Take a look:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select ForegroundApplicationBoost
from Win32_OperatingSystem",,48)
For Each objItem in colItems
objItem.ForegroundApplicationBoost = 0
Next
"Michael Harris (MVP)" <mik...@mvps.org> escreveu na mensagem
news:uvqCddSs...@TK2MSFTNGP10.phx.gbl...
<http://msdn.microsoft.com/library/en-us/wmisdk/wmi/swbemobject.asp>
<http://msdn.microsoft.com/library/en-us/wmisdk/wmi/swbemobject_put_.asp>
- Pat
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select LargeSystemCache from
Win32_OperatingSystem",,48)
For Each objItem in colItems
objItem.LargeSystemCache = 0
objItem.put_()
Next
Anyone can help ?
"Patrick J. LoPresti" <pa...@users.sourceforge.net> wrote in message
news:s5gu14wf2rr.fsf@patl=users.sf.net...
This will work (I just tried it):
Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
But it is inferior to:
Set colItems = objWMIService.InstancesOf("Win32_OperatingSystem")
Good luck!
"Patrick J. LoPresti" <pa...@users.sourceforge.net> wrote in message
news:s5gislb86ih.fsf@patl=users.sf.net...