G
Guest
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) ;
}
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) ;
}