Help with Jscript

I need help with Jscript, specifically with ActiveXObject .
An example will show better what I wanna do.
Run dopusrt.exe /cmd Clipboard Set "a value of a variable".

@script jscript

function Rename::GetNewName2 ( strFileName, strFilePath, _fIsFolder, strOldName, strNewName ){
   var words="Directory OPus";
   var Shell = new ActiveXObject("WScript.Shell");
   Shell.run('dopusrt.exe /cmd Clipboard Set ' + words);

   strNewName = "";
}

Also I tried with:

   Shell.run('C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe /cmd Clipboard Set ' + words);

Obviously this doesn't work, so any help?. Specifically in the Shell.run part...

Same code works ok here... though technically, with jscript being case sensitive - I think you might need/want to make Shell.run proper cased... to Shell.Run.

Besides that - I expect that your initial inclination is correct, and that you'll need to specify the full path to the dopusrt.exe as you tried to do in your modified Shell.Run command... But you'll probably have to escape the backslashes, and add escaped double quotes for the path to the EXE like so:

Shell.Run('\"C:\\Program Files\\GPSoftware\\Directory Opus\\dopusrt.exe\" /cmd Clipboard Set ' + words);

Woopsy... erroneously quoted my own reply during edit. Sorry...

[quote="steje"]

Shell.Run('\"C:\\Program Files\\GPSoftware\\Directory Opus\\dopusrt.exe\" /cmd Clipboard Set ' + words);

Yeep. That works. Thanks.