Following instructions gives errors, starting with a scratchdisk error
Instructions say to run the script (after running Set-ExecutionPolicy unrestricted) and that you will be prompted for where the ISO is mounted.
Doing so generates 52 lines of error, the captured output is below:
The output is below, but the formatting is a bit off due to markup:
`The variable cannot be validated because the value D:\users\jbb\Downloads\Tiny-11\tiny11builder-main is not a valid value for the ScratchDisk variable. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11maker.ps1:10 char:5
-
$ScratchDisk = $PSScriptRoot -replace '[\\]+$', '' -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : MetadataError: (:) [], ValidationMetadataException
- FullyQualifiedErrorId : ValidateSetFailure
Scratch disk set to New-Object : Cannot create type. Only core types are supported in this language mode. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11maker.ps1:30 char:13
- $adminSID = New-Object System.Security.Principal.SecurityIdentifier(" ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : PermissionDenied: (:) [New-Object], PSNotSupportedException
- FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
You cannot call a method on a null-valued expression. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11maker.ps1:31 char:1
- $adminGroup = $adminSID.Translate([System.Security.Principal.NTAccoun ...
-
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull
Cannot invoke method. Method invocation is supported only on core types in this language mode. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11maker.ps1:32 char:1
- $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent( ...
-
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage
new-object : Cannot create type. Only core types are supported in this language mode. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11maker.ps1:33 char:21
- ... wsPrincipal=new-object System.Security.Principal.WindowsPrincipal($my ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : PermissionDenied: (:) [New-Object], PSNotSupportedException
- FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
You cannot call a method on a null-valued expression. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11maker.ps1:35 char:5
- if (! $myWindowsPrincipal.IsInRole($adminRole))
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
Transcript started, output file is \tiny11.log Cannot set property. Property setting is supported only on core types in this language mode. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11maker.ps1:50 char:1
- $Host.UI.RawUI.WindowTitle = "Tiny11 image creator"
-
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertySetterNotSupportedInConstrainedLanguage
`
Hi mate ! I think your execution-police was not well taken.
New-Object : Cannot create type. Only core types are supported in this language mode.
At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11maker.ps1:30 char:13
$adminSID = New-Object System.Security.Principal.SecurityIdentifier(" ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : PermissionDenied: (:) [New-Object], PSNotSupportedException
FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
Try :
Set-ExecutionPolicy -Scope Process Unrestricted
Accept the change then :
Get-ExecutionPolicy
Verify that the output is 'Unrestricted' before calling the script.
Plus, the parameter is not the mounted iso, it's the working directory of Tiny11. But that's not a big issue as he takes script root folder if value is not valid (and yes mounted iso is an invalid value 😉)
Only thing I did differently was doing the Get-ExecutionPolicy, got different output:
Output here: `PS D:\users\jbb\Downloads\Tiny-11\tiny11builder-main> Set-ExecutionPolicy -Scope Process Unrestricted
Execution Policy Change The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y PS D:\users\jbb\Downloads\Tiny-11\tiny11builder-main> Get-ExecutionPolicy Unrestricted PS D:\users\jbb\Downloads\Tiny-11\tiny11builder-main> dir
PS D:\users\jbb\Downloads\Tiny-11\tiny11builder-main> .\tiny11Coremaker.ps1 New-Object : Cannot create type. Only core types are supported in this language mode. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11Coremaker.ps1:17 char:13
- $adminSID = New-Object System.Security.Principal.SecurityIdentifier(" ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : PermissionDenied: (:) [New-Object], PSNotSupportedException
- FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
You cannot call a method on a null-valued expression. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11Coremaker.ps1:18 char:1
- $adminGroup = $adminSID.Translate([System.Security.Principal.NTAccoun ...
-
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull
Cannot invoke method. Method invocation is supported only on core types in this language mode. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11Coremaker.ps1:19 char:1
- $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent( ...
-
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : MethodInvocationNotSupportedInConstrainedLanguage
new-object : Cannot create type. Only core types are supported in this language mode. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11Coremaker.ps1:20 char:21
- ... wsPrincipal=new-object System.Security.Principal.WindowsPrincipal($my ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : PermissionDenied: (:) [New-Object], PSNotSupportedException
- FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand
You cannot call a method on a null-valued expression. At D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11Coremaker.ps1:22 char:5
- if (! $myWindowsPrincipal.IsInRole($adminRole))
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
Transcript started, output file is D:\users\jbb\Downloads\Tiny-11\tiny11builder-main\tiny11.log Welcome to tiny11 core builder! BETA 05-06-24 This script generates a significantly reduced Windows 11 image. However, it's not suitable for regular use due to its lack of serviceability - you can't add languages, updates, or features post-creation. tiny11 Core is not a full Windows 11 substitute but a rapid testing or development tool, potentially useful for VM environments. Do you want to continue? (y/n)
`
Other than the initial errors shown above, it does now appear to be working, will update when it's complete
It finally finished,I dont think it's good, given that there is a 110k log file with lots of errors, see attached:
Log file is zipped for upload
Hi,
My bad, haven't be attentive in my previous response.
You can verify your LanguageMode. This will output your actual one :
$ExecutionContext.SessionState.LanguageMode
To set the LanguageMode if not :
$ExecutionContext.SessionState.LanguageMode = "FullLanguage"
This will let you use the New-Object cmdlet that is disable when setted to : NoLanguage
Hi, I solved it using this link. It gave me the same errors too.
https://github.com/ntdevlabs/tiny11builder/pull/335
Hi @KeyMan98
I'm not sure to understand, when you tried tiny11maker.ps1 you get the error
Cannot create type. Only core types are supported in this language mode.
But #335 let you create the ISO ?
Hi @KeyMan98
I'm not sure to understand, when you tried tiny11maker.ps1 you get the error
Cannot create type. Only core types are supported in this language mode.But #335 let you create the ISO ?
Hi, I didn't save the log but before using the GUI version, it just gave me errors at every step (starting, scratchdisk, deleting registry keys and other errors).The policy was set to unrestricted and language was set to "FullLanguage". The GUI script did not generate any errors and the ISO file worked fine.
Yosh!
Ah... that’s not it :/ So I am unable to find the problem, I do not understand where they come from... There’s probably something I missed... i'm curious, if someone have the explain, i'll gladly hear it.
On the other hand I am happy to hear that my GUI has solved this, the only thing is that I do not understand why the hell it worked ^^
I'm having the same error when I start tiny11maker.ps1. Unfortunately having hard time copy pasting since the ps1 starts, error comes up and then the process clears the screen of the powershell window.
The variable cannot be validated because the value D:\Downloads\Tiny11Builder\tiny11builder-main is not a valid value for the ScratchDisk variable. At D:\Downloads\Tiny11Builder\tiny11builder-main\tiny11maker.ps1:10 char:5
-
$ScratchDisk = $PSScriptRoot -replace '[\\]+$', '' -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : MetadataError: (:) [], ValidationMetadataException
- FullyQualifiedErrorId : ValidateSetFailure
Hi @40P3 Did you run the script further ?
This error is not critical. If you didn't specify a scratch disk it will take the root dir.
In your case D:
Hi @40P3 Did you run the script further ?
This error is not critical. If you didn't specify a scratch disk it will take the root dir. In your case
D:
Hi,
Thanks for your reply. No I didn't contonue, because there are lot of errors, like permission error when trying to "access" some stuff on the installer, so I wasn't confortable with it. See my error log here: https://github.com/ntdevlabs/tiny11builder/issues/390 I'm not confortable creating a system disk with so many errors that I got no clue what those are but permission errors sounds serious to me, lol.
Hi mate !
Your logs says that you used PowerShell_Ise.
Can you try it with PowerShell 5.1 ?
I think this is the point for your permissons errors
You can even try my new PR Merged-PR-tiny11maker.ps1 if you want. I've made some modification to the script for better usability.