PS Script to convert a PS1 into a HTA that creates and executes a PS1
For one of my earlier posts I made a comment about creating a ps1 that is generated by a hta file and executed. Here is my shortcut script that I use to make the process a lot easier. Also the resulting hta file executes the powershell script in a non admin session and in the native OS architecture. So if you are running a 64bit OS it will make sure to run the 64bit Powershell even though the hta is running in 32bit mode. $a = Get-Content "c:\temp\original.ps1" $b = "c:\temp\original.hta" "<head>"| Out-File -FilePath $b "<title>Application Installation Helper Triggering Script- `${number}</title>"| Out-File -FilePath $b -Append "<HTA:APPLICATION "| Out-File -FilePath $b -Append "APPLICATIONNAME=""Application Triggering Script"""| Out-File -FilePath $b -Append "SCROLL=""yes"""| Out-File -FilePath $b -Append "SINGLEINSTANCE=""yes"...