How to close exe process!!!
hi,
I have opened exe files using Runtime.getRuntime method.
i need to close using java.
But how could i close which i opened exe files.
thanks in advance
sara.
Process p = Runtime.exec(...);
p.destroy();
This is pretty harsh though and does not necessarily give the process a chance to cleanup.
More info about Runtime.exec is covered in the following web page:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Similar Messages
-
How to close old process orders dated 2006?
I have a open process order dated back to 2006. There is a negative balance of -$100 on this order.
Now in 2010 i want to close this order. The status of this order is TECO. However when i want to close this order, the system says i need to settle the negative balance first before doing so.
Hence when i run the settlement to material the system says the process order is not technically completed yet because i have not done the final delivery yet.
When i do final delivery using a current date in 2010, the system said it could not determine the object currency for the activity types used in the order since the cost center tied to the activity type has a validity date of up to 31/12/2006 only.
In this case i am stuck one after another situations. How can i close this order without going through all the above conditions?Hi,
One alternative is to change the Settlement profile setting (attached to Order type) in OKO7 to 'Can be Settled' from 'To be settled in Full' briefly, which allows you to close the Order even with some balance on it. Revert back the setting once you are done.
Hope this helps. -
How to end a process from cmd.exe?
I need to open and close a word file(Test.doc) from my java program. I managed to open the file using cmd shell, but I don't know how to close the opened file. Does anybody have a suggestion? Below is my code. Thanks.
Runtime r = Runtime.getRuntime();
Process p = null;
try {
p = r.exec("cmd.exe /c start Test.doc");
catch (Exception e) {
System.out.println("Error opening the file.");
}Try something like this:
Runtime r = Runtime.getRuntime();
Process p = null;
String command = "\"C:\\Program Files\\Microsoft Office\\Office12\\winword\"";
String file = "\"c:\\Test.doc\"";
try {
p = r.exec(command + " " + file); //to open the file in MS Office Word
Thread.sleep(30000); //keep it open for 30secs
p.destroy(); //close the process and hence the file
}catch (Exception e) {
System.out.println("Error opening the file.");
}Edited by: Sourav-Sipani on Jul 28, 2008 1:56 AM -
How can I stop and restart the ApplePhotoStreams.Exe process on my Windows 7 computer?
I sometimes notice my CPU utilization skyrockets and my computer fan switches to high. This happens sporadically. The process causing this is ApplePhotoStreams.Exe. It appears the process goes into some infinite loop trying to update or sync pictures. Applications on my PC slow down and the fan stays on high (which is really loud) until I cancel the ApplePhotoStreams.exe process. I can easily cancel the process using Task Manager, but then any photos I take with my iPhone do not replicate over onto my PC unless I reboot my computer.
I'm not sure if anyone can easily tell me why ApplePhotoStreams.exe is doing this in the first place, but I would more like to know how to restart the ApplePhotoStreams.exe process after I cancel it without having to reboot my PC.you can download a new installer and serial number from Adobe at Adobe - CS2 Downloads
-
How Can I Kill Excel.exe Process After finish my Execution of SSIS Package in Sqlserver2008r2
Hi !,
am new for c# and SSIS Package Creation , I am Trying to Read Excel file, and load the value into Sqlserver using SSIS package . My Problem is , After Execution of SSIS package Still Running EXCEL.exe Process in my server. i need to
kill that process . I post my Code Exactly where am release my excel file object , please guide me where am going to wrong?
Server Configuration
OS:windows7
SqlServer :2008r2
Framework:3.5
please give me some suggestion to correct my error .
Here is My Code:
Microsoft.Office.Interop.Excel.Application xlApp;
Microsoft.Office.Interop.Excel.Workbook xlWorkBook;
Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet;
var missing = System.Reflection.Missing.Value;
xlApp = new Microsoft.Office.Interop.Excel.Application();
xlWorkBook = xlApp.Workbooks.Open(filename, false, true, missing, missing, missing, true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, '\t', false, false, 0, false, true, 0);
xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
Microsoft.Office.Interop.Excel.Range xlRange = xlWorkSheet.UsedRange;
Array myValues = (Array)xlRange.Cells.Value2;
int vertical = myValues.GetLength(0);
int horizontal = myValues.GetLength(1);
System.Data.DataTable dt = new System.Data.DataTable();
bool isNameRead = false;
// get header information
for (int i = 1; i <= horizontal; i++)
string cellValue1 = "";
object cellObj = myValues.GetValue(1, i);
if (cellObj != null)
cellValue1 = myValues.GetValue(1, i).ToString();
if (cellValue1 == "Name")
if (!isNameRead)
dt.Columns.Add(new DataColumn(cellValue1));
isNameRead = true;
else
dt.Columns.Add(new DataColumn(cellValue1 + 1));
isNameRead = false;
else
dt.Columns.Add(new DataColumn(cellValue1));
// Get the row information
for (int a = 2; a <= vertical; a++)
//string cellrowvalue = "";
string isemt = "";
object[] poop = new object[horizontal];
for (int b = 1; b <= horizontal; b++)
isemt =(string) myValues.GetValue(a, b);
if (isemt != null)
poop[b - 1] = myValues.GetValue(a, b);
DataRow row = dt.NewRow();
row.ItemArray = poop;
dt.Rows.Add(row);
xlWorkBook.Close(true, missing, missing);
xlApp.Quit();
releaseObject(xlWorkSheet);
releaseObject(xlWorkBook);
releaseObject(xlApp);
return dt;
releaseObject
private void releaseObject(object obj)
try
System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
obj = null;
catch (Exception ex)
obj = null;
MessageBox.Show("Unable to release the Object " + ex.ToString());
finally
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
GC.WaitForPendingFinalizers();
Thanks
Parthasarathi PurushothamanWhy are you programmatically opening an Excel sheet in C# instead of using the DataFlow task with an Excel input?
Since your task is programmatically starting Excel via "new Microsoft.Office.Interop.Excel.Application();", it is your responsibility to stop it.
Please see "Quit":
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._application.quit(v=office.15).aspx -
After an attempt to close the Mozilla Firefox page, on every occasion, the firefox.exe process is found at the top of the list when ordering the listed 'processes' by CPU time... even though the web page is gone.
If an attempt is made to restart Mozilla, the system declares that the current Mozilla process should be closed.
If the firefox.exe process is explicitly closed in the Task Manager, only then can Firefox be restarted.Does that also happen if you use File > Exit Firefox?
See also "Hang at exit":
* http://kb.mozillazine.org/Firefox_hangs
* [[Firefox hangs]] -
How to timeout (shutdown) inactive ifweb90.exe process
Hello,
I inherited an application that use Oracle Forms and Reports 9.0.4.1.0 installed on a Win2003 Server.
The issue is that the application doesn't close the process ifweb90.exe when the user close the IE window without use the exit function, we are thinking to do the following changes in order to timeout the application after 30 minuts inactive:
- Modify the application environment file in e:\oracle\appserver\forms90\server\myapp_american_america.env
Set the parameter FORMS90_TIMEOUT=30
- Modify the application configuration file in e:\oracle\appserver\forms90\server\myapp_formsweb.cfg
Set the parameter heartbeat=31
- Modify the application configuration file in E:\oracle\appserver\j2ee\OC4J_BI_Forms\applications\forms90app\forms90web\WEB-INF
Set <session-timeout>30</session-timeout>
After those changes we will restart the server.
Questions:
1.- That are all the needed steps to do in order to kill the inactive ifweb90.exe process?
2.- This changes will provoque any performance degradation?
3.- This changes will provoque any system issue?
Hope you can help me here guys, regards.Cristian, I am not familiar with 10gR1 but I have worked with 10gR2/11g and if things work similarly I can tell you that we trained our users to close the application with the exit button rather than closing the browser, on top of that, we implemented some JavaScript code in the base template HTML pages that alerts the user in the event they try to close the browser while the application is running ... it is like a popup, with OK and Cancel buttons, if they press OK then the browser is closed and at their own risk the Forms runtime still remains in the application server and their sessions on the database, they aware what this can cause.
Also, when they press the exit button, we put some code so that Forms also tries to close the browser window and the same popup is displayed, obviously at this time they know they want to exit and OK the message which just closes the browser.
We did not change any settings as you have done in your environment and we do not get any network errors, I personally think you should revert your changes and tackle the problem from the root... modify the template html to add similar code like we did and train your users as well...
Edited by: Rodolfo Ferrari on Sep 16, 2009 8:51 PM -
Two nalagent.exe processes w/ 100% cpu on App Launcher close
Hello. We are wondering if nalagent.exe is supposed to be running twice as it does not appear to be this way on all workstations. One nalagent.exe process is running under NT AUTHORITY\SYSTEM, and the other nalagent.exe process is running under the username.
Reason we are asking is because the one running under the username consumes 100% cpu immediately after closing the Application Launcher Window running on the desktop. Upon closing the Application Launcher, the AUTHORITY\SYSTEM nalagent.exe process closes, and the user nalagent.exe process remains and instantly spikes to 100% indefinitely (unless you kill the process in the task manager).
Using Sysinternals Process Monitor reveals that nalagent.exe is constantly scanning for the following nonexistent registry key: [HKEY_CURRENT_USER\Software\NetWare\NAL\1.0\Process Management]. These registry lookups appear to be what is causing the 100% cpu usage, but why? Creating the Process Management key does not eliminate the lookups.
This issue is possibly related to another 100% cpu bug we experienced with a "save icons" feature being stored under the [HKEY_CURRENT_USER\Software\NetWare\NAL\1.0\Links] registry key. We followed the suggestion of deleting the Links key on logon in the following post and this seems to prevent nalagent.exe from automatically starting up at 100% cpu. Our current issue is only when closing the Application Launcher which starts the 100% cpu usage.
http://forums.novell.com/novell-prod...7-sp1-hp1.html
We have considered preventing the Application Launcher from being closed but there appears to be an underlying problem we would like to understand further. Thank you for any information.
Jasonjczen,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been resolved? If not, you might try one of the following options:
- Visit http://support.novell.com and search the knowledgebase and/or check all
the other self support options and support programs available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.novell.com)
Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.novell.com/faq.php
If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.
Good luck!
Your Novell Product Support Forums Team
http://support.novell.com/forums/ -
How to fully close the process? Let the light close under the widget on desk?
How to fully close the process? Let the light close under the widget on desk?
Make the App active. The to completely close that App do one of these:
Mouse click the App name in the menu bar and select Quit "App name"
or
Commnad-Q -
Acrobat.exe process not ending when application closes
This also affected the acrord32.exe process until I uninstalled adobe reader.
I have recently updated to the new 10.1.0 version of Acrobat (think I was running 10.0.1 before), I was not having the issue before upgrading.
I only discovered I had the problem because I tried to delete a PDF file I had just opened. I closed Acrobat, then tried to delete the field, yet it said it was in use. A check in task manager showed acrobat.exe still running. This is most annoying.
I'm running Windows 7 Professional x64 with SP1.
Note: This affected both the Adobe Reader as well as Acrobat X Pro, but doesn't seem to affect any other software.
Please advise of a fix for this, Thanks.I have just completely removed Acrobat and reinstalled it having cleared all the folders that got left behind.
It installed ok, but now the 10.1 update wont install properly. It hangs at the "creating the adobe pdf printer" part. It eventually carrys on, but I end up with no Adobe PDF printer installed. -
Need to close the process.
It does take Firefox a while to shut down; it has to update some databases. But it should take less than a minute.
In the support article, this problem is called a "hang at exit" because Firefox hangs when shutting down. Maybe something here will help: https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit
Also, sometimes open Firefox windows disappear from the Task Bar. You can use Alt+Tab to switch to them if they remain open. -
How to close/process a life event automatically
Hi,
I am looking for a solution that can process "termination" life event automatically so there is no need of manual intervention.
Just like there is a close enrollment process for Annual enrollment, can we setup something on similar lines and schedule a process that will take care of events like "termination" as well?
Thanks for your suggestions!!Participation Process : Life Event will do it for you. It works for all life events including termination. If you want to schedule it specifically for terminated employees, choose the person type for ex-employees.
Regards,
Vinayaka -
When browser closes, many "plugin-container.exe" processes are started
When Firefox start, there's only one "plugin-container.exe" process. Instead at closing, many plugin-container.exe appear gradually taking up memory. So closing is quite slow. Is it normal?
I am using Firefox 4.0.1 (win32, en-US) on Windows XP Professional SP3 (i386, ENU). I am able to solve this problem by renaming the "XUL.mfl" and "startupCache.4.little" files (after closing Firefox first of course). Search for the files in your system (C) drive, making sure to search for hidden files and folders, then rename the files to different names. After renaming the files, try relaunching Firefox and using the "Clear Recent History" function (with "Cookies" selected) for a few times, and hopefully the problem should be solved.
-
I am running WinXP Pro, SP3. I uninstalled and re-installed Firefox and the problem didn't go away. This problem started about 2 months ago. Firefox always worked fine before that. This happens very frequently -- If I have been using Firefox previously, and I closed the program, when I try to re-launch it, about 50% of the time, I need to use Task Manager to stop a persistently running firefox.exe process.
See the "hangs at exit" section of the [[Firefox hangs]] article.
A similar article on this is http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit -
EXCEL.EXE process is keep running even after closing all the handles
I am using Excel Report Instrument functions for creating excel application and sheet,workbook after reading/writing in to excel file am closing all the handles using CA_DiscardObjHandle (handle); even after file is getting closed m checking it in TaskManager then one EXCEl.EXE process is keep running there,pls let me know how to deal with this....
Solved!
Go to Solution.A Kumar:
Have you tried running the example program excelreportdemo.prj that ships with CVI? It ends the excel process by discarding multiple handles, and it works even if you're editing a cell or have an Excel dialog open, etc. Try running this without modification and verify that the excel process is closed when you quit the CVI app.
Here's the Quit function from excelreportdemo. It checks for and closes handles for the worksheet, chart, workbook, and excel application.
int CVICALLBACK Quit (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
switch (event)
case EVENT_COMMIT:
if (worksheetHandle)
CA_DiscardObjHandle(worksheetHandle);
if (chartHandle)
CA_DiscardObjHandle(chartHandle);
if (workbookHandle)
ExcelRpt_WorkbookClose(workbookHandle, 0);
CA_DiscardObjHandle(workbookHandle);
if (applicationHandle)
ExcelRpt_ApplicationQuit(applicationHandle);
CA_DiscardObjHandle(applicationHandle);
QuitUserInterface (0);
break;
return 0;
Maybe you are looking for
-
How do I remove a person using my Apple ID
I just discovered that one of my kids friend has signed in to my iTunes account using FaceTime and now I would like to know how I can remove this person from using it again.
-
Interrupted my Restore iPhone 4 on my new handset and now I can't do it?
I smashed my iPhone 4 a couple of weeks ago and got a brand new handset today in the Apple Store. The genius guy restored my contacts onto it so when i got home I connected it to iTunes, worked through the "get started" menu and opted for restore thi
-
Hi all, I work with forms 6i and database oracle 8. I want to know if it's possible to count the number of column in a sql query. For exemple, i have : "select id, name, dtbirth from table". In this query, I have 3 column. But I don't know how can I
-
Purchased Music Missing?
An album I bought on itunes has the exclaimation symbol on it. I've seen this question asked a few times, and I've tried to delete the songs and then re-download them from my account. This seemed to make the problem worse, now the songs are greyed ou
-
Upon saving the purchase order , for a particular vendor , for output type NEU automatically system is selecting medium as fax ...which i dont want ..i have checked condition records MN05 ,MN06 but no such condition records exist ...can somebody pls