PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.

WMI JScript doesn't work.

 
 
=?Utf-8?B?Q3VyaW91c01l?=
Guest
Posts: n/a
 
      21st Dec 2005
when i run below JScript codes, nothing works. I mean there is no error
message or result or anything.

what can i do to fix this code.? thanks

//=============
/*
'************************************************
' Description: Detecting Delete.vbs from Windows Run Registry
'
' Author: Andy
'
'last update: 11/28/05
'************************************************
*/

var HKEY_LOCAL_MACHINE = 0x80000002;

var strComputer = ".";
var oReg=GetObject("winmgmts:\\\\" + strComputer +
"\\root\\default:StdRegProv");

var sPath2 = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
var sName= new Array();
var iType = new Array();
var sValue;

oReg.EnumValues(HKEY_LOCAL_MACHINE, sPath2, sName, iType);

var ok=new Enumerator(sName);
for(;!ok.atEnd();ok.moveNext())
{
var s=ok.item();
oReg.GetStringValue(HKEY_LOCAL_MACHINE,sPath2,s,sValue);
WScript.echo("========================");
WScript.echo( s +" : "+ sValue) ;
}

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q3VyaW91c01l?=
Guest
Posts: n/a
 
      29th Dec 2005
i can't believe that I answer my own question here without anybody's help.

i will post a solution to this problem later on
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is Server-Side Jscript (not Jscript.NET)? Maxwell2006 Microsoft ASP .NET 5 7th Mar 2006 06:28 AM
"Win32_Processor: WMI: Access denied" and "Win32_OperatingSystem: WMI: Access denied" Mark Jennings Windows XP WMI 3 29th Dec 2004 05:18 PM
Porting from JScript to JScript.Net - compiler error Jon Maz Microsoft ASP .NET 4 9th Sep 2004 11:24 AM
Re: WMI Error : Unable to connect to wmi service "root\cimv2" wil_riker01 Windows XP Networking 0 11th Feb 2004 10:55 PM
C++ Wmi App to C# Wmi App - System.Mgmt Access Jerry Microsoft C# .NET 1 9th Jul 2003 09:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:57 AM.