Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Verify if notepad is open
#4
Solved: 11 Years, 4 Months ago
Above code is only to close one notepad. If their are more than one notepad to be closed then try with this code:


Code:
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")

Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = notepad
“)
For Each objProcess in colProcess
objProcess.Terminate()
Next
Regards,
Seema Gupta
Reply


Messages In This Thread
How to Verify if notepad is open - by bostonma - 04-23-2010, 09:18 PM
RE: How to Verify if notepad is open - by Seema Gupta - 04-13-2011, 04:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Fifth word from every thousand line in notepad files. sallu.iet@gmail.com 0 943 01-17-2020, 09:58 AM
Last Post: sallu.iet@gmail.com
  [UFT] [WPF] Verify if the cell contains an image robertosalemi 0 1,902 10-25-2016, 06:57 PM
Last Post: robertosalemi
  Need to verify the drop down values based on condition santhoshmscsoftware 1 2,912 05-04-2016, 11:28 PM
Last Post: supputuri
  verify that parent properties match object currently displayed in your application. sona 0 3,137 02-21-2016, 12:00 PM
Last Post: sona
Exclamation How to verify whether pdf is completely loaded or not in webpage nmakkena 1 2,685 08-27-2014, 04:09 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)