/build/static/layout/Breadcrumb_cap_w.png

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.

Thanks.



0 Comments   [ + ] Show comments

Answers (1)

Posted by: JordanNolan 4 years ago
10th Degree Black Belt
0

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?



Comments:
  • 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'
    or
    -s :datafile:"$(KACE_DEPENDENCY_DIR)\sid-94-WS-x64-2020.txt" - JordanNolan 4 years 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 4 years 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

Share

 
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