Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScratchDisk isnt set #307

Open
RacoonSN opened this issue Dec 27, 2024 · 3 comments
Open

ScratchDisk isnt set #307

RacoonSN opened this issue Dec 27, 2024 · 3 comments

Comments

@RacoonSN
Copy link

RacoonSN commented Dec 27, 2024

with Release of 05-06-24 see #308

runing as normal user gives this error:

PS D:\tiny11\tiny11builder-main> [cultureinfo]::CurrentUICulture = 'en-US' ; D:\tiny11\tiny11builder-main\tiny11maker.ps1 f
The variable cannot be validated because the value f: is not a valid value for the ScratchDisk variable.
At D:\tiny11\tiny11builder-main\tiny11maker.ps1:12 char:5
+     $ScratchDisk = $ScratchDisk + ":"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : MetadataError: (:) [], ValidationMetadataException
    + FullyQualifiedErrorId : ValidateSetFailure

Scratch disk set to f
Restarting Tiny11 image creator as admin in a new window, you can close this one.

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
     19       3      444       1976       0,02  10484   2 powershell

tiny11.log

@RacoonSN
Copy link
Author

also with Release of 05-06-24

running as admin user starts the making but gives serveral errors while creating, see attached.
tiny11.log

@edwpang
Copy link

edwpang commented Dec 31, 2024

Have exact same issue here, but sometimes it's OK. Pretty weird as similar code like below doesn't trigger this error:
$DriveLetter = $DriveLetter + ":"
BTW, it's better to stop the script if error occurs, otherwise getting unexpected results.

@edwpang
Copy link

edwpang commented Jan 5, 2025

Found the root cause:

param (
[ValidatePattern('^[c-zC-Z]$')]
[string]$ScratchDisk
)

The ValidatePattern is limiting the $ScratchDisk to a single letter from c-z or C-Z. Assigning to anything else causes the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants