Hallo Zusammen,
kann es sein, dass der NAS-Dienst nicht in der Lage ist einen SHELL-Befehl in Navision auszufĂĽhren?
OnRun=BEGIN
// The following is not trusted and will give a warning.
ExecName := 'C:\windows\notepad.exe';
param := 'C:\MyFile.txt';
ret := SHELL(ExecName, param);
// The following is trusted and will not give a warning.
param := 'C:\MyFile.txt';
ret := SHELL(TEXT000, param);
// The following is not possible - will only give an error
// message during runtime. This is also if its a TextConst:
ExecName := 'C:\windows\notepad.exe C:\MyFile.txt';
ret := SHELL(ExecName);
END;
txtDateiName := 'C:\Batchverzeichnis\Fehler.txt';
filDatei.TEXTMODE := TRUE;
filDatei.WRITEMODE := TRUE;
filDatei.QUERYREPLACE := FALSE;
filDatei.CREATE(txtDateiName);
filDatei.WRITE('Betreff: ' + ' blabla');
filDatei.CLOSE;
intret := SHELL(txtBatchbefehl, txtDateiName);
CODE
{
VAR
intret@1000 : Integer;
txtDateiName@1001 : Text[100];
txtBatchbefehl@1002 : TextConst 'ENU=c:\Batchverzeichnis\batch.bat'; // KONSTANTE // mit .cmd habe ich es auch schon ausprobiert; im Einsatz ein Win2003 Server
}
Der User hat SUPER-Rechte, sowohl in NAV als auch auf dem NAV-Server, auf dem der NAS-Dienst läuft.
ZurĂĽck zu Navision Application Server
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast