Closed
Bug 454086
Opened 17 years ago
Closed 15 years ago
process.run with a .bat file doesn't show DOS window and blocks
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: herve.rousseau, Unassigned)
Details
(Keywords: regression, Whiteboard: [CLOSEME 2010-11-01])
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050921 Firefox/1.0.7 Mandriva/1.0.6-15mdk (2006.0)
Build Identifier:
function executeFile() (presented in the html code below) works well with
Firefox 2.
With Firefox 3, .bat files are executed but :
- DOS Window doesn't appear
- Firefox waits for DOS response
DOS response is never given.
Firefox is blocked.
If I try to open calc.exe instead of cmd.exe, the window appears.
How can i do to work with DOS under Firefox 3 ?
Thank you in advance for your help.
<html>
<head>
<title>Execute A Process</title>
<script type="application/javascript;">
function executeFile() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file =
Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("C:\\WINDOWS\\system32\\cmd.exe");
var process =
Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
args = new Array()
args[0]="/C D:/instance.bat C "
process.init(file);
process.run(true,args, args.length);
}
</script>
</head>
<body>
<input type="button" value="Run a process" onclick="executeFile()"/>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Updated•17 years ago
|
Keywords: regression
Summary: run a dos process → process.run with a .bat file doesn't show DOS window and blocks
I can reproduce this bug.
It appears that only the first DOS window is hidden. So, using a "bat launcher script", it is possible to bypass this bug until the fix is released.
Here is an exemple of such a "launcher" :
launch.bat :
start /WAIT %1
And change the executeFile() function like this :
file.initWithPath("C:\\launch.exe"); //(assuming that launch.exe is at c:\...)
[...]
args[0]="C:\\instance.bat" //(assuming that instance.bat is the script you aim to execute)
The result is that the first shell (the "launcher") is hidden, but the 'start' instruction in it forces the second window to appears.
Comment 2•15 years ago
|
||
This is a mass search for bugs which are in the Firefox General component, are
UNCO, have not been changed for 500 days and have an unspecified version.
Reporter, can you please update to Firefox 3.6.10 or later, create a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles, and test again. If you still see the issue, please update this bug. If the issue is gone, please set the status to RESOLVED > WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
Comment 3•15 years ago
|
||
No reply from reporter, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
Bug still exists but in a different way (tested under FF 3.6.10):
- DOS window appears (good point)
- but, when scripts ends, Firefox isn't blocked anymore but it launches the script again... and again... and again... like a loop, but there's no loop in the JS code.
With calc.exe, there is no problem.
You need to log in
before you can comment on or make changes to this bug.
Description
•