Quotation marks in script parameters

Quest Kace SMA 10

How can I control quotation marks in script paramaters in an online kscript? I'm trying to create a SAS 9.4 renewal script that should look like this:

C:\Program Files\SASHome\SASRenewalUtility\9.4\sasrenew.exe-s :datafile:$(KACE_DEPENDENCY_DIR)\sid-94-WS-x64-2020.txt

But if I don't add quotes, the -s gets included in the quotes to come out like

"-s :datafile:$(KACE_DEPENDENCY_DIR)\sid-94-WS-x64-2020.txt

If I add quotes that I want, I get double quotes like this:
C:\Program Files\SASHome\SASRenewalUtility\9.4\sasrenew.exe with params -s :datafile:$(KACE_DEPENDENCY_DIR)\sid-94-WS-x64-2020.txt

Any tips for controlling? I don't have a sas installation to test on right now, so maybe the double quotes will work. Trying to get a test installation while I'm stuck doing remote work.


0 Comments   [ + ] Show comments

Answers (1)

Posted by: JordanNolan 9 months ago
9th Degree Black Belt

I have substituted double quotes for single quotes:

'C:\Program Files\SASHome\SASRenewalUtility\9.4\sasrenew.exe'-s ':datafile:$(KACE_DEPENDENCY_DIR)\sid-94-WS-x64-2020.txt'

If you are using the Launch a Program: event then it should look like this:

Directory: C:\Program Files\SASHome\SASRenewalUtility\9.4\
File: sasrenew.exe
Parameters:  -s ':datafile:$(KACE_DEPENDENCY_DIR)\sid-94-WS-x64-2020.txt'

Just curious about the format of your parameters.  Looks like you have a space between -s and the :datafile:  Should there be a space?

  • On second thought, you may also want to check your :datafile: format. I have a feeling you only need quotes for the PATH itself. Like this:

    -s :datafile:'$(KACE_DEPENDENCY_DIR)\sid-94-WS-x64-2020.txt'
    -s :datafile:"$(KACE_DEPENDENCY_DIR)\sid-94-WS-x64-2020.txt" - JordanNolan 9 months ago
    • Thanks. The example from SAS includes the :datafile in the quotes like this:

      "C:\Program Files\SASHome\SASRenewalUtility\9.4\SASRenew.exe" -s "datafile:c:\SAS Software Depot\sid_files\SAS94_order-number_site-number_host-platform.txt"

      I'll try the single quotes. - tpr 9 months ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ