• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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
972
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.
  • A
    AngryScientist
    last edited by Dec 6, 2016, 8:47 PM

    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 Dec 6, 2016, 3:11 PM Dec 6, 2016, 9:11 PM

      @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
      • G
        george1421 Moderator
        last edited by george1421 Dec 7, 2016, 10:26 AM Dec 6, 2016, 9:37 PM

        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
        1 / 1
        • First post
          2/3
          Last post

        140

        Online

        12.1k

        Users

        17.3k

        Topics

        155.3k

        Posts
        Copyright © 2012-2024 FOG Project