Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to disable close "X" button in DOS  (Read 16235 times)

0 Members and 1 Guest are viewing this topic.

slab69

    Topic Starter


    Rookie

    How to disable close "X" button in DOS
    « on: April 13, 2009, 06:57:10 AM »
    I am running a script via dos at logon.  I would like to disable the close button so they can't just click the "X"   Is it possible to do so?

    Dias de verano

    • Guest
    Re: How to disable close "X" button in DOS
    « Reply #1 on: April 13, 2009, 08:30:17 AM »
    No.

    What does the script do?

    mroilfield



      Mentor
    • Thanked: 42
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 11
    Re: How to disable close "X" button in DOS
    « Reply #2 on: April 13, 2009, 08:31:59 AM »
    why would you want to?
    You can't fix Stupid!!!

    Dias de verano

    • Guest
    Re: How to disable close "X" button in DOS
    « Reply #3 on: April 13, 2009, 08:33:15 AM »
    why would you want to?

    That is what I am wondering.

    slab69

      Topic Starter


      Rookie

      Re: How to disable close "X" button in DOS
      « Reply #4 on: April 13, 2009, 10:39:00 AM »
      within the script, I am asking for user input with the results being sent to another pc within a log file.  I want to force them to enter the information during the logon process without allowing them to close the command window.

      mroilfield



        Mentor
      • Thanked: 42
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Experienced
      • OS: Windows 11
      Re: How to disable close "X" button in DOS
      « Reply #5 on: April 13, 2009, 10:46:02 AM »
      What kind of information are you needing some one to enter during the Log-in process.

      This sounds fishy to me.
      You can't fix Stupid!!!

      macdad-



        Expert

        Thanked: 40
        Re: How to disable close "X" button in DOS
        « Reply #6 on: April 13, 2009, 11:09:41 AM »
        I smell virus...Seems to be a kind of keylogger.
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        Helpmeh



          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: How to disable close "X" button in DOS
        « Reply #7 on: April 13, 2009, 04:55:30 PM »
        I smell virus...Seems to be a kind of keylogger.

        Modern countries practice "Innocent until proven guilty", but we also have the right to not help the OP if we don't feel like helping (for whatever reason).
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        macdad-



          Expert

          Thanked: 40
          Re: How to disable close "X" button in DOS
          « Reply #8 on: April 14, 2009, 06:22:20 AM »
          Modern countries practice "Innocent until proven guilty", but we also have the right to not help the OP if we don't feel like helping (for whatever reason).

          Common Sense, is that reason  ;)
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: How to disable close "X" button in DOS
          « Reply #9 on: April 14, 2009, 07:17:36 AM »
          what is this "innocent until proven guilty" stuff you keep saying helpmeh.

          The problem is the only proof of guilt would be after the damage is done- and even then we would never know, so they would keep coming back, "how do I delete all the users documents", "how do I copy  a file "keylog.txt" from C:\ to a removable USB drive that is hidden from explorer", etc etc, and we'd have to blithely assist them because, I mean- how the heck can that be construed as malicious! keylog.txt, as they would say, is a recipe, and the drive is hidden so it doesn't get formatted by accident!

          "Innocent Until Proven Guilty" in a court of law. This isn't a court of law. So I guess we have to blithely assume all posters are legitimate, even for requests like, "how do I start a program as a service that won't show up in the services control panel?" or "how can I make a appInit_DLL", until they are proven guilty in a court of law. At which point, once again, we wouldn't know.

          Going with this "innocent until proven guilty" would cause a LOT of liability issues for CH in the long run, when the completely inept malware writer points at CH where he asked various questions like "how can I force a service to stop" and "how do I write a winlogon notify hook".

          Sorry I just had to say some funny thread titles.
          I was trying to dereference Null Pointers before it was cool.

          Helpmeh



            Guru

          • Roar.
          • Thanked: 123
            • Yes
            • Yes
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 8
          Re: How to disable close "X" button in DOS
          « Reply #10 on: April 14, 2009, 04:39:26 PM »
          what is this "innocent until proven guilty" stuff you keep saying helpmeh.

          The problem is the only proof of guilt would be after the damage is done- and even then we would never know, so they would keep coming back, "how do I delete all the users documents", "how do I copy  a file "keylog.txt" from C:\ to a removable USB drive that is hidden from explorer", etc etc, and we'd have to blithely assist them because, I mean- how the heck can that be construed as malicious! keylog.txt, as they would say, is a recipe, and the drive is hidden so it doesn't get formatted by accident!

          "Innocent Until Proven Guilty" in a court of law. This isn't a court of law. So I guess we have to blithely assume all posters are legitimate, even for requests like, "how do I start a program as a service that won't show up in the services control panel?" or "how can I make a appInit_DLL", until they are proven guilty in a court of law. At which point, once again, we wouldn't know.

          Going with this "innocent until proven guilty" would cause a LOT of liability issues for CH in the long run, when the completely inept malware writer points at CH where he asked various questions like "how can I force a service to stop" and "how do I write a winlogon notify hook".

          Sorry I just had to say some funny thread titles.
          I mean, like we can't outright say that the OP is a skiddie malware writer (fail), but we can obviously choose to not help him/her.
          Where's MagicSpeed?
          Quote from: 'matt'
          He's playing a game called IRL. Great graphics, *censored* gameplay.

          slab69

            Topic Starter


            Rookie

            Re: How to disable close "X" button in DOS
            « Reply #11 on: April 20, 2009, 10:09:25 AM »
            LMAO  This is the first time I have been accused of being a virus writer, hacker, etc.   :)  I guess I can see how you may have thought so.

            I will give a brief explaination of what I am trying to do.  My dept does not have C# or any program writing software, so I am trying to write a little script using DOS until we have access to some software to do what we need.  what we are trying to accomplish is gather log in times and ask a simple question as to what "dept" they are in.  Once the user types in a response, the script simply sends a log entry with computername, time and date with the user's response to the question.  Once the user logs off, we have another script send log offf time and date along with the computername.  The reason we are doing all this is to circumvent the need to constantly ask our point of contacts for each classroom to send us their monthly usage. 
            With that being said, here is a sample of my script:
            @ echo off
            net use f: \\server01\d$
            cd\
            cls
            :start
            Set Unit=
            Echo For funding purposes, we need to know what Dept you are from
            Set /P Dept=Please enter dept ID 
            rem if /i %Dept% EQU "" goto start
            cls
            if "%Dept%"=="" (
            echo.
            echo Please enter your dept ID
            echo Please try again
            echo.
            goto start
            )
            Echo %Dept%, %computername%, %date%, %time%, Logon >>f:\test.txt


            I hope this helps clear up what I am trying to do and clear up the issue of the thinking that I am doing some type of keylogger.   :)

            gpl



              Apprentice
            • Thanked: 27
              Re: How to disable close "X" button in DOS
              « Reply #12 on: April 20, 2009, 10:48:35 AM »
              Wouldnt this information be held within the active directory ? and if not, why not

              Geek-9pm


                Mastermind
              • Geek After Dark
              • Thanked: 1026
                • Gekk9pm bnlog
              • Certifications: List
              • Computer: Specs
              • Experience: Expert
              • OS: Windows 10
              Re: How to disable close "X" button in DOS
              « Reply #13 on: April 20, 2009, 11:45:26 AM »
              Quote
              My dept does not have C# or any program writing software, so I am trying to write a little script using DOS until we have access to some software to do what we need.
              You can download a FREE version of Visual C from Microsoft for evaluation. You can put what you need in a simple GUI Windows. Even so, the savvy user can close it just like almost any kind of window.

              macdad-



                Expert

                Thanked: 40
                Re: How to disable close "X" button in DOS
                « Reply #14 on: April 20, 2009, 11:47:38 AM »
                or heck, just get FreeBasic or even QBASIC
                If you dont know DOS, you dont know Windows...

                Thats why Bill Gates created the Windows NT Family.