Skip to content
Commit 57273887 authored by Stefy Lanza (nextime / spora )'s avatar Stefy Lanza (nextime / spora )
Browse files

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
parent 46fb0ab1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment