You have '\\\4.'
in your string which created non-printable bytes for '\4'
using \ooo octal value escape sequence
. The digits are interpreted as octal numbers
.
The default \xhh
syntax is used to represent that value in hexadecimal.
You can rewrite your string something like this using raw string literal :
file_version_cmd = r"wmic datafile where name='C:\Program Files (x86)\Citrix\ICA Client\4.1\wfcrun32.exe'"
or
file_version_cmd = "wmic datafile where name='C:\\Program Files (x86)\\Citrix\\ICA Client\\4.1\\wfcrun32.exe'"
Both of the above code snippets will result in :
wmic datafile where name='C:\Program Files (x86)\Citrix\ICA Client\4.1\wfcrun32.exe'
Also, you can use forward slashes as well as most of the Windows APIs accept both types of slash separators in filename (If the filename path will be consumed by the python itself but may not work as expected otherwise) :
file_version_cmd = "wmic datafile where name='C:/Program Files (x86)/Citrix/ICA Client/4.1/wfcrun32.exe'"
You can refer to this documentation if you want to learn more about python lexical analyzer.