Commit dfa43be
committed
Fix persistent FAT32 format failure: single-pass diskpart script (v3.2.2)
Fixes #49 — FAT32 format still failing on v3.2.0 despite automount disable
Root cause: The v3.1.9 automount fix used two separate diskpart processes
(Phase 1: create partition, Phase 2: format). automount disable only persists
within the diskpart session on some Windows 10 builds. Between Phase 1 exiting
and Phase 2 launching (~1.5s gap), Explorer re-acquired a handle on the raw
partition, causing the format to fail even with automount disabled.
Fix: Merged Phase 1 and Phase 2 into a single diskpart script that runs
clean → convert gpt → create partition → format fs=fat32 → assign in ONE
diskpart session. This eliminates the inter-process window entirely.
The single-pass script uses noerr on safe preliminary commands (clean, convert,
create) but NOT on the format command so failures still surface immediately
(preserving #38/#41 fix). Phase 2 remains as a fallback only if the single-pass
format step fails for other reasons (e.g. drive controller issue).1 parent 3dbfadc commit dfa43be
3 files changed
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
235 | 240 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | | - | |
176 | | - | |
| 175 | + | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
0 commit comments