OutputFile.TEXTMODE(TRUE); OutputFile.CREATE(FilePath + 'templabel.txt') FOR i := 1 TO 100 DO BEGIN OutputFile.WRITE(PrintString[i]); END; OutputFile.CLOSE; Command := 'C:\Windows\System32\cmd.exe /c type ' + FilePath + 'templabel.txt > "' + PrinterPath + '"'; ShellInt := 1; RunModally := FALSE ; CREATE(WSHShell,FALSE,ISSERVICETIER); WSHShell.Run(Command,ShellInt,RunModally); CLEAR(WSHShell); ERASE(FilePath + 'templabel.txt');
Comments
Did you check that?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled
The create does not fail, the text file is created and written to.
I can run it manually from the Command Prompot and through the NAV Report.
WSHShell is declared as 'Windows Script Host Object Model'.WshShell.
It works when I run it using the NAV Client on the Windows Server.