public static void Main(String[] a) { #region Inner Variable Set StreamReader sr; PBUService thisInstance = new PBUService(); String userProfile = Environment.GetEnvironmentVariable("UserProfile"); String systemRoot = Environment.GetEnvironmentVariable("SystemRoot"); #endregion #region Set List if (File.Exists(userProfile + "\\ACRules.txt")){ sr = new StreamReader(userProfile + "\\ACRules.txt"); String tempLine = sr.ReadToEnd(); PBUService.list = tempLine.Split(','); sr.Close(); } else { PBUService.list = new String[] {"iexplore", "360se", "chrome", "firefox", "safari"}; } #endregion #region Run Service Program ServiceBase.Run(thisInstance); #endregion }
public PBUService() { cache = this; }