1.

Solve : how to check permissions??

Answer»

Hi all,

I need to check that write permission are available on a pen drive and keep looping untill they are.

Its basically a protected pen drive that will only allow access when the password has been entered so
i want to sit and wait untill the user enters the password and when they do (ie write permissions are available)
i want to copy files.

anyone any ideas on a loop that will continue to check permissions?

thanks

Sorry, but I don't understand what you are trying to do.....

How is the Flash Drive protected?

What are you trying to accomplish?Something fishy here! Such a scheme could be used for abuse. Surely if "the user", owner of a protected pen drive, having entered a password, wants to copy files on to that drive, they can (and should) arrange this for themselves? I cannot think of a legitimate reason for needing to do this.

Quote

want to sit and wait untill the user enters the password

You do, do you? I was going to ask why do you want to do this, Mister One Post, but on reflection whatever your reply MIGHT be I don't think we should provide a solution in view of the potential for abuse.


woooo, ok i can SEE where you guys are coming from but this isnt for malicious purposes.
I mean why would i of told you what i wanted to do if it was, i would of just made up some other crap.

The scenario is basically the user (which are many using the same key fob) insert the key and run a batch file.
the batch runs the keys log on program (kept on the key) and when the user enters the key fobs password the batch file
copies the up to date VERSION of files from a server to the fob.

Its just to simplify the copy process for the user and remove errors.

Its one of my FIRST batch programs hence the 1 post, cheers.Well, how do you think a person might check if a medium was write enabled?
Try writing to it and see if it is successful.
but i don't know how you do this in a batch file.

i have only really used .net so i don't know whats even possible using batch files, hence why i asked here.

you can use the && and || operators.

Hilarious!! what a friendly forum, think ill hang around.....
Quote from: BatchHelp2009 on March 27, 2009, 08:43:00 AM
Hilarious!! what a friendly forum, think ill hang around.....


It's a responsible forum. You didn't get what I was DRIVING at, did you? You might or might not have honest intentions, but this is a forum on the world wide web. That means if I wrote your script for you any dumb script kiddie can surf by and pick up a ready made script to flood pen drives with whatever he wants as soon as they become unprotected.

Anyway, with the transfer out of the user's control, how do you know they won't pull the pen drive out half way through and corrupt the filesystem?

Quote
I mean why would i of told you what i wanted to do if it was, i would of just made up some other crap.

Oh right! "If I was a liar I wouldn't be telling you the truth, I'd have made up some lie, so you see you've got to believe me."

"would of"
Quote from: BatchHelp2009 on March 27, 2009, 08:27:11 AM
i have only really used .net

Explains it all. Well, not really. I just wanted to pick on this.


Discussion

No Comment Found