Prepare for your Next Interview
This is a discussion on Close Command prompt using Vbscript within the QTP forums, part of the Software Testing category; How to close the Command prompt using Vbscript Using batch file i am opening the any application by mentioning the path but that application is opening along with command prompt ...
|
|||
|
Close Command prompt using Vbscript
How to close the Command prompt using Vbscript
Using batch file i am opening the any application by mentioning the path but that application is opening along with command prompt also showing. please let me know how to close the command prompt not an application |
| Sponsored Links |
|
|||
|
Re: Close Command prompt using Vbscript
Friends,
This works for me on using it after writing the script for closing all the unwanted application. Let me know, for your testing it helps or not. I am waiting... Set oShell = CreateObject("WScript.Shell") Set oWmg = GetObject("winmgmts:") strWndprs = "select * from Win32_Process where name='cmd.exe'" Set objQResult = oWmg.Execquery(strWndprs) For Each objProcess In objQResult intReturn = objProcess.Terminate(1) Next Last edited by ravisuriya : 01-17-2008 at 02:06 AM. |
| The Following User Says Thank You to ravisuriya For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Start a TestSet via Command Prompt | Geek_Guest | QTP | 0 | 10-22-2007 02:55 PM |
| I have 2 browsers open having the same title and I want to close the second browser? | rkiran416 | QTP | 5 | 10-09-2007 06:25 AM |
| Invoke QTP script from command prompt | Geek_Guest | QTP | 1 | 08-21-2007 06:00 AM |
| Pre-defined prompt and Report level prompt | Geek_Guest | Data Warehousing | 1 | 07-03-2007 03:52 AM |
| Compile a C program using command prompt | priyajos | C and C++ | 2 | 05-17-2007 08:52 AM |