public static void Open59Manager() { //RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"); //object o = key.GetValue("5nine Manager for Hyper-V"); string installPath = string.Empty; bool installed = Utilite.IsApplictionInstalled(Constants.Five9RegName, out installPath); if (!installed) { if (MessageBox.Show("Install 59manager?", "Install 59manager?", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) == DialogResult.Yes) { ProcessCaller.ProcessOpen(MainForm.FiveNineInstallPath + VanScript.FiveNineInstall); } } else { logger.Debug(TryGet5NineStartPath()); ProcessCaller.ProcessOpen(TryGet5NineStartPath()); } }
private void pshvm30btn_Click(object sender, EventArgs e) { ProcessCaller.ProcessOpen(MainForm.pshvm30 + VanScript.pshvm30); }
void SetupModule(CheckModule moduleName) { switch (moduleName) { case CheckModule.EnableRDP: ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.RemoteDesktop); break; case CheckModule.EnableWinRM: ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.WINRM); break; case CheckModule.IPconfig: ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.IpSettings); break; case CheckModule.GPUFeature: this.InstallGpuFeature(); break; case CheckModule.HyperVFeature: case CheckModule.ClusterFeature: MessageBox.Show("After install those feature. You need reboot."); ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.Roles); break; case CheckModule.ISCSiConnection: List <ISCSiInfo> info = GetISCSiInfo(); if (info.Count > 0) { iscsiForm = new iSCSIForm(info); iscsiForm.Show(this); } else { ProcessCaller.ProcessOpen(VanScript.IscsiUI); } break; case CheckModule.JoinDomain: ProcessCaller.ProcessOpenByPowershell(MainForm.CorefigPath + VanScript.JoinDomainAndRename); break; case CheckModule.EnableRemoteControle: EnableRemoteControl(); break; case CheckModule.CreateCluster: MainForm.clusterForm.Show(this); break; case CheckModule.CreateVM: MainForm.Open59Manager(); break; case CheckModule.CreateVirtualSwitch: vSwitchForm = new CreateVirtualSwitchForm(); vSwitchForm.Show(this); break; default: MessageBox.Show("Not ready"); break; } }
private void TaskManagerbtn_Click(object sender, EventArgs e) { ProcessCaller.ProcessOpen(VanScript.TaskManager); }
private void RunIscsiUI_Click(object sender, EventArgs e) { ProcessCaller.ProcessOpen(VanScript.IscsiUI); }