At my company we have small workstations ~13 inch with touchscreen.
The operating system is: Microsoft Windows Embedded Standard 6.1.7601 Service Pack 1 Build 7601
The workstations have 5 buttons on them that can be mapped for any key combination. (example ctrl+alt+shift+[any key on the keyboard]
)
There are two programs that must run on them in order for the workers to be able to work. Sometimes the workers accidentally close one of the programs, so I have decided to get a solution to this, since they can not start the programs by themselves.
So I have:
- created a batch file, that when started, it checks if the programs are running, if not, it starts them;
- created a shortcut of the batch file (in %appdata%\Microsoft\Windows\Start Menu\Programs
as suggested here);
- added a shortcut key (ctrl + alt + s);
- assigned one of the buttons on the workstation to the key binding.
It seemed a good idea in theory but in practice the shortcut key binding wasn't working properly.
After troubleshooting, I realized that one of the programs is causing the problem.
Lets call the programs A
and B
. When B
or the desktop is in front, the key combination works properly and launches the batch file. A
works in full screen. So when the key combination is pressed while A
is in front it doesn't work.
So I have assigned an alt + tab
key combination for another button but this is where the problem kicks in.
If I have previously pressed the ctrl + alt + S
key combination while A
was in front, it wont work afterwards even after I switched to B
or to the desktop.
What makes it more interesting is, that if I create another shortcut key on another shortcut file, lets say ctrl + alt + D
and run it after ctrl + alt + S
stopped working, it fixes it and the ctrl + alt + S
starts working again while B
or the desktop has focus.
Tried this, didn't work.
Red this forum. No solution.
I am looking for a solution/workaround/another method to solve this problem.
I don't want to install any third party programs. I can however modify settings and the registry if needed.
EDIT:
The batch file
echo off
tasklist /FI "IMAGENAME eq progB.exe" 2>NUL | find /I /N "progB.exe">NUL
if "%ERRORLEVEL%"=="1" (
cd C:\<progB path>
start /MAX progB.exe
)
tasklist /FI "IMAGENAME eq progA.exe" 2>NUL | find /I /N "progA.exe">NUL
if "%ERRORLEVEL%"=="1" C:\<progA path>
exit
WMIC process get Caption | find /i /n "prog.exe
. There is also Powershell Get-Process and also Powershell via WMI: Get-WMIObject Win32_Process.