Fix diskpart script file not found error (WinError 2)
- Replace tempfile.NamedTemporaryFile with manual file creation in Windows temp directory - Use Windows TEMP/TMP environment variables for script location - Add file existence verification before running diskpart - Enhanced error handling for FileNotFoundError and subprocess errors - Robust cleanup that won't fail if file deletion fails - Add specific handling for diskpart exit code 2 (file not found) - Resolves '[WinError 2] the system cannot find the file specified' error
Showing
Please
register
or
sign in
to comment