I have a problem, the AD driver launch this ecmascript with jscript and
pshell command but i want to lunch as domain admin for execute the
powershell e AD commands.

I have some problem if i want to run the script with the command RUNAS
(similar) because i want to launch it with Domain Administrator User.
That give me the error code 5.
I think is the syntax,can you help me?

importPackage(Packages.java.lang);
function runSSH(pshell){
var error_code, script;
//THAT'S OK
//script = "C:\\WINDOWS\\System32\\Cscript
C:\\Novell\\PowerShellScript\\pshell.js " + pshell;
//THAT DOESN'T GO
script='"C:\\WINDOWS\\System32\\CPAU.exe" -lwp -u DOMAIN\\administrator
-p password -ex "C:\\WINDOWS\\System32\\Cscript.exe
C:\\Novell\\PowerShellScript\\pshell.js"'+pshell;
try{
myProcess = new java.lang.Runtime.getRuntime().exec(script);
error_code = myProcess.waitFor();
}
catch(e){
error_code = e;
}
switch(error_code){
case 0:
error_code = 'The shell script executed OK';break;
case 1:
error_code = 'The shell script failed';break;
default:
}
return error_code;
}

THANK SO MUCH


--
lucacurcio
------------------------------------------------------------------------
lucacurcio's Profile: http://forums.novell.com/member.php?userid=108591
View this thread: http://forums.novell.com/showthread.php?t=444763