Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run ("mmc.exe")
This is VBScript code, so you can save it with .vbs extension and then run it.
-- urkec
"mirokuu" wrote:
[Quoted Text] > I am trying to learn to do windows scripting correctly. > > Win I run the following code on the xp machine i get this error: > Script: C:\test.js > line: 1 > Char: 5 > Error: Expected ';' > Code: 800A03EC > Source: Microsoft Jscript Compolation Error > > > The code is the following: > Set WshShell = WScript.CreateObject("WScript.Shell") > WshShell.Run ("mmc.exe") > > > i have wsh 5.6 installed on this xp machine. I tried putting ; at the end of > each statement but its not working. i can get WScript.Echo "test"; to work > fine is there a reason why i am getting this error if so how do i go about > getting this to work. I am just trying to get this script to open up the mmc > console.
|