Program to block Windows application

Discussion in 'C++' started by meerubus, Apr 29, 2006.

  1. meerubus

    meerubus Guest

    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
     
    meerubus, Apr 29, 2006
    #1
    1. Advertising

  2. meerubus wrote:
    > 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
     
    Jonathan Mcdougall, Apr 29, 2006
    #2
    1. Advertising

  3. meerubus

    benben Guest

    meerubus wrote:
    > 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
     
    benben, Apr 29, 2006
    #3
  4. meerubus

    Jack Klein Guest

    On 28 Apr 2006 18:24:32 -0700, "meerubus" <> wrote
    in comp.lang.c++:

    > 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.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Apr 29, 2006
    #4
  5. meerubus

    John Carson Guest

    "meerubus" <> wrote in message
    news:
    > 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


    --
    John Carson
     
    John Carson, Apr 29, 2006
    #5
  6. meerubus

    al pacino Guest

    :-D
     
    al pacino, Apr 29, 2006
    #6
  7. meerubus

    GB Guest

    meerubus wrote:
    > 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
     
    GB, Apr 29, 2006
    #7
  8. meerubus

    Tomás Guest

    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
     
    Tomás, Apr 29, 2006
    #8
  9. meerubus wrote:
    > 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

    --
    ---------------------------------------------------------------------------
    Home of Martin Jørgensen - http://www.martinjoergensen.dk
     
    =?ISO-8859-1?Q?Martin_J=F8rgensen?=, Apr 29, 2006
    #9
  10. meerubus

    Default User Guest

    al pacino wrote:

    > :-D


    This is not IM. Please review the information below.



    Brian

    --
    Please quote enough of the previous message for context. To do so from
    Google, click "show options" and use the Reply shown in the expanded
    header.
     
    Default User, Apr 29, 2006
    #10
  11. meerubus

    strensnik

    Joined:
    Sep 14, 2011
    Messages:
    1
    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.
     
    strensnik, Sep 14, 2011
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lucas
    Replies:
    7
    Views:
    1,893
    mattsmith321
    Dec 6, 2003
  2. Marco Vasquez
    Replies:
    0
    Views:
    388
    Marco Vasquez
    Dec 30, 2003
  3. Showjumper
    Replies:
    1
    Views:
    712
    Showjumper
    Mar 19, 2005
  4. Samy
    Replies:
    0
    Views:
    512
  5. morrell
    Replies:
    1
    Views:
    979
    roy axenov
    Oct 10, 2006
Loading...

Share This Page