Partial Initial Upload
This commit is contained in:
commit
2d84c850f7
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
28
Login/Disable-EdgeStartup.ps1
Normal file
28
Login/Disable-EdgeStartup.ps1
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Get the registry key where startup programs are stored
|
||||||
|
$registryKey = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
|
||||||
|
|
||||||
|
# Get all registry values (not child items) from the Run key
|
||||||
|
$edgeEntries = Get-ItemProperty -Path $registryKey |
|
||||||
|
Get-Member -MemberType NoteProperty |
|
||||||
|
Where-Object { $_.Name -like "MicrosoftEdgeAutoLaunch_*" }
|
||||||
|
|
||||||
|
# Check if any Edge entries were found
|
||||||
|
if ($edgeEntries) {
|
||||||
|
foreach ($edgeEntry in $edgeEntries) {
|
||||||
|
try {
|
||||||
|
# Remove the registry value
|
||||||
|
Remove-ItemProperty -Path $registryKey -Name $edgeEntry.Name
|
||||||
|
# Verify removal
|
||||||
|
$checkRemoval = Get-ItemProperty -Path $registryKey -Name $edgeEntry.Name -ErrorAction SilentlyContinue
|
||||||
|
if ($null -eq $checkRemoval) {
|
||||||
|
Write-Host "Microsoft Edge startup entry removed: $($edgeEntry.Name)"
|
||||||
|
} else {
|
||||||
|
Write-Warning "Failed to remove Microsoft Edge startup entry: $($edgeEntry.Name)"
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Warning "Error removing Microsoft Edge startup entry: $($_.Exception.Message)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Warning "No Microsoft Edge startup entries found. Please manually verify the registry key."
|
||||||
|
}
|
||||||
28
Login/Disable-OneDriveStartup.ps1
Normal file
28
Login/Disable-OneDriveStartup.ps1
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Get the registry key where startup programs are stored
|
||||||
|
$registryKey = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
|
||||||
|
|
||||||
|
# Get all registry values (not child items) from the Run key
|
||||||
|
$driveEntries = Get-ItemProperty -Path $registryKey |
|
||||||
|
Get-Member -MemberType NoteProperty |
|
||||||
|
Where-Object { $_.Name -like "OneDriveSetup" -or $_.Name -like "OneDrive" }
|
||||||
|
|
||||||
|
# Check if any OneDrive entries were found
|
||||||
|
if ($driveEntries) {
|
||||||
|
foreach ($driveEntry in $driveEntries) {
|
||||||
|
try {
|
||||||
|
# Remove the registry value
|
||||||
|
Remove-ItemProperty -Path $registryKey -Name $driveEntry.Name
|
||||||
|
# Verify removal
|
||||||
|
$checkRemoval = Get-ItemProperty -Path $registryKey -Name $driveEntry.Name -ErrorAction SilentlyContinue
|
||||||
|
if ($null -eq $checkRemoval) {
|
||||||
|
Write-Host "OneDrive startup entry removed: $($driveEntry.Name)"
|
||||||
|
} else {
|
||||||
|
Write-Warning "Failed to remove OneDrive startup entry: $($driveEntry.Name)"
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Warning "Error removing OneDrive startup entry: $($_.Exception.Message)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Warning "No OneDrive startup entries found. Please manually verify the registry key."
|
||||||
|
}
|
||||||
35
Login/Remove-EdgeShortcut.ps1
Normal file
35
Login/Remove-EdgeShortcut.ps1
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Script to remove Microsoft Edge desktop shortcut if it exists
|
||||||
|
# Get the currently logged in username
|
||||||
|
$currentUser = [System.Environment]::UserName
|
||||||
|
|
||||||
|
# Define the path to the current user's desktop
|
||||||
|
$desktopPath = "C:\Users\$currentUser\Desktop"
|
||||||
|
|
||||||
|
# Define the possible Edge shortcut names
|
||||||
|
$edgeShortcuts = @(
|
||||||
|
"Microsoft Edge.lnk",
|
||||||
|
"Microsoft Edge (Beta).lnk",
|
||||||
|
"Microsoft Edge (Dev).lnk",
|
||||||
|
"Microsoft Edge (Canary).lnk"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Loop through potential shortcut names
|
||||||
|
foreach ($shortcut in $edgeShortcuts) {
|
||||||
|
$fullPath = Join-Path -Path $desktopPath -ChildPath $shortcut
|
||||||
|
|
||||||
|
# Check if the shortcut exists
|
||||||
|
if (Test-Path $fullPath) {
|
||||||
|
try {
|
||||||
|
# Remove the shortcut
|
||||||
|
Remove-Item $fullPath -Force
|
||||||
|
Write-Host "Deleted shortcut: $shortcut from $currentUser's desktop"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "Error deleting shortcut $shortcut : $_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Shortcut $shortcut not found on $currentUser's desktop"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Write-Host "Edge shortcut removal process completed for user $currentUser."
|
||||||
23
Login/Uninstall-OneDrive.bat
Executable file
23
Login/Uninstall-OneDrive.bat
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
@echo off
|
||||||
|
:: Check if OneDrive is installed
|
||||||
|
echo Checking if Microsoft OneDrive is installed...
|
||||||
|
|
||||||
|
:: Check for OneDrive installation by looking for its executable
|
||||||
|
if exist "%LOCALAPPDATA%\Microsoft\OneDrive\OneDrive.exe" (
|
||||||
|
echo OneDrive is installed. Proceeding with uninstallation...
|
||||||
|
|
||||||
|
echo Uninstalling OneDrive... >> "%LOGFILE%"
|
||||||
|
if exist "%SystemRoot%\System32\OneDriveSetup.exe" (
|
||||||
|
"%SystemRoot%\System32\OneDriveSetup.exe" /uninstall
|
||||||
|
if !errorlevel! neq 0 (
|
||||||
|
echo ERROR: Failed to uninstall OneDrive
|
||||||
|
) else (
|
||||||
|
echo Successfully uninstalled OneDrive
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
echo WARNING: OneDriveSetup.exe not found
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
echo WARNING: Microsoft OneDrive is not installed. Skipping uninstallation.
|
||||||
|
)
|
||||||
|
endlocal
|
||||||
BIN
StartLayouts/TCSE-Layout-Import-Admin.reg
Normal file
BIN
StartLayouts/TCSE-Layout-Import-Admin.reg
Normal file
Binary file not shown.
BIN
StartLayouts/TCSE-Layout-Import-User.reg
Normal file
BIN
StartLayouts/TCSE-Layout-Import-User.reg
Normal file
Binary file not shown.
19
StartLayouts/TCSE-Layout.xml
Normal file
19
StartLayouts/TCSE-Layout.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LayoutModificationTemplate
|
||||||
|
xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
|
||||||
|
xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
|
||||||
|
xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
|
||||||
|
xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
|
||||||
|
Version="1">
|
||||||
|
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
|
||||||
|
<defaultlayout:TaskbarLayout>
|
||||||
|
<taskbar:TaskbarPinList>
|
||||||
|
<taskbar:DesktopApp DesktopApplicationID="Microsoft.Windows.Explorer"/>
|
||||||
|
<taskbar:DesktopApp DesktopApplicationLinkPath="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk"/>
|
||||||
|
<taskbar:DesktopApp DesktopApplicationLinkPath="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Word 2016.lnk"/>
|
||||||
|
<taskbar:DesktopApp DesktopApplicationLinkPath="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Excel 2016.lnk"/>
|
||||||
|
<taskbar:DesktopApp DesktopApplicationLinkPath="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PowerPoint 2016.lnk"/>
|
||||||
|
</taskbar:TaskbarPinList>
|
||||||
|
</defaultlayout:TaskbarLayout>
|
||||||
|
</CustomTaskbarLayoutCollection>
|
||||||
|
</LayoutModificationTemplate>
|
||||||
80
TCSE-Computer-Deploy.bat
Normal file
80
TCSE-Computer-Deploy.bat
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
:: Install Winget Package Manager
|
||||||
|
C:\Scripts\Software\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
|
||||||
|
|
||||||
|
:: Install Chocolatey Package Manager
|
||||||
|
timeout /t 30
|
||||||
|
echo Installing Chocolatey...
|
||||||
|
C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install --id chocolatey.chocolatey --source winget
|
||||||
|
|
||||||
|
:: Install Chocolatey Software
|
||||||
|
echo Installing Chocolatey Software...
|
||||||
|
C:\ProgramData\Chocolatey\choco.exe upgrade adobereader -y --ignore-checksums
|
||||||
|
C:\ProgramData\Chocolatey\choco.exe install googlechrome -y --ignore-checksums
|
||||||
|
C:\ProgramData\Chocolatey\choco.exe install google-drive-file-stream -y --ignore-checksums
|
||||||
|
|
||||||
|
:: Install Printers
|
||||||
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Printers\01-Printer-Scripts\01-PrinterInstall-AllPrinters.ps1"
|
||||||
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Printers\01-Printer-Scripts\02.2-PrinterProperties-Import.ps1"
|
||||||
|
|
||||||
|
:: Set Time Zone
|
||||||
|
tzutil /s "Central Standard Time"
|
||||||
|
|
||||||
|
:: Install Additional Software
|
||||||
|
echo Installing Additional Software...
|
||||||
|
echo Installing GCPW...
|
||||||
|
C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall
|
||||||
|
echo GCPW Installed...
|
||||||
|
echo Installing MeshCentral...
|
||||||
|
C:\Scripts\Software\RemoteAgent64-TCSE.exe -fullinstall
|
||||||
|
echo MeshCentral Installed...
|
||||||
|
echo Installing Office 2016...
|
||||||
|
C:\Scripts\Software\Office2016\setup.exe /adminfile C:\Scripts\Software\Office2016\TCSE.MSP
|
||||||
|
echo Office 2016 Installed...
|
||||||
|
|
||||||
|
:: Run Debloat Script
|
||||||
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Software\Win11Debloat\Win11Debloat.ps1" -Silent -Sysprep -RemoveApps -RemoveCommApps -RemoveW11Outlook -RemoveDevApps -RemoveGamingApps -DisableDVR -ClearStartAllUsers -DisableTelemetry -DisableBing -DisableSuggestions -DisableLockscreenTips -ShowKnownFileExt -TaskbarAlignLeft -ShowSearchIconTb -HideTaskview -HideChat -DisableWidgets -DisableCopilot -DisableRecall
|
||||||
|
|
||||||
|
::: Define Taskbar Layout Path
|
||||||
|
set "REG_FILES_DIR=C:\Scripts\StartLayouts"
|
||||||
|
|
||||||
|
::: Loop through each .reg file in the directory
|
||||||
|
for %%f in (%REG_FILES_DIR%\*.reg) do (
|
||||||
|
reg import "%%f"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Taskbar layout successfully imported...
|
||||||
|
|
||||||
|
:: Remove All Shortcuts from Public Desktop Folder
|
||||||
|
:: Set the path to the Public Desktop folder
|
||||||
|
set "PUBLIC_DESKTOP=%PUBLIC%\Desktop"
|
||||||
|
|
||||||
|
:: Counter for deleted shortcuts
|
||||||
|
set "deleted_count=0"
|
||||||
|
|
||||||
|
:: Check if the Public Desktop folder exists
|
||||||
|
if not exist "%PUBLIC_DESKTOP%" (
|
||||||
|
echo Error: Public Desktop folder not found.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Remove all .lnk files from the Public Desktop
|
||||||
|
for %%F in ("%PUBLIC_DESKTOP%\*.lnk") do (
|
||||||
|
del "%%F"
|
||||||
|
if !errorlevel! equ 0 (
|
||||||
|
set /a "deleted_count+=1"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Display results
|
||||||
|
echo Deleted !deleted_count! shortcut(s) from the Public Desktop.
|
||||||
|
|
||||||
|
:: Copy Login Scripts to User Startup
|
||||||
|
echo Copying Login Scripts to All Users...
|
||||||
|
powershell Copy-Item 'C:\Scripts\TCSE-Login.vbs' 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup'
|
||||||
|
|
||||||
|
:: Restart System
|
||||||
|
echo Restarting system in 5 minutes...
|
||||||
|
timeout /t 300
|
||||||
|
shutdown /r /t 0
|
||||||
53
TCSE-Login.bat
Normal file
53
TCSE-Login.bat
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
|
:: Script to configure default file associations, remove OneDrive, disable Edge, and launch Google Drive
|
||||||
|
:: Created: 2024-11-21
|
||||||
|
|
||||||
|
:: Set up logging
|
||||||
|
set "LOGFILE=%TEMP%\tcse-login-script.log"
|
||||||
|
set "LOGFILE=%LOGFILE: =0%"
|
||||||
|
|
||||||
|
echo Starting setup script at %DATE% %TIME% > "%LOGFILE%"
|
||||||
|
|
||||||
|
:: Set App Defaults
|
||||||
|
echo Setting Default Apps... >> "%LOGFILE%"
|
||||||
|
C:\Scripts\Software\setuserfta.exe .pdf AcroExch.Document
|
||||||
|
C:\Scripts\Software\setuserfta.exe .htm ChromeHTML
|
||||||
|
C:\Scripts\Software\setuserfta.exe .html ChromeHTML
|
||||||
|
C:\Scripts\Software\setuserfta.exe http ChromeHTML
|
||||||
|
C:\Scripts\Software\setuserfta.exe https ChromeHTML
|
||||||
|
|
||||||
|
:: Disable OneDrive Startup
|
||||||
|
echo Disable OneDrive Startup... >> "%LOGFILE%"
|
||||||
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\Disable-OneDriveStartup.ps1"
|
||||||
|
|
||||||
|
:: Disable Edge Startup
|
||||||
|
echo Disable Edge Startup... >> "%LOGFILE%"
|
||||||
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\Disable-EdgeStartup.ps1"
|
||||||
|
|
||||||
|
:: Remove Edge Desktop Shortcut
|
||||||
|
echo Remove Edge Desktop Shortcut... >> "%LOGFILE%"
|
||||||
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\Remove-EdgeShortcut.ps1"
|
||||||
|
|
||||||
|
:: Launch Google Drive for Desktop
|
||||||
|
:: Check if Google Drive File Stream is already set to launch on startup
|
||||||
|
reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "GoogleDriveFS" >nul 2>&1
|
||||||
|
if %errorlevel% equ 0 (
|
||||||
|
echo Google Drive File Stream is already set to launch on startup. >> "%LOGFILE%"
|
||||||
|
) else (
|
||||||
|
echo Launching Google Drive for Desktop... >> "%LOGFILE%"
|
||||||
|
start /B "" "C:\Program Files\Google\Drive File Stream\launch.bat"
|
||||||
|
|
||||||
|
:: Wait for Google Drive to launch
|
||||||
|
timeout /t 5 /nobreak > nul
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Uninstall OneDrive
|
||||||
|
echo Uninstall OneDrive... >> "%LOGFILE%"
|
||||||
|
"C:\Scripts\Login\Uninstall-OneDrive.bat"
|
||||||
|
|
||||||
|
echo Script completed at %DATE% %TIME% >> "%LOGFILE%"
|
||||||
|
echo Log file created at: %LOGFILE%
|
||||||
|
|
||||||
|
endlocal
|
||||||
4
TCSE-Login.vbs
Normal file
4
TCSE-Login.vbs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Dim WshShell
|
||||||
|
Set WshShell = CreateObject("Wscript.Shell")
|
||||||
|
WshShell.Run "cmd /c C:\Scripts\TCSE-Login.bat", 0, False
|
||||||
|
Set WshShell = Nothing
|
||||||
Loading…
x
Reference in New Issue
Block a user