Skip to main content
spelling, capitalization consistency, syntax highlighting
Source Link
Ben N
  • 41.3k
  • 17
  • 147
  • 191
  • Disclaimer: The following procedure has made with over simplification so that normal user can understand. The mentioned articles are for enthusiasts. Other may skip those.

Normal Windows executables (Win32) preferably stores user configuration/log files in %LocalAppData% folder that is C:\Users\%USERNAME%\AppData\Local. But in Windows Universal Platform (UWP), that path is redirected to another which is C:\Users\%USERNAME%\AppData\Local\Packages\package_name. The package_name is specific for concerned UWP package. With this type of path redirection, the user configuration/log files are automatically deleted at time of uninstallation. Follow this article for further details.

Here are the path structures:

  • Installation Folder:

    • Normal app: C:\Program Files\
    • UWP app: C:\Program Files\WindowsApps\<Publisher Name>.<App Name>_<Version Code>_<Random String>
  • Local AppData Folder:

    • Normal app: C:\Users\<User Name>\AppData
    • UWP app: C:\Users\<User Name>\AppData\Local\Packages\<Publisher Name>.<App Name>_<Random String>

Now compare the following example with the above path structures. Ubuntu 18.04 from Windows Store installs in:

C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.427.0_x64__79rhkp1fndgsc

And the redirected Local AppData will be:

C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState

I've made a PowershellPowerShell script with which one can open that Linux rootfs (i.e. /) folder in File explorer. This uses Get-AppxPacakgeAppxPackage cmdlet to get the Appx package name. Copy the following lines in notepadinto Notepad and save it with .PS1ps1 extension (instead of .txt). Then run it in PowershellPowerShell.

$DistroName=Read-Host "Enter Distribution Name"
$pacakgeName = (Get-AppxPackage *$DistroName*).PackageFamilyName
$appData = [System.Environment]::ExpandEnvironmentVariables("%LocalAppData%")
$rootfs = $appData + "\Packages\" + $pacakgeName + "\LocalState\rootfs"
echo $rootfs
Invoke-Item $rootfs
Read-Host -Prompt "Press any key to continue..."
$DistroName=Read-Host "Enter Distribution Name"
$pacakgeName = (Get-AppxPackage *$DistroName*).PackageFamilyName
$appData = [System.Environment]::ExpandEnvironmentVariables("%LocalAppData%")
$rootfs = $appData + "\Packages\" + $pacakgeName + "\LocalState\rootfs"
echo $rootfs
Invoke-Item $rootfs
Read-Host -Prompt "Press any key to continue..."
  • Disclaimer: The following procedure has made with over simplification so that normal user can understand. The mentioned articles are for enthusiasts. Other may skip those.

Normal Windows executables (Win32) preferably stores user configuration/log files in %LocalAppData% folder that is C:\Users\%USERNAME%\AppData\Local. But in Windows Universal Platform (UWP), that path is redirected to another which is C:\Users\%USERNAME%\AppData\Local\Packages\package_name. The package_name is specific for concerned UWP package. With this type of path redirection, the user configuration/log files are automatically deleted at time of uninstallation. Follow this article for further details.

Here are the path structures:

  • Installation Folder:

    • Normal app: C:\Program Files\
    • UWP app: C:\Program Files\WindowsApps\<Publisher Name>.<App Name>_<Version Code>_<Random String>
  • Local AppData Folder:

    • Normal app: C:\Users\<User Name>\AppData
    • UWP app: C:\Users\<User Name>\AppData\Local\Packages\<Publisher Name>.<App Name>_<Random String>

Now compare the following example with the above path structures. Ubuntu 18.04 from Windows Store installs in:

C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.427.0_x64__79rhkp1fndgsc

And the redirected Local AppData will be:

C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState

I've made a Powershell script with which one can open that Linux rootfs (i.e. /) folder in File explorer. This uses Get-AppxPacakge cmdlet to get the Appx package name. Copy the following lines in notepad and save it with .PS1 extension (instead of .txt). Then run it in Powershell.

$DistroName=Read-Host "Enter Distribution Name"
$pacakgeName = (Get-AppxPackage *$DistroName*).PackageFamilyName
$appData = [System.Environment]::ExpandEnvironmentVariables("%LocalAppData%")
$rootfs = $appData + "\Packages\" + $pacakgeName + "\LocalState\rootfs"
echo $rootfs
Invoke-Item $rootfs
Read-Host -Prompt "Press any key to continue..."
  • Disclaimer: The following procedure has made with over simplification so that normal user can understand. The mentioned articles are for enthusiasts. Other may skip those.

Normal Windows executables (Win32) preferably stores user configuration/log files in %LocalAppData% folder that is C:\Users\%USERNAME%\AppData\Local. But in Windows Universal Platform (UWP), that path is redirected to another which is C:\Users\%USERNAME%\AppData\Local\Packages\package_name. The package_name is specific for concerned UWP package. With this type of path redirection, the user configuration/log files are automatically deleted at time of uninstallation. Follow this article for further details.

Here are the path structures:

  • Installation Folder:

    • Normal app: C:\Program Files\
    • UWP app: C:\Program Files\WindowsApps\<Publisher Name>.<App Name>_<Version Code>_<Random String>
  • Local AppData Folder:

    • Normal app: C:\Users\<User Name>\AppData
    • UWP app: C:\Users\<User Name>\AppData\Local\Packages\<Publisher Name>.<App Name>_<Random String>

Now compare the following example with the above path structures. Ubuntu 18.04 from Windows Store installs in:

C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.427.0_x64__79rhkp1fndgsc

And the redirected Local AppData will be:

C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState

I've made a PowerShell script with which one can open that Linux rootfs (i.e. /) folder in File explorer. This uses Get-AppxPackage cmdlet to get the Appx package name. Copy the following lines into Notepad and save it with .ps1 extension (instead of .txt). Then run it in PowerShell.

$DistroName=Read-Host "Enter Distribution Name"
$pacakgeName = (Get-AppxPackage *$DistroName*).PackageFamilyName
$appData = [System.Environment]::ExpandEnvironmentVariables("%LocalAppData%")
$rootfs = $appData + "\Packages\" + $pacakgeName + "\LocalState\rootfs"
echo $rootfs
Invoke-Item $rootfs
Read-Host -Prompt "Press any key to continue..."
Source Link
Biswapriyo
  • 11.3k
  • 10
  • 48
  • 80

  • Disclaimer: The following procedure has made with over simplification so that normal user can understand. The mentioned articles are for enthusiasts. Other may skip those.

Normal Windows executables (Win32) preferably stores user configuration/log files in %LocalAppData% folder that is C:\Users\%USERNAME%\AppData\Local. But in Windows Universal Platform (UWP), that path is redirected to another which is C:\Users\%USERNAME%\AppData\Local\Packages\package_name. The package_name is specific for concerned UWP package. With this type of path redirection, the user configuration/log files are automatically deleted at time of uninstallation. Follow this article for further details.

Here are the path structures:

  • Installation Folder:

    • Normal app: C:\Program Files\
    • UWP app: C:\Program Files\WindowsApps\<Publisher Name>.<App Name>_<Version Code>_<Random String>
  • Local AppData Folder:

    • Normal app: C:\Users\<User Name>\AppData
    • UWP app: C:\Users\<User Name>\AppData\Local\Packages\<Publisher Name>.<App Name>_<Random String>

Now compare the following example with the above path structures. Ubuntu 18.04 from Windows Store installs in:

C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2018.427.0_x64__79rhkp1fndgsc

And the redirected Local AppData will be:

C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState

I've made a Powershell script with which one can open that Linux rootfs (i.e. /) folder in File explorer. This uses Get-AppxPacakge cmdlet to get the Appx package name. Copy the following lines in notepad and save it with .PS1 extension (instead of .txt). Then run it in Powershell.

$DistroName=Read-Host "Enter Distribution Name"
$pacakgeName = (Get-AppxPackage *$DistroName*).PackageFamilyName
$appData = [System.Environment]::ExpandEnvironmentVariables("%LocalAppData%")
$rootfs = $appData + "\Packages\" + $pacakgeName + "\LocalState\rootfs"
echo $rootfs
Invoke-Item $rootfs
Read-Host -Prompt "Press any key to continue..."