adobe / UST-Install-Scripts

Scripts will help you install and configure Adobe's User Sync tool
MIT License
8 stars 6 forks source link

If UST installed in a folder with a space. Unable to run cert generation #3

Closed bhunut-adobe closed 6 years ago

bhunut-adobe commented 6 years ago

https://github.com/adobe/UST-Install-Scripts/blob/bc6bd6878d38798fe9577cddf88945c5263aa80a/UST_quick_install_windows.ps1#L696

Need to Add Escape quote. Something like this

$batchfile = "@`"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`" -NoProfile -InputFormat None -ExecutionPolicy Bypass -file `"$adobeIOCertScript`""

vossen-adobe commented 6 years ago

The path passed in is relative, so the entire UST directory can be moved around without breaking anything - it works as is for folders with spaces as long as the user has permission to write there. The trouble comes from the fact that you can't run as administrator via right click because the shell starts in system32, in which case the relative path cannot be followed.

vossen-adobe commented 6 years ago

The challenge is that there's no way to allow openssl to write in a restricted location such as program files without using right click -> run as administrator, which by nature requires a full path to the file to be specified, or by running the batch file from an admin shell. I'd like to avoid using a full path because it single handedly breaks the portability of the UST folder and would require a separate batch file for the offline bundle.

vossen-adobe commented 6 years ago

Fixed by workaround to set directory permissions. We still use relative path to maintain portability, but I have added the quotations as well for good measure.

https://github.com/adobe/UST-Install-Scripts/commit/16aa2ff5c3737c8c0d89d1566f2dc1d38b84110c