Multiple snap-ins with same file



  • 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.)



  • 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.


  • Testers

    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]


Log in to reply
 

423
Online

39.3k
Users

11.0k
Topics

104.6k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.