Thread: Unlocking my computer

  1. #1
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856

    Unlocking my computer

    [edit]
    Hey admin. Can you please move this to the Random board. I didn't mean to post here. Thanks.
    [/edit]

    This is the funniest and stupidest thing I've ever done.

    I wrote a program for a coworker about a year and a half ago. She wanted to restrict her kids' use of the computer to only when she permitted them to use it. So I wrote a completely fool-proof program that fills up the entire screen and has a password edit box and a "Shutdown" (the computer) button. When it's run it adds itself to the registry to run as a system service upon startup and it disallows any other programs from starting (including the start menu and the windows task manager [on winXP]) and isn't visible in the task manager [on win98].

    So, enter me yesterday morning. I was going through a folder of the dozens of programs I've written and came across that one. All of the other apps I ran wouldn't run because they were compiled using MFC as Shared libs instead of static so I had to recompile and rerun. Then I went and ran the locking program and it ran! Woohoo! Then I realized I didn't know the password (which was hardcoded into the app for simplicity's sake). So I tried what I thought was the password and every derivation of it with no success. This is happening on an XP box mind you. So I rebooted to log on with a different account figuring it wouldn't run, but it did. I tried a million different ways from the desktop to kill the program so I could just remove it from the registry or delete the executable, but to no avail.

    I finally decided to rip open my computer turn the master into the slave and stick an old drive in as the master so I could go in and modify the bastard. So I did that but the old drive had win98 on it and cannot access the NTFS drive! So I would have to install winXP on the temporary master to get control over the real master to fix the damned thing, but I don't have an XP install disk. Anyway I started downloading winXP last night with my laptop which I figured I would take to work and burn to a cd to boot my home PC with or borrow a copy from a friend (very inconvenient) if I'd have to.

    Fortunately I happened to put a copy of the finished program install package on this computer (my pc at work). So I opened up the exe in notepad and located the constants and voila there's the password! So, problem solved (I hope).

    Is there any other way aside from luckily finding the password around my program that you can think of? Do you think my switching hard drives and installing XP would work? Oh yeah, btw, I also tried to boot the real master with boot disks (which I had to download because I don't have any), but when I finally got to administrator password I realized I don't know my administrator password. What a moron.

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Doesn't XP have a console mode that you could boot up into to edit the registry/delete the file, etc?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Does it? That's news to me. I honestly amn't greatly knowledgable with XP's capabilities. If there is such a way, please enlighten me.

  4. #4
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    Quote Originally Posted by LuckY
    Does it? That's news to me. I honestly amn't greatly knowledgable with XP's capabilities. If there is such a way, please enlighten me.
    I would try booting in safe mode - depending on how it's in the registry it may not run on boot up then.
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  5. #5
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    How would you go about booting XP in safe mode? I am familiar with how to do it on 98 but how in XP?

    It is registered in RunServices so it might still start in safe mode.

  6. #6
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    >>It is registered in RunServices<<

    According to Microsoft KB RunServices does not work on NT/2K/XP/2K3. What is going on here?

    >>How would you go about booting XP in safe mode?<<

    I think you enter "safe mode" by pressing F8 before Windows starts.

    >>and it disallows any other programs from starting (including the start menu and the windows task manager [on winXP]) <<

    Can I ask how it does this?

    >>Is there any other way aside from luckily finding the password around my program that you can think of? <<

    If you have another xp computer handy:
    taskkill /s yourpc /u administrator /im yourprogram.exe

    You can also edit the registry remotely.

    ...but you'll need the administrator password. Come to think of it, without an administrator level password your computer is useless. You'll need to reformat and start again sooner or later anyway. (Or hack the computer to gain system or admin priviliges.)

    There is also a backup of the HKLM hive that is created when you first install windows but you'd need to reinstall all your programs. However, your settings, in HKCU, would remain.
    Last edited by anonytmouse; 03-29-2004 at 02:30 PM.

  7. #7
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    You can also recover the registry using this lengthy procedure:
    http://groups.google.com/groups?&hl=...ftngp07&rnum=1

    Once you've got to the point of having a basic but stable registry, you can boot up, then recover the pre-screw-up reg files from System Restore.

    You might also want to look through these
    http://www.theeldergeek.com/repairing_windows_xp.htm
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  8. #8
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039
    you shouldn't of programmed the app in the first place. you can use winxp's net feature to create times on the computer.

  9. #9
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Quote Originally Posted by Hammer
    You can also recover the registry using this lengthy procedure:
    http://groups.google.com/groups?&hl=...ftngp07&rnum=1
    That's what I was referring to. Unfortunately, I had to do this in Windows 2000, and the backup copy is of the registry even before the plug and play hardware is installed. Therefore if you don't have a restore point it can be a bit crappy. ...I'm off to make a restore point...

  10. #10
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Quote Originally Posted by anonytmouse
    >>It is registered in RunServices<<

    According to Microsoft KB RunServices does not work on NT/2K/XP/2K3. What is going on here?

    >>How would you go about booting XP in safe mode?<<

    I think you enter "safe mode" by pressing F8 before Windows starts.

    >>and it disallows any other programs from starting (including the start menu and the windows task manager [on winXP]) <<

    Can I ask how it does this?

    >>Is there any other way aside from luckily finding the password around my program that you can think of? <<

    If you have another xp computer handy:
    taskkill /s yourpc /u administrator /im yourprogram.exe

    You can also edit the registry remotely.

    ...but you'll need the administrator password. Come to think of it, without an administrator level password your computer is useless. You'll need to reformat and start again sooner or later anyway. (Or hack the computer to gain system or admin priviliges.)

    There is also a backup of the HKLM hive that is created when you first install windows but you'd need to reinstall all your programs. However, your settings, in HKCU, would remain.
    -You're right about the run services. The version I was looking at at work was before I just moved it into Run.
    -thanks for the tip. i need to know stuff like that
    -yes. it uses a system-wide hook that sends a message to the app whenever another application opens and then it sends a WM_CLOSE to it

  11. #11
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Quote Originally Posted by Xterria
    you shouldn't of programmed the app in the first place. you can use winxp's net feature to create times on the computer.
    Maybe I shouldn't "of" (should be "have"), but I needed to because the target machine was a 98 box at the time, so they could not take advantage of any XP features.

  12. #12
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039
    i love it when people correct my spelling it shows how ........ed they are

  13. #13
    Grammar Police HybridM's Avatar
    Join Date
    Jan 2003
    Posts
    355
    Actually that would be a grammar issue. :P
    Thor's self help tip:
    Maybe a neighbor is tossing leaf clippings on your lawn, looking at your woman, or harboring desires regarding your longboat. You enslave his children, set his house on fire. He shall not bother you again.

    OS: Windows XP
    Compiler: MSVC

  14. #14
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Quote Originally Posted by Xterria
    i love it when people correct my spelling it shows how ........ed they are
    It's interesting to see how people respond to being corrected, but in all truth I wasn't ........ed about anything. I mean, there wasn't even anything to be ........ed about if you wanna get right down to it. It is just perturbing (like sticking a needle in the eye) to be reading through a sentence and have an error that any even slightly educated person over the age of 13 (let alone a degree-holding scientist) would not make. Sort of how on the radio _every_ day I hear someone say, "I could care less." Argh! They might as well turn me over and take a dump in my ear.

    Quote Originally Posted by HybridM
    Actually that would be a grammar issue. :P
    Thank you for making this observation. Saves me the typing .

    While the semantics of your sentence may not be incorrect, syntax is everything in many situations.

  15. #15
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    So, getting back to the problem...
    Have you thought of asking your friend for the password (even if she doesn't use it anymore she might still remember).
    You could try using a LiveCD with GNU/Linux to read off the NTFS drive if you have one that's not very old.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 34
    Last Post: 02-26-2006, 01:16 PM
  2. Major Computer Problem
    By Olidivera in forum Tech Board
    Replies: 10
    Last Post: 07-15-2005, 11:15 AM
  3. Tabbed Windows with MDI?
    By willc0de4food in forum Windows Programming
    Replies: 25
    Last Post: 05-19-2005, 10:58 PM
  4. Computer will not boot.
    By RealityFusion in forum Tech Board
    Replies: 25
    Last Post: 09-10-2004, 04:05 PM
  5. Which distro should I run on my old computer?
    By joshdick in forum Tech Board
    Replies: 5
    Last Post: 04-09-2003, 01:37 AM