1

I'm doing as admin:

$Base64 = "base64 app"
$Content = [System.Convert]::FromBase64String($Base64)
Set-Content -Path "%LOCALAPPDATA%\Microsoft\Windows\" -Value $Content -Encoding Byte

but I'm getting this error

Set-Content : It was not possible to find a part of the path 'C:\WINDOWS\system32\%LOCALAPPDATA%\Microsoft\Windows\'.
At line:1 char:1
+ Set-Content -Path "%LOCALAPPDATA%\Microsoft\Windows\" -Value $Content ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\WINDOWS\syst...rosoft\Windows\:String) [Set-Content], DirectoryNotFo
   undException
    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand

What am I doing wrong here and how can this be done?

marzo
  • 11
  • 2

0 Answers0