0

I have program B which is designed not to run when program A is started. I need to overcome this limitation. B shows a message box "A is running" pointing to program's A process name and PID. I make the assumption that B starts searching A from a process list, so removing A from a process list might help. Both processes have windows and require user input.

What have been tried so far:

I have Windows 10.

3
  • 1
    Without knowing exactly how A detects B this answer is extremely tough to answer since we would simply be throwing ideas at the wall. As for the programming question if you have the source to both programs, that’s a SO question, not a SU question Commented Nov 13, 2017 at 13:17
  • What are processes A and B? Commented Nov 13, 2017 at 13:18
  • I think my answer demonstrates this is in fact answerable given the way Windows isolates processes within the context of user accounts. Commented Nov 14, 2017 at 3:58

2 Answers 2

2

TL;DR: THIS IS SOUNDS LIKE A BAD IDEA

There's probably a good reason why B was designed not to run while A is running. The first thing that comes to mind is that they share a database, registry keys, or some other binary data source that may be corrupted if handled by two threads at once. Either way, without giving more information about the programs and how B might go about detecting A all anyone can do is guess. If this is a windows program, Program A probably writes some kind of registry key that B checks during startup. But then it could also key off of some kind of temporary file. The possibility of hiding things from any sort of process list would make me very wary of continuing to use that system as it would have very serious security ramifications. You're basically asking how to rootkit your system.

1

I make the assumption that B starts searching A from a process list...

Scenario 1: The program checking for the other program does not require administrative rights to run.

If program B doesn't require administrative rights to run (including no use of services running with admin rights), execute it in the context of another user account on your computer that does not have admin rights. To do so, Shift+Right-Click the program to get the Run as different user option.

The program will run in the context of the other user account, and because the account doesn't have admin rights, it cannot enumerate processes running in the context of other users. Therefore it won't be able to "see" the other program's process.

If you need the programs to share access to filesystem or Registry resources, simply grant both user accounts access to said resources. Doing so won't allow the one program to see the other.

Scenario 2: The program checking for the other program DOES require administrative rights to run.

An application with that runs in the context of an account with administrative permissions can do anything it wishes on your computer, making it extremely challenging to subvert its prerogative to exercise those privileges. The only way forward would be to know the exact tests the program is performing to determine if the other app is running, and then hook the various API function calls involved to remove the target program's existence from the data being returned. This is how rootkits hide their presence on a computer. Doing this falls well outside the scope of this specific answer (and the Super User site in a general).

2
  • Thanks for your detailed comment. I was able to run B as user with with "Standard user" type, while A was running as user with "Administrator" type. This didn't make any difference. B actually initiated from borwsers url, which was opened with one process which starts another one, but I checked all of them ran as "Standard user". Can I be missing something for this test case? Commented Nov 15, 2017 at 12:45
  • @VladimirLenin You must be incorrect in your assumption that program B is enumerating running processes to discover A. Clearly you need to know exactly how the program is discovering the other one. My answer deals only with your question stating I make assumption that B starts searching A from a process list Commented Nov 16, 2017 at 12:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.