hi Im writing a small app to my workplace and its using the WMI.I need it to run the notepad or any other app in hidden mode, so I found this script on the net but its in VBS. can anyone help me to convert it to javascript? here is the code:
Const SW_SHOW = 12Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")Set objSWbemServices = objSwbemLocator.ConnectServer(".","root\cimv2")Set oStartup = objSWbemServices.Get("Win32_ProcessStartup")Set oConfig = oStartup.SpawnInstance_oConfig.ShowWindow = SW_SHOWSet objCreateProc = objSWbemServices.Get("Win32_Process")int errReturn = objCreateProc.Create("notepad.exe",Null,oConfig,intProcID)
thank u all for ur help