CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    628

    disable a program

    some might say this is a stupid question and i'm trying to be a smart a**, and when i read this tomorrow after sleeping, i might too.. but i am dead serious!

    my problem is (don't laugh) that when i sit down to work at my computer, i keep wasting my time playing solitaire. i can't uninstall it because i share my computer.. and apparently i have absolutely no self control.. is there any way you can lock the program? so that i sit down at 9am, i can say do not execute this file between 9am and 3pm (so that the peoplei share my computer with can play it later- they are not as hopelessly addicted as me!) . by the way, it would have to be so that there is no way to unlock the program until the time has come to unlock, because then i would just unlock it.

    i just figured i needed this when i wasted 45 minutes playing it late at night when i should have been rushing to meet a deadline! and i figured, what better place to ask than CG?

    you can ignore this thread or laugh.. but i think i'm addicted to this stupid thing! either way, you can either help me.. or i'd like to think i at least got a chuckle out of some of you
    Last edited by drewdaman; August 10th, 2005 at 09:27 PM.

  2. #2
    Join Date
    Oct 2002
    Location
    Singapore
    Posts
    3,128

    Re: disable a program

    The file system in Windows OS, allows us to control the access right to each and every file. You can right click on the file and select Properties. Clicking on the Security tab, bring us to the place where you can control the user access. Adding your login name and then select the deny check box for "Read and Execute". Volia, you can't run the application.

    BTW, this thead isn't appropriate in the VC++ forum, you can try posting to General Disccssion forum in the future.

  3. #3
    Join Date
    Jun 2005
    Posts
    241

    Re: disable a program

    There is no fool proof way to do this. There could be many possibilites, but in response to "i would just unlock it" and "lock it between the times of 9 to 3" what would be stoping you from changing the time to 3:01, nothing as far as Im concerned so you could still just unlock it.
    BTW: You gave me a good laugh.
    If you need more help i'd be happy to help. I however can not think of a fool proof way to disable the program for certain times.

  4. #4
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,867

    Re: disable a program

    Kheun - I doubt if there'll be a Security tab unless he's using NTFS file system. I don't think FAT32 offers that level of security and FAT16 certainly doesn't.
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  5. #5
    Join Date
    Jul 2005
    Location
    Germany
    Posts
    1,194

    Re: disable a program

    If he has a flatrate there would be a chance. A program which gets the time from a time server and only unlocks the game if it succeeded and the time is in range.
    Please don't forget to rate users who helped you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured