Jump to content

Disappearing Drives


dminion
 Share

Recommended Posts

Hi,

This is the first time I've posted here and I'm having an issue with a script I'm writing. The purpose of the script is to identify and copy dvd's based on ini files in a program. everything seems to work fine unless there's a crc error or something during the copy process. If I cancel out of the script, the dvd drives vanish and don't reappear unless I hard boot the machine... I'm at a loss... can someone please help?

Thanks,

dminionDVD_Copy_01_11_06_0.au3

Link to comment
Share on other sites

  • Moderators

I'm assuming this is after you've started copying that the error is happening, and in that event when you click to exit the script, you haven't closed the 'Files' yet with FileClose(), have you tried to impliment that in your exit function yet?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I'm assuming this is after you've started copying that the error is happening, and in that event when you click to exit the script, you haven't closed the 'Files' yet with FileClose(), have you tried to impliment that in your exit function yet?

Do you mean the FileClose function for the error message? FileClose($copy_log_open)

Or a new FileClose() Function?

What exactly would that do?

Thanks,

dminion

Link to comment
Share on other sites

  • Moderators

Do you mean the FileClose function for the error message? FileClose($copy_log_open)

Or a new FileClose() Function?

What exactly would that do?

Thanks,

dminion

If you are using FileOpen/FileFindNextFile/FileFindFirstFile or a few others... they require you to use FileClose() to close whatever handle you used to open those options: So, $FileOpen = FileOpen() / I would have to use FileClose($FileOpen) ... let's say I am using 2 options:

$FileOpen = FileOpen('somepath and file')

; doing some stuff lahh dee dahhh

$SearchFiles = FileFindFirstFile('someother *.*')

Then I decide to exit without finishing my program... well I have not used FileClose() properly more than likely which could cause some issues, and on top of that, I need to setup a FileClose() for each handle...

So before I left my script, I would have to at least have already executed:

FileClose($FileOpen)

FileClose($SearchFiles)

Both of those.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

If you are using FileOpen/FileFindNextFile/FileFindFirstFile or a few others... they require you to use FileClose() to close whatever handle you used to open those options: So, $FileOpen = FileOpen() / I would have to use FileClose($FileOpen) ... let's say I am using 2 options:

$FileOpen = FileOpen('somepath and file')

; doing some stuff lahh dee dahhh

$SearchFiles = FileFindFirstFile('someother *.*')

Then I decide to exit without finishing my program... well I have not used FileClose() properly more than likely which could cause some issues, and on top of that, I need to setup a FileClose() for each handle...

So before I left my script, I would have to at least have already executed:

FileClose($FileOpen)

FileClose($SearchFiles)

Both of those.

Cool... I'll give those a shot. Do you think that would cause a drive to completely disappear from the system though? Like the drive was even gone from the device manager...

Thanks,

dminion

Link to comment
Share on other sites

  • Moderators

I've never seen nor heard of that to be honest dminion... I noticed your using a 3rd party app... maybe that has something to do with it, I really don't know... I'm just shooting in the dark because I can't run your script.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Cool... I'll give those a shot. Do you think that would cause a drive to completely disappear from the system though? Like the drive was even gone from the device manager...

Thanks,

dminion

sounds like you may be using virtual drives; daemon tools, alcohol, etc; your error could be caused by the third part app closing. example, you're copying from virtual G: and daemon tools sees that there is an error with the image while copying. daemon tools may automatically unload the image, or crash, and then your script would fail because your file or search handles would become invalid. that would also explain the unmounting of the drive. To test this, try to do what your script is doing manually. see if you don't get an error from windows or daemon tools (or whatever your virtual drive software is)
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...