Sign in to follow this  
Followers 0
penggilas2

How to get drive number..??

6 posts in this topic

#include <File.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

Global $hMain
$hMain = GUICreate('Recovery', 200, 70)
$GetDir = GUICtrlCreateButton('Get Drive', 10, 10, 150, 30, $SS_CENTER)
$gho = @ScriptDir & "\"
GUISetState()
While 1
    Switch GUIGetMsg()
        Case  $GUI_EVENT_CLOSE
            ExitLoop
        Case $GetDir
            $Dir = FileSelectFolder("Choose a folder.", "")
            Run("ghost32.exe -clone,mode=pload,src="& $gho &"Ghost.gho:1,dst="& $Dir &"-auto-sure")
    EndSwitch
WEnd

Get Error when Select drive M than error invalid target partition that mean error in src="& $gho &"

Than change dst="& $Dir &"-auto-sure" to dst=2:1-auto-sure ,because M in my kom is drive no 2 partition 1. ghost

restore normal no error.. so actually wrong not in src="& $gho &"

How to create script fileselectdrive..??

to get dst=M:-auto-sure without "\"

Or autoit to get drive number not dirve letter.. :)

Share this post


Link to post
Share on other sites



#include <File.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

Global $hMain
$hMain = GUICreate('Recovery', 200, 70)
$GetDir = GUICtrlCreateButton('Get Drive', 10, 10, 150, 30, $SS_CENTER)
$gho = @ScriptDir & "\"
GUISetState()
While 1
    Switch GUIGetMsg()
        Case  $GUI_EVENT_CLOSE
            ExitLoop
        Case $GetDir
            $Dir = FileSelectFolder("Choose a folder.", "")
            Run("ghost32.exe -clone,mode=pload,src="& $gho &"Ghost.gho:1,dst="& $Dir &"-auto-sure")
    EndSwitch
WEnd

Get Error when Select drive M than error invalid target partition that mean error in src="& $gho &"

Than change dst="& $Dir &"-auto-sure" to dst=2:1-auto-sure ,because M in my kom is drive no 2 partition 1. ghost

restore normal no error.. so actually wrong not in src="& $gho &"

How to create script fileselectdrive..??

to get dst=M:-auto-sure without "\"

Or autoit to get drive number not dirve letter.. :)

Why don't you just map a drive before you run the command?

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

Why don't you just map a drive before you run the command?

whether there is another way..?? without map drive..??

Share this post


Link to post
Share on other sites

whether there is another way..?? without map drive..??

When I need to map a drive for a process like imaging, i let the script do it for me. I put it in the script to map to any available drive using DriveMapAdd() or a specific letter if I want and process the script. Then I use DriveMapDel() when it's done. That's the easiest way I've done to do things.

I may have what you're trying to do wrong, but that is what I could understand.


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

When I need to map a drive for a process like imaging, i let the script do it for me. I put it in the script to map to any available drive using DriveMapAdd() or a specific letter if I want and process the script. Then I use DriveMapDel() when it's done. That's the easiest way I've done to do things.

I may have what you're trying to do wrong, but that is what I could understand.

Could you give me sample script DriveMapAdd() from your script..??

I will learn to improve my scrip..

Share this post


Link to post
Share on other sites

Hi, for All scripter..

please give me idea and Solution..

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