Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_meta is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Windows Sandbox: il trucco segreto per installare le app Microsoft Store | IlSoftware.it

Windows Sandbox: il trucco segreto per installare le app Microsoft Store

Windows Sandbox offre un ambiente temporaneo e isolato per testare applicazioni senza rischiare di compromettere il sistema principale. Sebbene il Microsoft Store non sia incluso di default, è possibile installarlo usando uno script PowerShell.

Progettato per eseguire applicazioni in completa sicurezza senza rischiare di compromettere il sistema principale, Windows Sandbox è un ambiente isolato e temporaneo integrato in Windows 10 e Windows 11. Ogni volta che si avvia la sandbox, questa crea un’istanza pulita del sistema operativo, completamente separata dall’host, permettendo di testare software sconosciuto, aprire file sospetti o sperimentare configurazioni senza conseguenze.

L’importanza di Windows Sandbox risiede nella capacità di proteggere dati e applicazioni principali, riducendo drasticamente i rischi legati a malware, virus o software instabile, e rappresenta uno strumento essenziale per sviluppatori, professionisti IT e utenti attenti alla sicurezza. Anzi, con Windows 11 24H2, Windows Sandbox diventa ancora più utile e completo.

Aggiornamenti recenti e investimenti su Windows Sandbox

A partire da Windows 11 24H2, Microsoft ha rilasciato una nuova versione di Windows Sandbox. L’esperienza d’uso risulta migliorata grazie all’adozione di WinUI 3, un’interfaccia moderna basata sul sistema di progettazione Fluent. Inoltre, sono state introdotte nuove funzionalità come il reindirizzamento degli appunti, il controllo dell’input audio/video e la condivisione di cartelle direttamente durante l’esecuzione, senza la necessità di un file di configurazione predefinito.

Microsoft ha reso Windows Sandbox un progetto open source su GitHub, incoraggiando la comunità a contribuire al suo sviluppo. Gli sviluppatori possono così partecipare attivamente al miglioramento delle funzionalità, puntando su trasparenza e collaborazione.

Windows Sandbox non permette l’installazione di app dal Microsoft Store… sulla carta

Nella documentazione ufficiale Microsoft sull’uso di Windows Sandbox è chiaramente esplicitato che le app già presenti sul sistema host (come Microsoft Store, Blocco Note, ecc.) non sono supportate all’interno dell’ambiente isolato. È tuttavia possibile installare app tramite un file .appx, se lo si possiede.

In ogni caso, il Microsoft Store non è presente all’interno di Windows Sandbox, pertanto non è possibile utilizzarlo per scaricare e avviare applicazioni.

Come aggiungere Microsoft Store in Windows Sandbox

Uno sviluppatore indipendente, ThioJoe, spiega su GitHub che è possibile installare Microsoft Store in qualsiasi Windows Sandbox usando un semplice trucco.

Lo script Install-Microsoft-Store.ps1, scaricabile ed avviabile con i diritti di amministratore nella sandbox, consente di richiedere l’installazione del Microsoft Store scaricando i file necessari direttamente dai server Microsoft.

A differenza di altri script simili, non utilizza strumenti esterni come UUP Dump o RG-Adguard: tutte le richieste Web puntano direttamente ai server Microsoft.

Il codice PowerShell controlla innanzi tutto l’esecuzione all’interno della Windows Sandbox (utente “WDAGUtilityAccount“). Se non si è nella sandbox, avvisa che l’installazione avverrà nel sistema corrente e chiede conferma.

Dal punto di vista tecnico, per effettuare il download di Microsoft Store, richiede un cookie di autenticazione tramite una chiamata SOAP. Utilizza quindi il cookie per sincronizzare e ottenere una lista di pacchetti disponibili (Microsoft Store e dipendenze). Per ogni pacchetto individuato, lo script richiede quindi l’URL diretto per scaricare il file.

Nel file, in corrispondenza di Set-ItemProperty -Path $geoKeyPath -Name "Nation" -Value "244" si può sostituire il valore 244 (USA) con 118 (Italia) per modificare la regione geografica di riferimento. Allo stesso modo, alla riga Set-ItemProperty -Path "HKCU:\Control Panel\International\Geo" -Name "Name" -Value "US", il valore US va sostituito con IT.

Installazione di Winget e librerie Microsoft Visual C++

Sempre in questo repository GitHub, nella cartella “Installer Scripts“, si trovano due script che permettono, rispettivamente, di abilitare l’utilizzo del gestore di pacchetti Microsoft Winget (Install-Winget.ps1) e di installare le ultime versioni delle librerie Microsoft Visual C++ (Install VC Redist.ps1).

Basato su riga di comando, Winget consente di installare un ampio catalogo di applicazioni, non soltanto quelle pubblicate sul Microsoft Store, ma anche normali programmi Win32, disponibili sui siti Web dei rispettivi sviluppatori.

Per installare programmi in Windows da riga di comando con Winget, basta tenere a mente una sintassi molto semplice. Non solo. Il package manager Winget può essere sfruttato anche per aggiornare automaticamente tutti i programmi installati o rimuoverli all’occorrenza.

Configurazione automatizzata della Windows Sandbox

Come abbiamo spiegato nell’articolo citato in apertura, la validità della Windows Sandbox è limitata solo ed esclusivamente alla sessione di lavoro corrente. Una volta chiusa la finestra della Windows Sandbox, tutto il contenuto sarà definitivamente perduto e nessuna modifica sarà conservata sul sistema host.

Lo script SandboxStartup.ps1 è progettato per essere eseguito automaticamente all’avvio della sandbox, applicando numerose configurazioni avanzate tramite modifiche al registro e impostazioni di sistema:

  • Abilita il vecchio menu contestuale di Windows.
  • Mostra file nascosti ed estensioni dei file in Esplora file.
  • Aggiunge opzioni contestuali “Apri PowerShell qui” e “Apri CMD qui”.
  • Integra .txt e .ps1 nel menu contestuale “Nuovo”.
  • Imposta la policy di esecuzione PowerShell per consentire l’esecuzione degli script, anche con doppio clic.
  • Se Notepad o Notepad++ sono presenti nella cartella condivisa con l’host, aggiunge opzioni di modifica contestuali e li imposta come editor predefinito per i file .txt.
  • Riavvia Esplora file per applicare le modifiche e apre automaticamente la cartella condivisa.

Come usare SandboxStartup.ps1

Per eseguire lo script automaticamente all’avvio della Windows Sandbox, è sufficiente creare una cartella host apposita, ad esempio:

C:\Users\NomeUtente\MySharedSandboxFolder

Lo sviluppatore mette a disposizione un file di configurazione .wsb (MyDefaultSandbox.wsb) sfruttabile per creare e avviare una sandbox con parametri personalizzati attraverso un semplice doppio clic. Dopo aver scaricato il file .wsb da qui, è possibile aggiornare il parametro <HostFolder> con il percorso della cartella appena creata:

<HostFolder>C:\Users\NomeUtente\MySharedSandboxFolder</HostFolder>

Copiando il file SandboxStartup.ps1 nella cartella mappata sul sistema host, lo script PowerShell sarà automaticamente eseguito a ogni avvio della Windows Sandbox tramite file MyDefaultSandbox.wsb.

È eventualmente possibile personalizzare ulteriori parametri nel file .wsb, come la quantità di RAM assegnata alla Windows Sandbox.

L’esecuzione automatica dello script è richiesta grazie alla presenza della seguente riga nel file .wsb:

<Command>powershell -executionpolicy Bypass -command "start powershell {-file C:\Users\WDAGUtilityAccount\Desktop\HostShared\SandboxStartup.ps1 -launchingSandbox}"</Command>

È ovviamente possibile aggiungere altre istruzioni simili personalizzando il caricamento della sandbox a proprio piacimento.

Ti consigliamo anche

Link copiato negli appunti