Preventing Dialogs from Interrupting ... Log Out | Topics | Search
Moderators | Edit Profile

X-Ways Support Forum » Advanced Features » Preventing Dialogs from Interrupting Scripts « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

winhexed
Username: winhexed

Registered: N/A
Posted on Saturday, Sep 22, 2007 - 17:16:   

I'm trying to run scripts similar to the one shown at the bottom of this message. The problem is that every time the first drive (that is, the first drive processed by the script) is finished by WinHex, it pops up a dialog saying something like "Unable to securely erase 3.6 MB out of 1.5 GB free space." This interrupts the script and prevents the next drive from being processed until I dismiss the dialog.

How can I prevent these dialogs from interrupting the script?

As you can see below, I am using the UseLogFile option.

UseLogFile
Turbo Off

Open C:
InitSlackSpace
InitMFTRecords
InitFreeSpace
CloseAll

Open D:
InitSlackSpace
InitMFTRecords
InitFreeSpace

Exit
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann
Username: admin

Registered: 1-2001
Posted on Tuesday, Sep 25, 2007 - 21:15:   

> How can I prevent these dialogs from interrupting the script?

That's not possible, I'm afraid.

In future versions, however, this warning will be output to the messages window instead when running a script, which was does require user interaction.

> As you can see below, I am using the UseLogFile option.

That has an effect on "Error #x" error message boxes only.
Top of pagePrevious messageNext messageBottom of page Link to this message

winhexed
Username: winhexed

Registered: N/A
Posted on Tuesday, Sep 25, 2007 - 23:11:   

Then I guess my workaround will be to call the NirCmd utility (nirsoft.net) from a command script (.CMD file) with these lines:

:start
for /f "tokens=1-3 delims=. " %%e in ('%SystemRoot%\system32\tasklist.exe /FI "imagename eq winhex.exe" /NH') do (set EXERunning=%%e.%%f)
if /i not "%EXERunning%"=="winhex.exe" goto :EOF
nircmd wait 5000
nircmd dlg "winhex.exe" "WinHex" click OK
goto :start

Thank you for the reply. I apologize for the inconvenience caused by that other message.
Top of pagePrevious messageNext messageBottom of page Link to this message

winhexed
Username: winhexed

Registered: N/A
Posted on Tuesday, Sep 25, 2007 - 23:41:   

Oops; I left out the "set EXERunning=" line immediately below :Start, which resets that variable.

Add Your Message Here
Post:
Username: Posting Information:
Only registered users may post messages here, i.e. you need to have an account.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:
Forum operated by X-Ways Software Technology AG.