$WPF_ShowDiagButton.Add_Click{
UpdateSetting
$WPF_TabControl.Items[4].Visibility = 'Visible'
$WPF_TabControl.Items[4].IsSelected = $True
$WPF_DiagnosticOutput.text = ''
Clear-Host
TBoxDiag " Diagnostic Information below, will be copied to the clipboard.`n" -C 13
$Script:DiagString = ''
TBoxDiag ' ********START********' -C 11
TBoxDiag ' Diagnostic Output, Some items may be blank' -C 14
TBoxDiag '' -C 14
TBoxDiag ' --------Script Info--------' -C 2
TBoxDiag ' Script Version: ',$Script_Version -C 14,15
TBoxDiag ' Release Type: ',$Release_Type -C 14,15
TBoxDiag ' Services Version: ',$ServiceVersion -C 14,15
TBoxDiag '' -C 14
TBoxDiag ' --------System Info--------' -C 2
TBoxDiag ' Window: ',$FullWinEdition -C 14,15
TBoxDiag ' Bit: ',$OSBit -C 14,15
TBoxDiag ' Edition SKU#: ',$WinSku -C 14,15
TBoxDiag ' Build: ',$BuildVer -C 14,15
TBoxDiag ' Version: ',$Win10Ver -C 14,15
TBoxDiag ' PC Type: ',$PCType -C 14,15
TBoxDiag ' Desktop/Laptop: ',$IsLaptop.Substring(1) -C 14,15
TBoxDiag '' -C 14
TBoxDiag ' --------Script Requirements--------' -C 2
TBoxDiag ' Windows 10 - Home or Pro (64-Bit)' -C 14
TBoxDiag ' Min Version: ',"$MinVerName ($MinVer)" -C 14,15
TBoxDiag ' Max Version: ',"$MaxVerName ($MaxVer)" -C 14,15
TBoxDiag '' -C 14
TBoxDiag ' --------Current Settings--------' 2
TBoxDiag ' BlackViper: ',$WPF_ServiceConfig.Text -C 14,15
TBoxDiag ' All/Min: ',$(If($All_or_Min -eq '-full'){ 'All' } Else{ 'Min' }) -C 14,15
TBoxDiag ' ToS: ',$AcceptToS -C 14,15
TBoxDiag ' Automated: ',$Automated -C 14,15
TBoxDiag ' ScriptVerCheck: ',$ScriptVerCheck -C 14,15
TBoxDiag ' ServiceVerCheck: ',$ServiceVerCheck -C 14,15
TBoxDiag ' InternetCheck: ',$InternetCheck -C 14,15
TBoxDiag ' ShowAlreadySet: ',$ShowAlreadySet -C 14,15
TBoxDiag ' ShowNonInstalled: ',$ShowNonInstalled -C 14,15
TBoxDiag ' ShowSkipped: ',$ShowSkipped -C 14,15
TBoxDiag ' XboxService: ',$XboxService -C 14,15
TBoxDiag ' StopDisabled: ',$StopDisabled -C 14,15
TBoxDiag ' ChangeState: ',$ChangeState -C 14,15
TBoxDiag ' EditionCheck: ',$EditionCheck -C 14,15
TBoxDiag ' BuildCheck: ',$BuildCheck -C 14,15
TBoxDiag ' DryRun: ',$DryRun -C 14,15
TBoxDiag ' ScriptLog: ',$ScriptLog -C 14,15
TBoxDiag ' LogName: ',$LogName -C 14,15
TBoxDiag ' LogBeforeAfter: ',$LogBeforeAfter -C 14,15
TBoxDiag ' DevLog: ',$DevLog -C 14,15
TBoxDiag ' BackupServiceConfig: ',$BackupServiceConfig -C 14,15
TBoxDiag ' BackupServiceType: ',$WPF_BackupServiceType.Text -C 14,15
TBoxDiag ' ShowConsole: ',$ShowConsole -C 14,15
TBoxDiag ' LaptopTweaked: ',$LaptopTweaked -C 14,15
TBoxDiag '' -C 14
TBoxDiag ' --------Misc Info--------' -C 2
TBoxDiag ' Run Button txt: ',$WPF_RunScriptButton.Content -C 14,15
TBoxDiag ' Args: ',$PassedArg -C 14,15
TBoxDiag '' -C 14
TBoxDiag ' ********END********' -C 11
$DiagString | Set-Clipboard
[Windows.Forms.Messagebox]::Show('Diagnostic Information, has been copied to the clipboard.','Notice', 'OK') | Out-Null
}
$WPF_TabControl.Add_SelectionChanged{ If(!$ServicesGenerated -and $WPF_ServicesDG_Tab.IsSelected){ $Script:ServicesGenerated = $True ;GenerateServices } }
$WPF_ServiceConfig.Add_SelectionChanged{ HideShowCustomSrvStuff ;RunDisableCheck }
$WPF_EditionConfig.Add_SelectionChanged{ RunDisableCheck }
$WPF_FilterTxt.Add_TextChanged{ DGFilter }
$WPF_ShowConsole_CB.Add_Checked{ ShowConsoleWin 5 } #5 = Show
$WPF_ShowConsole_CB.Add_UnChecked{ ShowConsoleWin 0 } #0 = Hide
$WPF_BuildCheck_CB.Add_Click{ RunDisableCheck }
$WPF_EditionCheckCB.Add_Click{ RunDisableCheck }
$WPF_ScriptLog_CB.Add_Click{ $WPF_LogNameInput.IsEnabled = $WPF_ScriptLog_CB.IsChecked }
$WPF_btnOpenFile.Add_Click{ OpenSaveDiaglog 0 }
$WPF_SaveCustomSrvButton.Add_Click{ OpenSaveDiaglog 1 }
$WPF_SaveRegButton.Add_Click{ OpenSaveDiaglog 2 }
$WPF_ContactButton.Add_Click{ OpenWebsite 'mailto:madbomb122@gmail.com' }
$WPF_LoadServicesButton.Add_Click{ GenerateServices }
$WPF_UpdateServiceButton.Add_Click{ UpdateCheckNow -Ser }
$WPF_UpdateScriptButton.Add_Click{ UpdateCheckNow -Srp }
$WPF_UpdateBothButton.Add_Click{ UpdateCheckNow -Ser -Srp }
$WPF_BlackViperWSButton.Add_Click{ OpenWebsite 'http://www.blackviper.com/' }
$WPF_Madbomb122WSButton.Add_Click{ OpenWebsite 'https://GitHub.com/madbomb122/' }
$WPF_FeedbackButton.Add_Click{ OpenWebsite "$MySite/issues" }
$WPF_FAQButton.Add_Click{ OpenWebsite "$MySite/blob/master/README.md" }
$WPF_DonateButton.Add_Click{ ClickedDonate }
$WPF_CopyrightButton.Add_Click{ [Windows.Forms.Messagebox]::Show($Copyright,'Copyright', 'OK') | Out-Null }
$WPF_AboutButton.Add_Click{ [Windows.Forms.Messagebox]::Show("This script lets you set Windows 10's services based on Black Viper's Service Configurations, your own Service Configuration (If in a proper format), or a backup of your Service Configurations made by this script.`n`nThis script was created by MadBomb122.",'About', 'OK') | Out-Null }
$Script:RunScript = 0
If($All_or_Min -eq '-Full'){ $WPF_RadioAll.IsChecked = $True } Else{ $WPF_RadioMin.IsChecked = $True }
$WPF_LogNameInput.Text = $LogName
If($ScriptLog -eq 1){ $WPF_ScriptLog_CB.IsChecked = $True ;$WPF_LogNameInput.IsEnabled = $True }
If($IsLaptop -eq '-Lap') {
$WPF_ServiceConfig.Items.RemoveAt(2)
} Else {
$WPF_LaptopTweakGrid.Visibility = 'Collapsed'
$WPF_LaptopTweakBox.Visibility = 'Hidden'
}
$Script:BVCount = $WPF_ServiceConfig.Items.Count
$VarList.ForEach{ $_.Value.IsChecked = If($(Get-Variable -Name ($_.Name.Split('_')[1]) -ValueOnly) -eq 1){ $True } Else{ $False } }
EditionBuildCBSet
$WPF_BackupServiceType.SelectedIndex = $BackupServiceType
$WPF_ServiceConfig.SelectedIndex = $Black_Viper
$WPF_LoadFileTxtBox.Text = $ServiceConfigFile
$WPF_LoadServicesButton.IsEnabled = SetServiceVersion
$WPF_Service_Ver_Txt.Text = "Service Version: $ServiceVersion ($ServiceDate)"
If($Release_Type -ne 'Stable') {
If($ShowConsole -eq 1){ $WPF_ShowConsole_CB.IsChecked = $True }
$WPF_ShowConsole_CB.Visibility = 'Hidden'
} ElseIf($ShowConsole -eq 0) {
ShowConsoleWin 0
}
$Script:ServiceImport = 1
HideShowCustomSrvStuff
RunDisableCheck
If($Release_Type -eq 'Stable'){ Clear-Host }
DisplayOut 'Displaying GUI Now' -C 14
DisplayOut "`nTo exit you can close the GUI or PowerShell Window." -C 14
$Form.ShowDialog() | Out-Null
}
Function RunScriptFun {
SaveSetting
$Script:RunScript = 1
$Script:Black_Viper = $WPF_ServiceConfig.SelectedIndex + 1
If($Black_Viper -eq $BVCount) {
If(!(Test-Path -LiteralPath $ServiceConfigFile -PathType Leaf) -And $null -ne $ServiceConfigFile) {
[Windows.Forms.Messagebox]::Show("The File '$ServiceConfigFile' does not exist.",'Error', 'OK') | Out-Null
$Script:RunScript = 0
} Else {
$Script:LoadServiceConfig = 1
$Script:Black_Viper = 0
}
}
If($RunScript -eq 1) {
$Script:RanScript = $True
$WPF_RunScriptButton.IsEnabled = $False
$WPF_RunScriptButton.Content = 'Run Disabled while changing services.'
$a = new-object -comobject wscript.shell
$a.popup('Script will Run in 1 Second.',1,'This is to prevent clicking Run again.',0) | Out-Null
$WPF_TabControl.Items[3].Visibility = 'Visible'
$WPF_TabControl.Items[3].IsSelected = $True
If($WPF_CustomBVCB.IsChecked) {
$Script:LoadServiceConfig = 2
$WPF_FilterTxt.text = ''
$Script:csv = $WPF_dataGrid.Items.ForEach{
$STF = $ServicesTypeFull.IndexOf($_.BVType)
If(!$_.CheckboxChecked){ $STF *= -1 }
[PSCustomObject] @{ ServiceName = $_.ServiceName ;StartType = $STF ;Status = $_.SrvState }
}
} ElseIf($Script:LoadServiceConfig -NotIn 1,2) {
$Script:LoadServiceConfig = 0
}
Black_Viper_Set $Black_Viper $All_or_Min
} Else {
RunDisableCheck
}
}
Function PopWindow {
Param (
[Alias('M')] [String]$Message,
[Alias('CB')] [String]$ChkBox
)
[xml]$XAMLPW = @"
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Caution" Height="215" Width="285" BorderBrush="Black" Background="White" WindowStyle="ToolWindow">
<Grid Background="#FFE5E5E5">
<Button Name="Button0" Content="Yes" HorizontalAlignment="Left" Margin="10,151,0,0" VerticalAlignment="Top" Width="76"/>
<Button Name="Button1" Content="No" HorizontalAlignment="Left" Margin="95,151,0,0" VerticalAlignment="Top" Width="76"/>
<TextBlock Name="Tbox" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="113" Width="247"/>
<CheckBox Name="Cbox" Content="CheckBox" HorizontalAlignment="Left" Margin="10,131,0,0" VerticalAlignment="Top"/>
</Grid>
</Window>
"@
[Void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
$FormPW = [Windows.Markup.XamlReader]::Load( (New-Object System.Xml.XmlNodeReader $XAMLPW) )
$XAMLPW.SelectNodes('//*[@Name]').ForEach{Set-Variable -Name "WPFPW_$($_.Name)" -Value $FormPW.FindName($_.Name) -Scope Script}
$RunspacePW = [RunSpaceFactory]::CreateRunspace()
$PowerShellPW = [PowerShell]::Create()
$PowerShellPW.RunSpace = $RunspacePW
$RunspacePW.Open()
[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | Out-Null
$WPFPW_Tbox.Text = $Message
$WPFPW_Cbox.Content = $ChkBox
$tmpEB = $EBFailCount
$WPFPW_Button0.Add_Click{ $FormPW.Close() ;$Script:TempBypass = 1 ;RunScriptFun }
$WPFPW_Button1.Add_Click{ $FormPW.Close() }
$WPFPW_Cbox.Add_Checked{
If($EBFailCount -In 1,3){ $Script:EditionCheck = 'Pro' ;EditionBuildCBSet }
If($EBFailCount -In 2,3){ $Script:BuildCheck = 1 ;$WPF_BuildCheck_CB.IsChecked = $True }
EditionBuildCBSet
$EBFailCount = 0
}
$WPFPW_Cbox.Add_UnChecked{
If($EBFailCount -In 1,3){ $Script:EditionCheck = 0 ;EditionBuildCBSet }
If($EBFailCount -In 2,3){ $Script:BuildCheck = 0 ;$WPF_BuildCheck_CB.IsChecked = $False }
$EBFailCount = $tmpEB
}
$FormPW.ShowDialog() | Out-Null
}
Function EditionBuildCBSet {
$WPF_EditionCheckCB.IsChecked = If($EditionCheck -ne 0){ $True } Else{ $False }
$WPF_EditionConfig.SelectedIndex = If('Home' -In $WinEdition,$EditionCheck){ 1 } ElseIf('Pro' -In $WinEdition,$EditionCheck){ 2 } Else{ 0 }
}
Function UpdateEdition {
If($WPF_EditionCheckCB.IsChecked) {
$Script:EditionCheck = If($WPF_EditionConfig.SelectedIndex -ne 0){ $WPF_EditionConfig.Text } Else{ 0}
} Else {
$Script:EditionCheck = 0
}
}
Function RowColorRet([Bool]$Match,[Bool]$checkbox) {
If(!$Match) {
If($checkbox){ Return 'Red' } Else{ Return 'Yellow' }
} Else {
If($checkbox){ Return 'Green' } Else{ Return 'None' }
}
}
Function DGFilter {
$Script:DGUpdate = $False
$TxtFilter = $WPF_FilterTxt.Text
$Filter = $FilterList[$WPF_FilterType.SelectedIndex]
$TableFilter = If($DataGridLCust){ $DataGridListCust } Else{ $DataGridListOrig }
$WPF_dataGrid.ItemsSource = $Script:DataGridListFilter = $TableFilter.Where{ $_.$Filter -Match $TxtFilter }
$Script:DGUpdate = $True
}
Function RunDisableCheck {
$Script:EBFailCount = 0
$Script:BuildCheck = If($WPF_BuildCheck_CB.IsChecked){ 1 } Else{ 0 }
UpdateEdition
$EBFailCount = 0
If(!($EditionCheck -In 'Home','Pro' -or $WinSkuList -Contains $WinSku)){ $Script:EBFailCount = 1 }
If($Win10Ver -NotIn $MinVer..$MaxVer -And $BuildCheck -ne 1){ $Script:EBFailCount += 2 }
If($EBFailCount -ne 0) {
$TmpHead = 'Black Viper'
} ElseIf(($WPF_ServiceConfig.SelectedIndex+1) -eq $BVCount) {
$WPF_RunScriptButton.IsEnabled = $False
$WPF_LoadServicesButton.IsEnabled = $False
$Buttontxt = If(!$ServiceConfigFile -or !(Test-Path -LiteralPath $ServiceConfigFile -PathType Leaf)) {
'Run Disabled, No Custom Service List File Selected or Does not exist.'
} Else {
[System.Collections.ArrayList]$Tempcheck = Import-Csv -LiteralPath $ServiceConfigFile
If($null -In $Tempcheck[0].StartType,$Tempcheck[0].ServiceName) {
$tmpG = $Tempcheck[0].'BV-Safe-Desk'
If($tmpG -In 'GernetatedByMadBomb122','GeneratedByMadBomb122') {
$Script:ServiceConfigFile = ''
$WPF_LoadFileTxtBox.Text = ''
'Run Disabled, No Custom Service List File Selected or Does not exist.'
[Windows.Forms.Messagebox]::Show("Please don't load the 'BlackViper.csv' File... `nSelect another 'File' or Select a 'Serivce Configuration' above.",'Error', 'OK') | Out-Null
} Else {
'Run Disabled, Invalid Custom Service File.'
}
} Else {
$WPF_RunScriptButton.IsEnabled = $True
$WPF_LoadServicesButton.IsEnabled = $True
'Run Script with Custom Service List'
}
}
$TmpHead = 'Custom Service'
} Else {
$TmpHead = If($WPF_ServiceConfig.SelectedIndex -eq 0){ 'Win Default' } Else{ 'Black Viper' }
$Buttontxt = If($WPF_CustomBVCB.IsChecked){ 'Run Script with Customize Service List' } Else{ 'Run Script' }
$WPF_RunScriptButton.IsEnabled = $True
$WPF_LoadServicesButton.IsEnabled = $True
}
$tmp = $WPF_FilterType.SelectedIndex
For($I = ($WPF_FilterType.Items.Count - 1) ;$I -ge 4 ;$I--){ $WPF_FilterType.Items.RemoveAt($I) }
[Void] $WPF_FilterType.Items.Add($TmpHead)
[Void] $WPF_FilterType.Items.Add('State')
[Void] $WPF_FilterType.Items.Add('Description')
[Void] $WPF_FilterType.Items.Add('Path')
[Void] $WPF_FilterType.Items.Add('Row Color')
$WPF_FilterType.SelectedIndex = $tmp
$WPF_dataGrid.Columns[4].Header = $TmpHead
$WPF_RunScriptButton.Content = $Buttontxt
}
Function GenerateServices {
$Black_Viper = $WPF_ServiceConfig.SelectedIndex + 1
If($Black_Viper -eq $BVCount) {
If($Script:ServiceGen -eq 0){ $Script:ServiceImport = 1 }
$Script:LoadServiceConfig = 1
$ServiceFilePath = $WPF_LoadFileTxtBox.Text
$Script:ServiceGen = 1
} Else {
If($Script:ServiceGen -eq 1){ $Script:ServiceImport = 1 }
$FullMin,$WPF_ACUcheckboxChecked.IsChecked = If($WPF_RadioAll.IsChecked){ '-Full',$True } Else{ '-Min',$False }
$Script:LoadServiceConfig = 0
$ServiceFilePath = $BVServiceFilePath
$Script:ServiceGen = 0
}
$BVS = If($LoadServiceConfig -eq 1) {
'StartType'
} ElseIf($Black_Viper -eq 1) {
$ServiceMaker + 'Def-' +$WinEdition
} ElseIf($Black_Viper -eq 2) {
$ServiceMaker + 'Safe' + $IsLaptop
} ElseIf($Black_Viper -eq 3) {
$ServiceMaker + 'Tweaked-Desk'
}
$Script:XboxService = If($WPF_XboxService_CB.IsChecked){ 1 } Else{ 0 }
If($ServiceImport -eq 1) {
[System.Collections.ArrayList] $Script:ServCB = Import-Csv -LiteralPath $ServiceFilePath
$Script:ServiceImport = 0
}
[System.Collections.ArrayList]$Script:DataGridListOrig = @{}
$Script:DataGridListCust = $ServCB.ForEach{
$ServiceName = QMarkServices $_.ServiceName
If($CurrServices.Name -Contains $ServiceName) {
$tmp = ForEach($srv in $CurrServices){ If($srv.Name -eq $ServiceName){ $srv ;Break } }
$ServiceCommName = $tmp.DisplayName
$ServiceCurrType = $tmp.StartType
$SrState = $tmp.Status
$SrvDescription = $tmp.Description
$SrvPath = $tmp.PathName
[Int]$ServiceTypeNum = $_.$BVS
$ServiceCurrType = If($ServiceCurrType -eq 'Disabled') {
$ServicesTypeFull[1]
} ElseIf($ServiceCurrType -eq 'Manual') {
$ServicesTypeFull[2]
} ElseIf($ServiceCurrType -eq 'Auto') {
If(AutoDelayTest $ServiceName -eq 1){ $ServicesTypeFull[4] } Else{ $ServicesTypeFull[3] }
}
$checkbox = $True
If($ServiceTypeNum -In -4..0) {
If($FullMin -ne '-Full'){ $checkbox = $False }
$ServiceTypeNum *= -1
}
If($XboxService -eq 1 -and $XboxServiceArr -Contains $ServiceName){ $checkbox = $False }
$ServiceType = $ServicesTypeFull[$ServiceTypeNum]
$Match = If($ServiceType -eq $ServiceCurrType){ $True } Else{ $False }
$RowColor = RowColorRet $Match $checkbox
[PSCustomObject] @{ CheckboxChecked = $checkbox ;CName = $ServiceCommName ;ServiceName = $ServiceName ;CurrType = $ServiceCurrType ;BVType = $ServiceType ;StartType = $ServiceTypeNum ;ServiceTypeListDG = $ServicesTypeFull ;SrvStateListDG = $SrvStateList ;SrvState = $SrState ;SrvDesc = $SrvDescription ;SrvPath = $SrvPath ;Matches = $Match ;RowColor = $RowColor }
$Script:DataGridListOrig += [PSCustomObject] @{ CheckboxChecked = $checkbox ;CName = $ServiceCommName ;ServiceName = $ServiceName ;CurrType = $ServiceCurrType ;BVType = $ServiceType ;StartType = $ServiceTypeNum ;ServiceTypeListDG = $ServicesTypeFull ;SrvStateListDG = $SrvStateList ;SrvState = $SrState ;SrvDesc = $SrvDescription ;SrvPath = $SrvPath ;Matches = $Match ;RowColor = $RowColor }
}
}
$WPF_dataGrid.ItemsSource = If($WPF_CustomBVCB.IsChecked){ $DataGridListCust } Else{ $DataGridListOrig }
}
Function TBoxDiag {
Param( [Alias('T')] [String[]]$Text, [Alias('C')] [Int[]]$Color )
$WPF_DiagnosticOutput.Dispatcher.Invoke(
[action]{
For($I = 0 ;$I -lt $Text.Length ;$I++) {
$Run = New-Object System.Windows.Documents.Run
$Run.Foreground = $colorsGUI[($Color[$I])]
$Run.Text = $Text[$I]
$WPF_DiagnosticOutput.Inlines.Add($Run)
}
$WPF_DiagnosticOutput.Inlines.Add((New-Object System.Windows.Documents.LineBreak))
},'Normal'
)
$Script:DiagString += "$($Text -Join '')`r`n"
DisplayOut $Text -C $Color
}
##########
# GUI -End
##########
# Update Functions -Start
##########
Function InternetCheck{ If($InternetCheck -eq 1 -or (Test-Connection www.GitHub.com -Count 1 -Quiet)){ Return $True } Return $False }
Function UpdateCheckAuto {
If(InternetCheck) {
UpdateCheck -NAuto:$False
} Else {
$Script:ErrorDi = 'No Internet'
Error_Top
DisplayOutLML 'No Internet connection detected or GitHub.com' -C 2 -L
DisplayOutLML 'is currently down.' -C 2 -L
DisplayOutLML 'Tested by pinging GitHub.com' -C 2 -L
MenuBlankLine -L
DisplayOutLML 'To skip use one of the following methods' -C 2 -L
DisplayOut '|',' 1. Run Script or bat file with ','-sic',' switch'.PadRight(16),'|' -C 14,2,15,2,14 -L
DisplayOut '|',' 2. Change ','InternetCheck',' in Script file'.PadRight(28),'|' -C 14,2,15,2,14 -L
DisplayOut '|',' 3. Change ','InternetCheck',' in bat file'.PadRight(28),'|' -C 14,2,15,2,14 -L
MenuBlankLine -L
MenuLine -L
If(!(Test-Path -LiteralPath $BVServiceFilePath -PathType Leaf)) {
MenuBlankLine -L
DisplayOut '|',' The File ','BlackViper.csv',' is missing and the script ','|' -C 14,2,15,2,14 -L
DisplayOutLML "can't run w/o it." -C 2 -L
MenuBlankLine -L
MenuLine -L
AutomatedExitCheck 1
} Else {
AutomatedExitCheck 0
}
}
}
Function UpdateCheckNow {
If(InternetCheck) {
UpdateCheck @args
} Else {
$Script:ErrorDi = 'No Internet'
[Windows.Forms.Messagebox]::Show('No Internet connection detected or GitHub is down. If you are connected to the internet, Click the Skip internet checkbox.','Error: No Internet', 'OK','Error') | Out-Null
}