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

    Multiple snap-ins with same file

    Scheduled Pinned Locked Moved
    General
    2
    3
    1.6k
    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.
    • R
      Raduz
      last edited by

      Hello,
      I have following question. I need to create four different snap-ins, with same executable, but different command line arguments. Is it possible to create a snap-in without an upload, just enter a path to an already existing file and specify command line args? I could probably create four snap-ins with custom executable names, upload some dummy files to the server, and then manually replace those dummies with soft (or hard, if necessary) links to the real executable, but I would like to avoid such hacks. Is there some legal way to do this? Thanks.
      (Sorry in case I’m asking an already answered question. I tried to search forums, but failed to find any info on this.)

      1 Reply Last reply Reply Quote 0
      • I
        ITSolutions Testers
        last edited by

        You could just create a CMD script with the commands you need to run and upload that as the snapin. You can either do one script with 4 commands or 4 scripts depending on how you need the tasks to run or if you ever need to run any of the commands separately. I personally put in a loop to check if the script has created a certain file before exiting, this helps with running commands in a certain order and letting the script rerun if it is interrupted.

        I am attaching an example of one of the scripts use as a template to make my snaips. Feel feel to use it and change it up, it is a good guide and starting point. Just make sure that you save it as either as .bat or .cmd before using.

        [url=ā€œ/_imported_xf_attachments/0/357_script.txt?:ā€]script.txt[/url]

        1 Reply Last reply Reply Quote 0
        • R
          Raduz
          last edited by

          Yes, that was another idea I have considered after posting my question - to use simple batch files for individual snap-ins, put the main executable on easily accessible samba share and manage different command line arguments from those batch files. Definitely a cleaner approach than my original symlinking idea šŸ™‚ Thanks a lot for your response, it definitely helped me to solve my problem.

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

          145

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright Ā© 2012-2024 FOG Project