Skip to content

Conversation

@CodingWonders
Copy link
Contributor

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Hotfix
  • UI/UX improvement

Description

Apparently special characters in the user path cause %TEMP% to go to the older, crappier, DOS style (8.3). More here: https://devblogs.microsoft.com/oldnewthing/20041224-00/?p=36893.

Anyway, this should be fixed now.

NOTE THAT YOU MAY SEE ADDITIONAL FILES THAT HAVE NOTHING TO DO WITH MICROWIN. This is normal because indentation produced by changes hasn't been normalized to spaces. Simply ignore.

I mark it as a draft because I have to test it.

Issue related to PR

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.

Apparently special characters in the user path cause %TEMP% to go to the older, crappier, DOS style (8.3)
@agadiffe
Copy link

agadiffe commented Feb 2, 2026

according to the linked issue, the error occured in line 139:

if ($importDrivers) {
    Write-Host "Exporting drivers from active installation..."
    if (Test-Path "$env:TEMP\DRV_EXPORT") {
        Remove-Item "$env:TEMP\DRV_EXPORT" -Recurse -Force
    }

In Invoke-Microwin.ps1:
There is 7 mentions of $env:TEMP between 139 and 161.
4 more between 292 and 306.
And the one you fixed line 562.

In Invoke-MicrowinGetIso.ps1:
You missed:
$fidopath, line 61 & 67.
and also line 90 & 149,

ctrl+f is your friend :)

@CodingWonders
Copy link
Contributor Author

Weird... I thought I had replaced all the occurrences. I did use CTRL+F, maybe it was a filter

@github-actions github-actions bot added the bug Something isn't working label Feb 3, 2026
@agadiffe
Copy link

agadiffe commented Feb 3, 2026

some update:
not all cmdlet are affected, but as a good measure, I would not use $env:TEMP at all. (as you did)
e.g. Test-Path is not affected.
I made a new comment here: #3970 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ISO creation failure

2 participants