• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Snapin fails when arguments contain quotes

    Scheduled Pinned Locked Moved Unsolved
    Windows Problems
    3
    3
    460
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fogjam
      last edited by

      I have noticed that batch script snapins, that run correctly without quotes, fail when the snapin arguments include them.

      To test, I created a simple batch script snapin file with the code:

      set parameter="%~1"
      echo %parameter%
      

      and pass these parameters to it:
      0_1525885409164_TestScriptSnapin.png

      The snapin

      • fails when Snapin Arguments contain quotes: e.g. "FooBar" > c:\test.txt
        c:\test.txt is created empty and fog.log shows:
        5/9/2018 12:07 PM Middleware::Response Success
        5/9/2018 12:07 PM SnapinClient Running snapin Test Script
        5/9/2018 12:07 PM SnapinClient C:\Program Files (x86)\FOG\tmp\test.bat
        5/9/2018 12:07 PM SnapinClient Starting snapin
        5/9/2018 12:07 PM SnapinClient Snapin finished
        5/9/2018 12:07 PM SnapinClient Return Code: 1

      • succeeds when Snapin Arguments do not include quotes: FooBar > c:\test.txt
        c:\test.txt contains the echoed parameter FooBar and fog.log shows:
        5/9/2018 12:10 PM Middleware::Response Success
        5/9/2018 12:10 PM SnapinClient Running snapin Test Script
        5/9/2018 12:10 PM SnapinClient C:\Program Files (x86)\FOG\tmp\test.bat
        5/9/2018 12:10 PM SnapinClient Starting snapin
        5/9/2018 12:10 PM SnapinClient Snapin finished
        5/9/2018 12:10 PM SnapinClient Return Code: 0

      Another snapin attempt (to install Dymo Label Software) fails to run with the required arguments DLS8Setup.8.7.exe /S /V”/qn /norestart”, but succeeds when manually executing from the host’s command line.

      I can workaround this problem by writing these into the batch file, but it would be handy to simply pass parameters with quotes.

      My environment: FOG 1.4.4 on Centos 7, client 0.11.12 on Windows 10.

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • Wayne WorkmanW
        Wayne Workman
        last edited by

        Asking @joe-schmitt to take a look at this.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

        1 Reply Last reply Reply Quote 0
        • J
          Joe Schmitt Senior Developer
          last edited by

          @fogjam this is definitely not expected behavior, thanks for reporting it. I’ll look into it and post in this thread with my findings.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          204

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project