Sign in to follow this  
Followers 0
Guest Calimero

USB-Stick detect and Format

6 posts in this topic

Hello

i need help

i need a scipt that detect my usb and format it.

and tell me the numer where the usb stick is

g:\ or .....

thx

Share this post


Link to post
Share on other sites



Hello

i need help

i need a scipt that detect my usb and format it.

and tell me the numer where the usb stick is

g:\ or .....

thx

<{POST_SNAPBACK}>

Go to the help file

go to the index tab

type in:

drive

read everything related to drives - like DriveGetType and DriveStatus

write some code

post your questions


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

i have the following

if the drive is NOT A: then exit script

if the drive($var) is everthing other thenrun thescript down here

Run ("RWTEST1 .......

$var = DriveGetDrive( "REMOVABLE" )

If NOT @error Then

MsgBox(4096,"", "Found " & $var[0] & " drives")

For $i = 1 to $var[0]

MsgBox(4096,"Drive " & $i, $var[$i])

Next

EndIf

Run ("RWTEST14_RD.exe")

winwait("RWTEST14 RD v0.4")

sleep("2000")

winactive("RWTEST14 RD v0.4")

send ("{DOWN}")

send ("$var")

send ("{TAB}")

send ("{SPACE}")

send ("{TAB}")

send ("{TAB}")

send ("{TAB}")

send ("{TAB}")

send ("{TAB}")

send ("2")

sleep("2000")

send ("{ENTER}")

Share this post


Link to post
Share on other sites

run the scipt but not with the drive A:

and how to format the usb stick?

have anyone an idea?

what parameter gives me the A: ??? var or i?? or what?

what display A: ???? at the msg box ?

thx

Share this post


Link to post
Share on other sites

run the scipt but not with the drive A:

and how to format the usb stick?

have anyone an idea?

what parameter gives me the A: ??? var or i?? or what?

what display A: ???? at the msg box ?

thx

<{POST_SNAPBACK}>

Okay, I'm confused.

Is the USB drive always going to be connected to drive A: when you run this script... so you do not need to "detect it"... you do not need to determine which drive letter to query if it is always on drive A: (maybe some other storages devices might be assigned drive A: at times) so maybe you just need to determine if there is something attached and if it is a USB drive. Perhaps that is what you meant by "detect it".

As for formatting - perhaps someone else out there is willing to test a RunWait (format) line on a USB drive and send you the info via Private Mail (PM). Once again, I see a real danger in posting code like this on the forum.

<deleted>

(I thought better of even posting my evil ideas for such code.)

@everyone,

Hmmm? Would you be able to run such code on a system running AntiVirus software that has some level of heuristics turned on?

I'll leave this one to the others in the forum......


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

the problem is solved

i need a script to delete "H:/"

not delte -> format H:/

and a script that delete a usbstick

but

DriveMapGet( "H:" )

doesn't works need another

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0