Jump to content

Recommended Posts

Posted (edited)

hi ,

I want to get drive information.

This script run well :

$var = DriveGetDrive( "all" )

If NOT @error Then

For $i = 1 to $var[0]

$variable = DriveGetLabel( $var[$i] )

if $variable = "sauvegarde" then

MsgBox(4096,"INFO","Drive " & $var[$i] & "->" & $variable)

endif

Next

EndIf

But when i want to get drive letter i have a problem to execute script

Dim $monlecteur

$var = DriveGetDrive( "all" )

If NOT @error Then

For $i = 1 to $var[0]

$variable = DriveGetLabel( $var[$i] )

if $variable = "sauvegarde" then

MsgBox(4096,"INFO","Drive " & $var[$i] & "->" & $variable)

$monlecteur = $var[$i]

MsgBox(4096,"INFO","Drive " $MonLecteur)

endif

Next

EndIf

Thank you.h

Edited by alucard
Posted

hi ,

I want to get drive information.

This script run well :

$var = DriveGetDrive( "all" )

If NOT @error Then

    For $i = 1 to $var[0]

        $variable = DriveGetLabel( $var[$i] )

        if $variable = "sauvegarde" then

        MsgBox(4096,"INFO","Drive " & $var[$i] & "->" & $variable)

        endif

   

    Next

EndIf

But when i want to get drive letter i have a problem to execute script

Dim $monlecteur

$var = DriveGetDrive( "all" )

If NOT @error Then

    For $i = 1 to $var[0]

        $variable = DriveGetLabel( $var[$i] )

        if $variable = "sauvegarde" then

        MsgBox(4096,"INFO","Drive " & $var[$i] & "->" & $variable)

        $monlecteur = $var[$i]

        MsgBox(4096,"INFO","Drive " $MonLecteur)

       

        endif

   

    Next

EndIf

Thank you.h

<{POST_SNAPBACK}>

Hmm the only problem i could see was the last msgbox, you forgot an "&"

$var = DriveGetDrive( "all" )
If NOT @error Then
For $i = 1 to $var[0]
$variable = DriveGetLabel( $var[$i] )
if $variable = "sauvegarde" then
MsgBox(4096,"INFO","Drive " & $var[$i] & "->" & $variable)
endif

Next
EndIf



Dim $monlecteur
$var = DriveGetDrive( "all" )
If NOT @error Then
For $i = 1 to $var[0]
$variable = DriveGetLabel( $var[$i] )
if $variable = "sauvegarde" then
MsgBox(4096,"INFO","Drive " & $var[$i] & "->" & $variable)
$monlecteur = $var[$i]
MsgBox(4096,"INFO","Drive "  & $MonLecteur)

endif

Next
EndIf

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
  • Recently Browsing   0 members

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