Attached sample project creates 4 properties. Only the last one contains a space and has a trailing backslash.
Code: Select all
TEST1 = "C:\ProgramData"
TEST2 = "C:\ProgramData\"
TEST3 = "C:\Program Files"
TEST4 = "C:\Program Files\"
When passed to a PowerShell custom action, in property TEST4 the trailing backslash is used to escape the quote character which is introduced into the variable $test4.
Code: Select all
-test1 "[TEST1]" -test2 "[TEST2]" -test3 "[TEST3]" -test4 "[TEST4]"
Param($test1, $test2, $test3, $test4)
icacls $test1
icacls $test2
icacls $test3
icacls $test4
This causes an error running the command icacls for $test4.
FOLLOW US
Get the latest news in Application Packaging