Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
481 B

//
// Create the shell object
//
var shell = new ActiveXObject( "WScript.Shell" );
//
// Check the command arguments
//
if( WScript.Arguments.Length < 1 || WScript.Arguments( 0 ) == "/h")
{
WScript.Echo( "regwrite.js <KEYNAME> <KEYVALUE> <KEYTYPE>" );
WScript.Quit();
}
try
{
//
// Write to the registry.
//
shell.RegWrite( WScript.Arguments( 0 ),WScript.Arguments( 1 ),WScript.Arguments( 2 ) );
}
catch( e )
{
WScript.Echo( e.toString() );
}