Reputation: 19
I am using this setup.exe to install the application by passing MSI parameters directly to the MSI via the command line:
setup.exe/s /v"/l*V installer.log INSTALLDIR="""C:\Program Files\Diagnostic manager""" INSTANCE=\"SD-WIN8-02\" REPOSITORY=\"Repository1\" SERVICEUSERNAME=\"SD-WIN8-02\testuser\" SERVICEPASSWORD="/7c2'==V@:~U-L%~*.Rv}CvBV'HHzyAq~'5NGA=" CLUSTERINSTALL=0 SETUPTYPE=Typical ApplicationUsers=AllUsers ALLUSERS=1 /qn"
I'm tackling an interesting challenge with the SERVICEPASSWORD parameter: it must support values containing spaces, double quotes, or both. Specifically, these four scenarios need to work seamlessly:
Simple, no double quotes
Example: /7c2'==V@:~U-L%~*.Rv}CvBV'HHzyAq~'5NGA=
Includes a double quote
Example: /7c2'==V@:~U-L%~*.Rv}CvB"V'HHzyAq~'5NGA=
Includes a space
Example: /7c2'==V@:~U-L%~*.Rv}CvB V'HHzyAq~'5NGA=
The Ultimate Test: Includes both a space and a double quote
Example: /7c2'==V@:~U-L%~*.Rv}CvB V'H"HzyAq~'5NGA=
I've found partial solutions:
(\")
works for scenario 2.(\"value\")
works for scenario 3.
But combining both for scenario 4 keeps failing, no matter what I try.The Big Question: How can I modify the parameter handling so all these scenarios are supported reliably? Is there a universal encoding or escaping trick I’m missing?
If you’ve faced a similar issue or have insights on parameter handling for special characters, your advice could be the key to solving this.
Failed Combination for password: /7c2'==V@:~U-L%~*.Rv}CvB V'H"HzyAq~'5NGA=
INPUT | Assumed Reason For Failure |
---|---|
"/7c2'==V@:~U-L%~*.Rv}CvB V'H\"HzyAq~'5NGA=" | space not handled, but, double quotes handled! |
\"/7c2'==V@:~U-L%~*.Rv}CvB V'H"HzyAq~'5NGA=\" | double quotes not handled; space handled |
\"/7c2'==V@:~U-L%~*.Rv}CvB V'H\\\"HzyAq~'5NGA=\" | double quotes not handled; space handled |
\"/7c2'==V@:~U-L%~*.Rv}CvB V'H""HzyAq~'5NGA=\" | double quotes not handled; space handled |
Upvotes: 1
Views: 28