Question

  • Creator
    Topic
  • #4283744

    Batch file needed for USB write and read only.

    by jobsp90 ·

    I have a requirement for a office purpose. I want to give a usb pendrive write protected and read only permission, for any system I connect, the data shoudnt get deleted anytime in the pendrive. So I know through dispart from cmd we can do this but can anyone help me to create a batch file so the user (non IT) can do it from their own pc without any fuss just by clicking the batch file shortcut rather than typing the commands from command prompy dispart. So pls help me.

You are posting a reply to: Batch file needed for USB write and read only.

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our Community FAQs for details. All submitted content is subject to our Terms of Use.

All Answers

  • Author
    Replies
    • #4283747
      Avatar photo

      How would users get data on the pen drives if it’s read only?

      by rproffitt ·

      In reply to Batch file needed for USB write and read only.

      Something’s off in the specifications here.

      • #4283749

        Reply To: Batch file needed for USB write and read only.

        by jobsp90 ·

        In reply to How would users get data on the pen drives if it’s read only?

        Actually after copying the data to pendrive only batch file should run, then no one should be able to modify the contents in the usb drive.

        • #4283754
          Avatar photo

          Who is “no one”?

          by rproffitt ·

          In reply to Reply To: Batch file needed for USB write and read only.

          Keep in mind that if I plug that drive into my PC it doesn’t OBEY those settings. I can format the drive, delete files, edit and so on because my PC is on Linux. Windows “permissions” are not recognized there.

          I’ve read such requests before and it’s always someone new in the IT group. You try to be gentle as they are learning how things actually work.

    • #4283750
      Avatar photo

      Reply To: Batch file needed for USB write and read only.

      by kees_b ·

      In reply to Batch file needed for USB write and read only.

      A batchfile is a text-file (can be made in Notepad) with exactly the commands you type in cmd), en ends with a line containing exit.

      The complication is that you include the drive-letter you type in the batchfile.
      The easy solution is to make different batchfiles for d:, e:, f: and so on.
      A somewhat more difficult solution is to ask the user to type it and use his answer. Use echo to ask the user to type something, then set to set a parameter and then encolose it in two %-characters to use it.

      However, anybody can see that batch-file, so anybody can undo it and then change the data. So I wonder if it’s the best way to ensure the integrity of the data the user typed. It might be better to use a password protected website to enter the data to.

      • This reply was modified 3 months, 1 week ago by Avatar photokees_b.
      • This reply was modified 3 months, 1 week ago by Avatar photokees_b.
Viewing 1 reply thread