Search code examples
jscriptwindows-desktop-gadgets

Is this running malicious software from a System.Shell.execute?


I have downloaded a Window Gadget and found this function from the javascript. What this function does? Is it malicious?

Before I run the Widget, I commented out first the function call and it seems this function is not necessary to run the widget.

function LaunchPowerApplet()
{
    System.Shell.execute(System.Environment.getEnvironmentVariable("SystemRoot") + "\\system32\\mblctr.exe");
}

Solution

  • Whether it's necessary or not is hard to say without knowing what the gadget needs to accomplish. The function is called LaunchPowerApplet and Windows Mobility Center allows to configure the battery usage settings. It makes sense if the gadget is a battery level meter, it doesn't if it's a solitaire.


    BTW, a gadget is «a collection of XML, HTML, Microsoft JScript, and Cascading Style Sheets (CSS) files» so it's technically not JavaScript but JScript (Microsoft's ECMAScript implementation)