I've got some powershell that connects to my server and returns an address to be passed to a batch file.
This batch file is a requirement, as it's an HTA/Batch Hybrid that allows me to run a created UI for the project. The URL is being passed as an iframe source to load some results from the server.
I have a variable $content in powershell, which equals http://example.com/selectMultiple.php?choice=[{"id":51,"p":100},{"id":52,"p":94}] (Slightly modified to protect my server address)
I then launch the batch file, while passing that $content variable to it like this
"Launching $content"
Start-Process "files\hybrid.bat" "$content"
In the batch file I have some code that echo's the value that was passed to it.
set "link=%~1"
echo %link%
But after being passed, some of the variable is trimmed. This echos http://example.com/selectMultiple.php?choice - which leads me to believe that there is something with the = sign that is breaking the string.
I've tried urldecode methods in powershell and from my server (php) and neither fixed the issue.
I am at a loss here and would much appreciate any help resolving this issue./
(I tagged PHP as well, to show that I do have the ability to work with the code that is returning the URL)
=-sign as a token separator just like the space; perhaps it helps when you useset "link=%*"in your batch file as you are passing only the link anyway...Start-Process "files\hybrid.bat" """$content"""note tripled double quotes.