Program to block Windows application

M

meerubus

Hi,
Could someone advise how to go about writing a (simple?) C++ program to
block a windows exe file from running? For example, my child likes to
run halo.exe & the pgm can run even in a non-administrator account.
Can I write a C++ program to block it from running? In addition, if
the pgm filename is changed (eg. halo.exe to xxx.exe), can the block
still work?

Thanks a million.
meerubus
 
J

Jonathan Mcdougall

meerubus said:
Hi,
Could someone advise how to go about writing a (simple?) C++ program to
block a windows exe file from running? For example, my child likes to
run halo.exe & the pgm can run even in a non-administrator account.

What's wrong with that?
Can I write a C++ program to block it from running? In addition, if
the pgm filename is changed (eg. halo.exe to xxx.exe), can the block
still work?

Dunno, perhaps if you asked at the right place you would get some
answers.

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9


Jonathan
 
B

benben

meerubus said:
Hi,
Could someone advise how to go about writing a (simple?) C++ program to
block a windows exe file from running? For example, my child likes to
run halo.exe & the pgm can run even in a non-administrator account.
Can I write a C++ program to block it from running? In addition, if
the pgm filename is changed (eg. halo.exe to xxx.exe), can the block
still work?

Thanks a million.
meerubus

This is OFF-TOPIC but may I hint you to look at group policy.

Ben
 
J

Jack Klein

Hi,
Could someone advise how to go about writing a (simple?) C++ program to
block a windows exe file from running? For example, my child likes to
run halo.exe & the pgm can run even in a non-administrator account.
Can I write a C++ program to block it from running? In addition, if
the pgm filename is changed (eg. halo.exe to xxx.exe), can the block
still work?

Thanks a million.
meerubus

Two possibilities:

1. Uninstall the program.

2. Reformat and install Linux.
 
J

John Carson

meerubus said:
Hi,
Could someone advise how to go about writing a (simple?) C++ program
to block a windows exe file from running? For example, my child
likes to run halo.exe & the pgm can run even in a non-administrator
account. Can I write a C++ program to block it from running? In
addition, if the pgm filename is changed (eg. halo.exe to xxx.exe),
can the block still work?

Thanks a million.
meerubus


This is severely off-topic since:

1. It probably doesn't require programming.

2. It is Windows specific, whereas this group deals with standard C++ and
not with the details of particular operating systems.

Ask in a group concerned with your particular operating system from a user
point of view, e.g.,

microsoft.public.win2000.general
or
microsoft.public.windowsxp.general
 
G

GB

meerubus said:
Hi,
Could someone advise how to go about writing a (simple?) C++ program to
block a windows exe file from running? For example, my child likes to
run halo.exe & the pgm can run even in a non-administrator account.
Can I write a C++ program to block it from running? In addition, if
the pgm filename is changed (eg. halo.exe to xxx.exe), can the block
still work?

Thanks a million.
meerubus

This is not the sort of thing you need to use C++ for. You just need to
set the permissions on the exe file appropriately (deny execute
permission on the file to the account your child uses). For details, ask
in a Windows group.

Gregg
 
T

Tomás

meerubus posted:
Hi,
Could someone advise how to go about writing a (simple?) C++ program to
block a windows exe file from running? For example, my child likes to
run halo.exe & the pgm can run even in a non-administrator account.
Can I write a C++ program to block it from running? In addition, if
the pgm filename is changed (eg. halo.exe to xxx.exe), can the block
still work?

Thanks a million.
meerubus


A lot of Windows programs check if they're already running by checking if a
certain mutex has already been created. Find out the name of the mutex,
create that mutex, and when the executable file is run, it will think it's
already running and just shut down.


-Tomás
 
?

=?ISO-8859-1?Q?Martin_J=F8rgensen?=

meerubus said:
Hi,
Could someone advise how to go about writing a (simple?) C++ program to
block a windows exe file from running? For example, my child likes to
run halo.exe & the pgm can run even in a non-administrator account.

You just rename the executable. If he's clever he'll know how to either
fix this (he knows the correct file-name or he'll google for it) or
he'll reinstall the program.



Best regards / Med venlig hilsen
Martin Jørgensen
 
Joined
Sep 14, 2011
Messages
1
Reaction score
0
more on blocking a mutex

A lot of Windows programs check if they're already running by checking if a
certain mutex has already been created. Find out the name of the mutex,
create that mutex, and when the executable file is run, it will think it's
already running and just shut down.

Tomas, you wrote the above response and this seems to be a great direction to go. Can you give any more information on how to "create that mutex". I am trying to block student from running HALO in our school computer labs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,361
Latest member
eitamoro

Latest Threads

Top