Jump to content

USB-Stick detect and Format


Guest Calimero
 Share

Recommended Posts

Guest Calimero

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

Link to comment
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]

Link to comment
Share on other sites

Guest Calimero

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}")

Link to comment
Share on other sites

Guest Calimero

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

Link to comment
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]

Link to comment
Share on other sites

Guest Calimero

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...