Ejemplo n.º 1
0
        private bool UnblockFiles()
        {
            bool   rtn = true;
            string err = "";

            PShell.pscript ps = new PShell.pscript(parentform);
            if (!ps.UnblockFiles(poshsecframework.Properties.Settings.Default.ScriptPath))
            {
                err = ps.Results;
                rtn = rtn && false;
            }
            if (!ps.UnblockFiles(poshsecframework.Properties.Settings.Default.ModulePath))
            {
                err += "\r\n" + ps.Results;
                rtn  = rtn && false;
            }
            if (!ps.UnblockFiles(Application.StartupPath))
            {
                err += "\r\n" + ps.Results;
                rtn  = rtn && false;
            }
            ps.Dispose();
            ps = null;
            if (!rtn)
            {
                Errors[(int)Steps.Unblock_Files] = err + Strings.StringValue.TNUnblockFile;
            }
            return(rtn);
        }
Ejemplo n.º 2
0
        private bool UpdateHelp()
        {
            bool rtn = false;

            PShell.pscript ps = new PShell.pscript(parentform);
            rtn = ps.UpdateHelp();
            if (!rtn)
            {
                Errors[(int)Steps.Update_Help] = ps.Results + Strings.StringValue.TNUpdateHelp;
            }
            ps.Dispose();
            ps = null;
            return(rtn);
        }
Ejemplo n.º 3
0
        private bool SetExecutionPolicy()
        {
            bool rtn = false;

            PShell.pscript ps = new PShell.pscript(parentform);
            rtn = ps.SetExecutionPolicy();
            if (!rtn)
            {
                Errors[(int)Steps.Set_Execution_Policy] = ps.Results + Strings.StringValue.TNSetExecutionPolicy;
            }
            ps.Dispose();
            ps = null;
            return(rtn);
        }
Ejemplo n.º 4
0
 private bool UpdateHelp()
 {
     bool rtn = false;
     PShell.pscript ps = new PShell.pscript(parentform);
     rtn = ps.UpdateHelp();
     if (!rtn)
     {
         Errors[(int)Steps.Update_Help] = ps.Results + Strings.StringValue.TNUpdateHelp;
     }
     ps.Dispose();
     ps = null;
     return rtn;
 }
Ejemplo n.º 5
0
 private bool SetExecutionPolicy()
 {
     bool rtn = false;
     PShell.pscript ps = new PShell.pscript(parentform);
     rtn = ps.SetExecutionPolicy();
     if (!rtn)
     {
         Errors[(int)Steps.Set_Execution_Policy] = ps.Results + Strings.StringValue.TNSetExecutionPolicy;
     }
     ps.Dispose();
     ps = null;
     return rtn;
 }
Ejemplo n.º 6
0
 private bool UnblockFiles()
 {
     bool rtn = true;
     string err = "";
     PShell.pscript ps = new PShell.pscript(parentform);
     if (!ps.UnblockFiles(poshsecframework.Properties.Settings.Default.ScriptPath))
     {
         err = ps.Results;
         rtn = rtn && false;
     }
     if (!ps.UnblockFiles(poshsecframework.Properties.Settings.Default.ModulePath))
     {
         err += "\r\n" + ps.Results;
         rtn = rtn && false;
     }
     if (!ps.UnblockFiles(Application.StartupPath))
     {
         err += "\r\n" + ps.Results;
         rtn = rtn && false;
     }
     ps.Dispose();
     ps = null;
     if (!rtn)
     {
         Errors[(int)Steps.Unblock_Files] = err + Strings.StringValue.TNUnblockFile;
     }
     return rtn;
 }