So I'm trying something out and doing comparisons. Everything else works fine but when I use Ps1 to Exe by F2KO to get the running script's path, it returns something like this
C:\Users\justMe\AppData\Local\Temp\447F.tmp\4480.tmp\Test.ps1
I already tried using the code below but it returns the same AppData path.
$ScriptPath = (Split-Path -parent $MyInvocation.MyCommand.Definition) + "\Test.ps1"
Write-Host "Path: " $ScriptPath
Can anyone help out on this? Thanks.