$dirSupportFiles – not working

//$dirSupportFiles – not working
$dirSupportFiles – not working 2017-01-26T20:49:43+00:00

The Toolkit Forums General $dirSupportFiles – not working

  • Author
    Posts
  • Ashok
    Participant
    Post count: 6
    #1878 |

    Hi All,

    I’m probably doing something very stupid but the below doesn’t work when using $dirSupportFiles

    Execute-MSI -Action ‘Install’ -Path ‘DTEAxiom.msi’ -parameters ‘/QN REMOTECFG=”remote” CFG_FILE_PATH=”$dirSupportFiles\hosts.cfg” INSTALLLOCATION=”C:\Program Files (x86)\Intapp\Time\” SUPPORTEMAIL=”HelpDesk@Domain.com”‘

    i’ve tried putting the full UNC path and it works so i’m not sure what i’m doing wrong.

    Any help would be appreciated.

    Thanks!

    Ash

  • Matt
    Participant
    Post count: 11

    Escape the quotes. Put the symbol next to the 1 key in front of each double quote.

    Now I need to find the post that shows us kitties how to use the WP HTML editor effectively so I can show you exactly what you needed.

  • Ashok
    Participant
    Post count: 6

    Thanks Matt! i’m sure it would work if i could figure out what you mean.. haha

    I’ve tried every combination of ` + ” i can think of and still can’t get it to work.

    Ash

  • Patrik
    Participant
    Post count: 1

    Try using double quotations “” after -parameters instead of single ”.
    The $dirSupportFiles wont “expand” to the path otherwise

    Variable expansion in strings and here-strings

  • Ashok
    Participant
    Post count: 6

    unfortunately that doesn’t work 🙁

    Doing that encompasses “/QN REMOTECFG=” that making that the only parameter. I can always copy the file in a separate command if its not possible but its just bugging me that i can’t get it to work like this.

    Ash

  • Brian
    Participant
    Post count: 42

    The following code sample should work. If not can you send a sample of the log file in C:\Windows\Logs\Software

    https://postimg.org/image/vfla8lnar

  • Matt
    Participant
    Post count: 11

    Sorry, from http://ss64.com/ps/syntax-esc.html:

    The PowerShell escape character is the grave-accent.

    Switch your single quotes at the beginning and end to double quotes. Then put the grave accent immediately followed by a double quote. Don’t use the + symbol.

    • This reply was modified 9 months, 3 weeks ago by  Matt.
  • Ashok
    Participant
    Post count: 6

    Thanks! i used it correctly but missed the additional double quote at the end.. had `” instead of ‘”” which was needed.

  • Ashok
    Participant
    Post count: 6

    https://postimg.org/image/u7lxllhzb/

    that is what i did to get it working, i’m guessing Brian’s way would have worked also.

You must be logged in to reply to this topic.