I want to execute WinRAR.exe. The path of WinRAR is decided by a variable called $a. And I don't know how to correct the following code:
$a = "C:\Program Files\WinRAR"
$a\WinRAR.exe # this line raises an error
I can see the value of echo $a:
$a = "C:\Program Files\WinRAR"
echo $a # "C:\Program Files\WinRAR" is printed
And I'm sure that executing C:\"Program Files"\WinRAR\WinRAR.exe can launch WinRAR
Does anyone know why $a\WinRAR.exe is not working?
& "$a\WinRAR.exe"