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

    SnapIn How-to questions in regards to hosts file.

    Scheduled Pinned Locked Moved Unsolved
    Windows Problems
    3
    3
    942
    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.
    • AngryScientistA
      AngryScientist
      last edited by

      Server
      • FOG Version: 1.3.0 RC 21
      • OS: Centos7
      Client
      • Service Version: 0.11.5
      • OS: Windows7
      Description

      I read through the Wiki on SnapIns and there is no clear guide on how to create them. I appeal to your collective expertise. How would I create a SnapIn to replace or append to the windows hosts file?

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

        @AngryScientist a snapin is just a way of executing any file, it can be whatever you want. Make something that when run updates the host file(e.g. a batch or powershell script). Then just use the snapin template matching your script type.

        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
        • george1421G
          george1421 Moderator
          last edited by george1421

          as for updating your host file something as simple as
          echo "192.168.1.40 fog_server" >> c:\windows\system32\drivers\etc\hosts in a batch script should add the reference to the host file.
          If you have a number of entries saved in a text file you could use something like type hupdate.txt >> c:\windows\system32\drivers\etc\hosts to update the file.

          Disclaimer: I have not tested the commands above, they just came to me as I was typing, so YMMV.

          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!

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

          218

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project