Webutil_host closing command prompt
I am using this command in my form:
webutil_host.nonblocking('cmd /c "' || v_file_name || '" && exit');
I want to be able to open the WORD/PDF/EXCEL, etc.
file and close the Command Prompt as well.
Currently, the document will display properly but the
command prompt window will stay there until the user
exits the document. I want the command prompt window
to disappear (or hide) as soon as the document opens.
Is this possible?
You could try
webutil_host.nonblocking('cmd /c start "' || v_file_name || '" "' || v_file_name || '"' );
It will not work if client uses Windows 95/98/ME.
Similar Messages
-
easy and quick question, when running a java program in command prompt and you want to stop it early or want to stop it if in an infinite loop without closing command prompt whats the command to do that? For the life of me i cant remember.
In Windows, press Control-C.
This is not a Java related question though.
Vincent -
How can we write the code for opening the command prompt and closing the
how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)
rakeshsikha wrote:
how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)? -
Command prompt issue from VBscript
So I have this script that works perfectly for parsing out a COM number and then sending data to said COM port via the command line (things like 'ipconfig > //./COM15'). The issue is that it only works when I use the /K modifier which tells the command
windows to stay open. I don't want them to stay open, but whenever I remove the /K, it doesn't work. Nothing gets copied to the COM port. I suspect the cause of this is the command prompt closing before things like systeminfo can finish running. So is
there a way to have the command prompt window stay open for a short amount of time and then close?
'Part 1: FindCOM port
fileName = "C:\rtlstuff\COM.txt"
Set regex = New RegExp
regex.Pattern = "COM(\d+)"
regex.IgnoreCase = True
regex.Global = True
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(fileName)
text = file.ReadAll()
file.Close
Dim ComPort
Set matches = regex.Execute(text)
For Each m In matches
ComPort = m.SubMatches(0)
Next
'Part 2: Set file dictionary
set oDic = CreateObject("Scripting.Dictionary")
oDic.Add 0, "ECHO %DATE% %TIME% > //./COM"
oDic.Add 1, "ipconfig > //./COM"
oDic.Add 2, "systeminfo > //./COM"
v = 3
'Part 3: Set COM Variables
Set oShell = WScript.CreateObject ("WScript.Shell")
MODE = "MODE COM" & ComPort & " 9600,N,8,1,P"
oShell.run "cmd.exe /C" & MODE
'Part 4: Data transmission
Dim Command
x=0
do while x < v
Command = oDic.Item(x) & Comport
msgbox Command
oShell.run "cmd.exe " & Command
x=x+1
wscript.sleep 10000
loopCan you help me with syntax? I'm still not hugely familiar with VB and I'm not sure how to set this up. This current iteration does not work.
'Part 1: FindCOM port
fileName = "C:\rtlstuff\COM.txt"
Set regex = New RegExp
regex.Pattern = "COM(\d+)"
regex.IgnoreCase = True
regex.Global = True
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(fileName)
text = file.ReadAll()
file.Close
Dim ComPort
Set matches = regex.Execute(text)
For Each m In matches
ComPort = m.SubMatches(0)
Next
'Part 2: Set file dictionary
set oDic = CreateObject("Scripting.Dictionary")
oDic.Add 0, "ECHO %DATE% %TIME% > //./COM"
oDic.Add 1, "ipconfig > //./COM"
oDic.Add 2, "systeminfo > //./COM"
v = 3
'Part 3: Set COM Variables\par
Set oShell = WScript.CreateObject ("WScript.Shell")
MODE = "MODE COM" & ComPort & " 9600,N,8,1,P"
oShell.run "cmd.exe /C" & MODE
'Part 4: Data transmission
Dim Command
i = True
x=0
do while x < v
Command = oDic.Item(x) & Comport
msgbox Command
oShell.run "cmd.exe " & Command , ,True
x=x+1
wscript.sleep 10000
loop -
How to use addKeyListener in a program running using command prompt
Does anyone have any idea how to add the addKeyListener to a program running using command prompt.
Let me explain how the program run.
The program is start and accept call from other program. But from time to time, I need to issue some command by pressing the keyboard, let say, ESC is closed the program, F1 is showing the stated. F2.... (This is all need to run in the command prompt windows)
My problem is this program does not have any gui interface, so how can it be added?
i do it this way
public void key(){
addKeyListener(this);
But it have compile error.
mainServerImpl.java:87: cannot resolve symbol
symbol : method addKeyListener (mainServerImpl)
location: class mainServerImpl
addKeyListener(this);
I did implement KeyListener. But just don't know how to solve this error.
can anyone tell me how to solve it or point me a source that can help.
Thank in advance!
Regards,
Tai TanWrite your own Thread, to do this:
public class KeyThread extends Thread {
public void run {
while(true) {
int i = System.in.read();
if(i == 123) {
break; // to stop the thread
// in your main:
Thread keyThread = new KeyThread();
keyThread.start(); // calls run() of the thread -
Hi,
When I open firefox (note: I got firefox version 28.0 and Karspersky security 2014) I get a black screen covering the whole firefox window and it looks more lika a big command prompt window, in firefox. What is it?
Regards
JeanHuh, that's a new one...
Can you try Firefox in [[Safe Mode | Safe Mode]] to see if the problem goes away. I'm thinking it's an extension.
*Run ''firefox.exe -safe-mode'' in the search bar on the Start Menu. (Make sure Firefox is closed)
Have you added any new extensions recently around the time this started happening? Your system details shows the following:
*Adobe Acrobat - Create PDF 1.2 ([email protected])
*Anti-Banner 14.0.0.4917 ([email protected])
*Dangerous Websites Blocker 14.0.0.4917 ([email protected])
*Kaspersky URL Advisor 14.0.0.4917 ([email protected])
*Troubleshooter 1.1a ([email protected]) '''This is default so this isn't the problem.'''
* Virtual Keyboard 14.0.0.4917 ([email protected]) -
I want to get command prompt.
i don't wanna see this message after closing the java program.
"press any key to continue..."
what funtion i should call? to get the command prompt just after closing the program.
is some body help me.....?That's not a Java question :-/
I think you are running a windows system an you start your Java application via
batch script. Look for a line "pause". That line causes this message.
Ether delete this line or comment it out by insert a "rem" before the "pause" -
How to access command prompt?
When I am giving the file path as command in command line input of system exec.vi, the command prompt window is opening and closing immediately.
What should I do so that the Command prompt window stays open?
Solved!
Go to Solution.
Attachments:
cmd.vi 8 KB
cmd.vi 8 KBHi kimhyun,
try setting the wait until completion input of systemexec.vi to false.In my PC i could able to see the command prompt without close.\
Regards,
SrikrishnaNF -
Command prompt appearing on several machine after install ?
I have several machines running intune now, some previously GFI and before that eset, but this is also occurring on new clients, every now and then a command prompt window is opening up and closing very quickly the only thing I can pinpoint is intune as
this happens moments after every install and happens daily at different times I have noticed it myself but it occurs far less for me compared to other machines (seeing this first hand) and we just use the 1 policy ?I know this is very old but I’m trying to clean up old posts. Did you ever solve this? If so it would be good if you could post the solution to assist others. If not, at this
stage, as nobody has answered, I would recommend that you call Intune support if the issue still exists.
You will find your local Intune support number here
http://technet.microsoft.com/en-US/jj839713.aspx
Gerry Hampson | Blog:
www.gerryhampsoncm.blogspot.ie | LinkedIn:
Gerry Hampson | Twitter:
@gerryhampson -
How to close the command prompt
Hi,
I am new to Java. I am using Swing. i used System.exit(0) to close my frame when a condition is met. But the command prompt is not closed. How do i close that automaticallyAnswered in your duplicate thread.Duplicate? It's a cross-post:
http://forum.java.sun.com/thread.jspa?threadID=5127667
I will also answer in that thread
Kaj -
How to close the command prompt from program
Hi,
I am using Swing. i used System.exit(0) to close my frame when a condition is met. But the command prompt is not closed. How do i close that automatically@Op.
When was the command prompt opened?
It won't close if it was opened before you started your application, and it won't close if you are executing your application from a bat/cmd-file that doesn't terminate.
Kaj -
Problem during executing Command Prompt
Hi All
My current code is executing system commands through java programme,like �dir�,�date� itc.Whenever I run the code the desired output comes.But when I am running the code continuselly then lots of command prompt open regularlly.
Is there any way to stop the code from execution untill unless the command prompt get closed manually?Here is my code.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
interface IPerlService
public String BZMCreateZone(String s);
public int BZMRenew();
public class Sample
public void BZMCreateZone()
Runtime runtime;
Process process;
String s=null;
String str=null;
try
runtime = Runtime.getRuntime();
process =runtime.exec("cmd /c start dir");
str=process.toString();
try
process.waitFor();
catch (InterruptedException e)
e.printStackTrace();
BufferedReader reader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
s = reader.readLine();
catch (IOException ex)
ex.printStackTrace();
public static void main(String[] args)
Sample obj_Sample= new Sample();
obj_Sample.BZMCreateZone();
}I want to execute below commands programmatically.
devenv D:\TestApp\TestApp.sln /rebuild release
devenv D:\TestApp\TestApp.sln /rebuild debug
But I am not able to set the current directory path as "D:\TestApp\" programatically.
Through which API I can execute multiple commands on command prompt programmatically same as we do manually on cmd.
Why can you "not able to set the current directory path as "D:\TestApp\" programatically"? Are you forgetting to escape the backslashes?
Why to you need to set the current directory anyway?
What is the problem with executing multiple commands?
As to your basic goal, have you looked at
system()
ShellExecute()
ShelExecuteEx()
CreateProcess()
? Perhaps you should show us what you have tried.
David Wilkinson | Visual C++ MVP -
Command Prompt Blue Screen in Windows 10
McAfee 8.8i isn't supported yet until patch 6 which is due mid-end of this month eitherNod32 V5 seems to work ok though - although I don't know the official stance on that.http://www.bitdefender.co.uk/support/is-bitdefender-2015-compatible-with-windows-10-1451.htmlAlso worth reading if you're not already awarehttp://community.spiceworks.com/topic/1099226-antivirus-maker-bitdefender-hacked-customer-data-sold-...
Hello All,
I recently upgraded to Windows 10 and notice that when opening up command prompt, typing in command, then closing by clicking on the X button to close the Window, it will immediately blue screen. When I open command prompt, do a command, then type "exit" in command line, it closes the window with no problem. I haven't see any Microsoft forum reporting any issues so wasn't sure if this is a mass issue that will be rolling in soon or just isolated to my computer.
Any advice would be helpful.
This topic first appeared in the Spiceworks Community -
Query running on sql commands prompt not running on report region
Hi All,
Facing a weird issue now. I have written a report query which is running absolutely fine in sql command prompt but when i trying to run this as a report it is just processing and the report is not loading. What could be the reason behing this?
Thanks in Advance
RegardsHi,
With no other information about the problem is hard to know what's happening. If you could at least provide us with the query then I think it would be easier for us to help you.
Regards,
Sergio -
Unable to run discoverer report from command prompt
Hi,
I'm trying to run the discoverer report from command prompt and i need to schedule the same.
How could i pass multiple values for the parameters?
If i don't pass the optional parameters, the parameter screen is getting pop-up? How to skip optional parameters?
Also, how to pass the data ranges (format for date parameters) ?
I'm using the below command in command prompt:
cd/d E:\oracle\BIToolsHome_1\bin
dis51usr /connect username/password@database /opendb "TIMS-PCJ status Report" /sheet "TIMS observation status report (based on performed date)" /parameter "Test Number" 40351 /parameter "From Date" "01-JAN-2007" /parameter "To Date" "28-FEB-2007" /parameter "Observation Status" C /parameter "Observation Name" "Abdominal Girth" /export HTML "C:\DISCOVERER_REPORT_SCHEDULING\DIS_OUTPUT\PCJStatusOutput11"
Any one please reply me. Its very urgent.
Regards,
SreedharHi,
How could i pass multiple values for the parameters? You should be able to use a comma separated list e.g.
/parameter "Observation Name" "'Abdominal Girth','Abdominal Girth2'"
How to skip optional parameters?I don't think you can. You have to supply all parameters and then decode out the parameters you don't need in the workbook.
how to pass the data ranges You cannot pass a date range. You can pass a start and end parameters. The default format for the date parameters is DD-MON-YYYY but this can change depending on the NLS settings and format of the data item.
Rod West
Maybe you are looking for
-
24" imac dual core and uk broadband providers
I currently have a 17" flat screen imac connected to the internet via the internal modem. I use AOL's dial-up service. I'm intending to purchase a new 24" dual core imac and want to connect to the internet via broadband. As AOL's current broadband se
-
HT1369 how do i get recent add back on i itune i deleted it by mistake
How do i get back recent added back on itune i deleted it by mistake
-
Is pixel bender support GPU acceleration in Flash Player?
I know in the earily version of flash player 10, pixel bender is not support GPU acceleration in FP, but now the latest fp is 10.3, is this GPU feature implemented in the latest flash player? appreciate anybody could give me a clue.
-
Hi everybody, i have a problem opening indesign CS2, i just happen this monday, before that it always work perfectly, when i open the program display the next message "Se ha detectado un error grave y adobe indesign se cerrará. reinicie indesign para
-
Sudden monitor seems not working after change HD
Hi Folks, after I change my original HD which is made by Hitachi to Seagate Momentus XT, my sudden monitor seems not working again, in perviusly if I take my MBP up from table with a strong accelerate, a sound like "ka-da" would be heard from HD beca