Have "translated" by myself:
var strComputer = "."
var oReg = GetObject( "winmgmts:{impersonationLevel=impersonate}!\\\\" +
strComputer + "\\root\\default:StdRegProv" );
method = oReg.Methods_.Item( "GetBinaryValue" );
inparams = method.InParameters.SpawnInstance_();
inparams.hDefKey = 0x80000002;
inparams.sSubKeyName = "SYSTEM\\MountedDevices";
inparams.sValueName = "\\??\\Volume{714ce42f-d2a2-11e4-824f-806e6f6e6963}";
outparams = oReg.ExecMethod_( method.Name, inparams );
if ( outparams.ReturnValue == 0 )
{
t3 = VBArray( outparams.uValue ).toArray();
t4 = inparams.sValueName;
for ( var i = 0; i < t3.length; i++ ) t4 += " " + t3[ i ];
WScript.Echo( t4 );
}
WScript.Quit( 0 );
This code outputs the same as VBS code.