in reply to Find device letter
You can tell Windows not to pop up that window:
BEGIN { if ($^O =~ /\bMSWin32\b|\bcygwin\b/) { require Win32::API; Win32::API->import(); Win32::API->Import('kernel32', 'SetErrorMode', 'I', 'I'); my $errormode = SetErrorMode(1); # fetch old error mode SetErrorMode(1 | $errormode); # no AbortRetryFail messages any +more }; }; # Now, Windows won't ask you to insert a drive into an empty device
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Find device letter {Win32API::File::SetErrorMode()}
by tye (Sage) on Mar 21, 2014 at 05:05 UTC |