1

I'm using Task Scheduler to launch SoundID Reference.exe, a third-party program, 60 seconds after my Win 10 64-bit computer starts up. That's working fine.

I would like to create a batch command to close SoundID's window, after the program starts up. I'm trying to figure out how to do this via nircmd.exe, though I'm confused by the documentation and examples.

I've got nircmd.exe in one of my user directories, since my system didn't allow me to copy it to the Windows directory.

Here's the batch command I've been working with, unsuccessfully:

C:\Users\USERNAME\nircmd win close title "SoundID Reference.exe"

What is the correct syntax/approach to get this to work properly?

This is how the window appears in the task bar:

taskbar view of SoundID Reference

Here's the actual program window:

SoundID window

This is what I see for SoundID when I run tasklist /v in a CMD prompt:

enter image description here

BTW SoundID runs multiple processes. I'm just trying to close the single 'Systemwide' window.

From Task Manager:

view of SoundID Reference in Task Manager

DavidPostill
  • 162,382

2 Answers2

1

I've made some progress with this. The following uses AutoHotKey, instead of NirCmd.

winTitle = SoundID Reference
If WinExist(winTitle) {
WinActivate

Send !{F4}
}
ExitApp

Closing the window allows SoundID Reference's processes to remain active, accessible from the Taskbar tray.

The first four lines are from AHK's template:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory. 

winTitle = SoundID Reference
If WinExist(winTitle) {
WinActivate Send !{F4} } ExitApp

0

Per @SeƱor CMasMas suggestion, I tested with Nircmd, using the syntax suggested by @vbnm.

nircmd win close title "SoundID Reference" actually quits the underlying processes, rather than merely closing the window.

I suppose that nircmd could provide the same functionality if it merely closed the window with alt-F4. Unfortunately, that's all the testing and reporting time I've got left for this.

Thanks all.