SnapIn How-to questions in regards to hosts file.
AngryScientist last edited by
- FOG Version: 1.3.0 RC 21
- OS: Centos7
- Service Version: 0.11.5
- OS: Windows7
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?
as for updating your host file something as simple as
echo "192.168.1.40 fog_server" >> c:\windows\system32\drivers\etc\hostsin 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\hoststo update the file.
Disclaimer: I have not tested the commands above, they just came to me as I was typing, so YMMV.
@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.