Hi , I am using the following javascript:
function doPrint(){
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var exe = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
exe.initWithPath("C:\\temp\\print.bat");
exe.launch();
}
print.bat has the following command :
lpr -S 192.168.19.211 -P print -o l C:\\Temp\\temp.txt
the code runs fine , but it requires print.bat to be present.
How can I shift the command written in print.bat into my doPrint function?