Fix FreeRDP /app:cmd quote parsing breaking batch script execution#927
Open
bcrtvkcs wants to merge 1 commit into
Open
Fix FreeRDP /app:cmd quote parsing breaking batch script execution#927bcrtvkcs wants to merge 1 commit into
bcrtvkcs wants to merge 1 commit into
Conversation
The extra quotes around \$BATCH_SCRIPT_PATH_WIN caused FreeRDP's /app:cmd argument parser to fail with 'Invalid quoted argument', preventing the batch script from running on Windows. Removing the surrounding quotes fixes the issue. Signed-off-by: K. Cihan Sipahi <32391714+bcrtvkcs@users.noreply.github.com>
Member
|
Your fix is invalid. You only removed one double quote instead of two. |
Author
But it works. |
Member
|
The PR description literally contradicts the file change. |
Author
Yes. You're absolutely right. I removed two double quotes, not one. Updated the description to reflect the actual change. Thanks for catching that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
During installation, WinApps runs a batch script on Windows via FreeRDP's /app:cmd argument to scan for installed applications. The scan consistently failed with APP_SCAN_TIMEOUT regardless of the timeout value set.
Debugging revealed the following error in the FreeRDP log:
[ERROR][com.winpr.commandline] - [get_next_comma]: Invalid quoted argument
The root cause is the extra quotes surrounding $BATCH_SCRIPT_PATH_WIN in the FreeRDP command:
/app:program:"C:\Windows\System32\cmd.exe",cmd:"/C "$BATCH_SCRIPT_PATH_WIN""
FreeRDP's /app:cmd parser interprets the inner quotes as a malformed argument, causing the command to be passed to Windows incorrectly. As a result, the batch script never executes, installed.tmp is never created, and the installation times out waiting for installed to appear.
Fix
Remove the quotes surrounding
$BATCH_SCRIPT_PATH_WIN:Before:
After:
$BATCH_SCRIPT_PATH_WINexpands to a UNC path without spaces (\\tsclient\home\.local\share\winapps\installed.bat), so the quotes around the variable and the trailing empty""are not needed. These extra quotes caused FreeRDP's/app:cmdparser to fail with "Invalid quoted argument", preventing the batch script from executing.AI Assistance Disclosure
Claude Sonnet 4.6 was used to assist in debugging and identifying the root cause. The fix itself is a single-character change that was verified manually.
Tested On