moving shit around

This commit is contained in:
2025-10-03 21:48:06 -05:00
parent d7ef359b82
commit 4af8ff2fa2
16 changed files with 1 additions and 4 deletions

View File

@@ -0,0 +1,34 @@
# Script to install Office ProPlus 2016 VL.
# Technolog Networks - 2024-08-21
# iRaven
Start-Transcript -Path "c:\irnh\Install-Office-2016.log" -Append
$OfficeVersionInstalled = (Get-WmiObject -Class Win32_Product | where name -like "Zabbix*" | select Name, Version).Version
$SoftwareDeployLocation = "\\minuette2.technolog.net\SoftwareLibrary\Software\MSOffice\OfficeProPlus2016_VL"
Function CheckInstall {
if ($OfficeVersionInstalled -ne $null) {
if ($OfficeVersionInstalled -lt "16.0" ) { # Checks if currently installed Office is less than version 16 (2016)
Write-Host "An older version of Office is already installed. Upgrading to 2016."
return $false
} else {
Write-Host "Office 2016 is already installed."
return $true
}
} else {
Write-Host "Office is not installed at all."
return $false
}
}
if ((CheckInstall) -eq $false) {
cd $SoftwareDeployLocation
try {
.\setup.exe /adminfile TNGOffice16Deploy.msp
} catch {
Write-Host "Office 2016 could not be installed."
}
}
Stop-Transcript

107
old/OLD_Install-WinGet.ps1 Normal file
View File

@@ -0,0 +1,107 @@
# Script to install winget.
# Technolog Networks, 2024-07-26
# iRaven
# Updated 2025-04-03 to get the legitimate install method MS recommends to use here.
# https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/deployment/install-winget-windows-iot
Start-Transcript -Path "c:\irnh\Install-WinGet.log" -Append
# See if the shit we need exists.
Function Check-WinGet-Install {
try {
winget --version
Write-Host "WinGet already exists!"
return $true
}
catch {
Write-Host "WinGet does not exist!"
return $false
}
}
Function Check-VCLibs {
if ((Get-AppxPackage).Name -like "Microsoft.VCLibs.140.00.UWPDesktop" ) {return $true} else {return $false}
}
Function Check-MSXaml {
if ((Get-AppxPackage).Name -like "Microsoft.UI.Xaml*" ) {return $true} else {return $false}
}
Function Install-VCLibs {
if (Check-VCLibs) {
Write-Output "VCLibs.UWPDesktop is already installed."
} else {
cmd.exe /c "curl -L -o c:\irnh\vclibs.14.00.Desktop.appx https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx"
try {
Add-AppxPackage -Path "c:\irnh\vclibs.14.00.Desktop.appx"
# Add-AppxProvisionedPackage -Online -PackagePath "c:\irnh\vclibs.14.00.Desktop.appx" -SkipLicense
Write-Output "VCLibs.UWPDesktop was installed."
} catch {
Write-Output "VCLibs.UWPDesktop could not be installed."
}
}
}
Function Install-MSXaml {
if (Check-MSXaml) {
Write-Output "Microsoft.UI.Xaml is already installed."
} else {
cmd.exe /c "curl -L -o c:\irnh\msuixaml.zip https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml"
try {
Expand-Archive c:\irnh\msuixaml.zip
Add-AppPackage .\msuixaml\tools\AppX\x64\Release\*.appx
Write-Output "Microsoft.UI.Xaml was installed."
} catch {
Write-Output "Microsoft.UI.Xaml could not be installed."
}
}
}
Function Install-WinGet {
Write-Host "Checking latest version..."
$WGLatestVer = (irm https://api.github.com/repos/microsoft/winget-cli/releases/latest).tag_name
$WGDomainVer = type "\\technolog.net\SYSVOL\technolog.net\SoftwareDeploy\wingetlatestver.txt"
if ($WGDomainVer -eq $WGLatestVer) {
# If the version we have on our domain controllers is the latest, proceed with the offline copy.
Write-Output "Domain Controllers has the latest version $WGDomainVer; using that."
try {
Add-AppxPackage -Path "\\technolog.net\SYSVOL\technolog.net\SoftwareDeploy\winget.msixbundle"
Add-AppxProvisionedPackage -Online -PackagePath "\\technolog.net\SYSVOL\technolog.net\SoftwareDeploy\winget.msixbundle" -LicensePath "\\technolog.net\SYSVOL\technolog.net\SoftwareDeploy\wingetlic.xml" -Verbose
Write-Output "WinGet was successfully installed."
} catch {
Write-Output "WinGet could not be installed."
}
}
else {
# If the version we have on our domain controllers is NOT the latest, we have to get it online.
Write-Host "Internet has the latest copy; downloading WinGet from Microsoft."
# download latest files
foreach ($url in (irm https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url){
if ($url -like "*.xml")
{cmd.exe /c "curl -L -o c:\irnh\wingetlic.xml $url"} # I hate IWR. lol
if ($url -like "*.msixbundle")
{cmd.exe /c "curl -L -o c:\irnh\winget.msixbundle $url"} # I hate IWR. lol
}
try {
# Add-AppxPackage -Path "c:\irnh\winget.msixbundle"
Add-AppxPackage -Path "c:\irnh\winget.msixbundle" -Verbose
Add-AppxProvisionedPackage -Online -PackagePath "c:\irnh\winget.msixbundle" -LicensePath "c:\irnh\wingetlic.xml" -Verbose
$winget = winget -v
if ($winget) {
Write-Output "WinGet was successfully installed."
}
} catch {
Write-Output "WinGet could not be installed."
}
}
}
# Main script
if (!(Check-WinGet-Install)) {
Install-VCLibs
Install-MSXaml
Install-WinGet
}
Stop-Transcript

23
old/TNGAct-7P.bat Normal file
View File

@@ -0,0 +1,23 @@
@echo off
REM TNG Activate 7P SP1
ping 10.0.1.2
ping technologsvr.technolog.net
echo Checking for elevation
net config server
if %errorlevel% neq 0 exit
cd %systemroot%\system32
cscript slmgr.vbs -ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
REM timeout 5
cscript slmgr.vbs -skms 10.0.1.2
REM timeout 5
cscript slmgr.vbs -ato
REM timeout 15

129
old/TNGAct.bat Normal file
View File

@@ -0,0 +1,129 @@
@echo off
setlocal
REM TNG Activate
REM Initial checks
echo Checking if you're connected to the Technolog internal network...
REM ping 10.0.1.1
ping 10.0.1.2
if %errorlevel% neq 0 goto oops1
ping technologsvr.technolog.net
echo Checking for elevation
net config server
if %errorlevel% neq 0 goto oops2
cd %systemroot%\system32
goto ospicker
:ospicker
REM Finds OS version
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
if "%version%" == "10.0" goto win10
if "%version%" == "6.3" goto win81
if "%version%" == "6.2" echo Windows 8 (regular) isn't supported currently.
if "%version%" == "6.1" goto win7
if "%version%" == "6.0" goto win6
goto oops3
:win6
echo winvista sucks but was detected
rem pro key
cscript slmgr.vbs -ipk YFKBB-PQJJV-G996G-VWGXY-2V3X8
REM pause
goto activate
:win7
echo win7 dtected
set osver=Win7
REM Pro key
cscript slmgr.vbs -ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
REM Enterprise key
cscript slmgr.vbs -ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
goto activate
REM End 7
:win81
echo win81 detected
set osver=Win81
REM Pro key
cscript slmgr.vbs -ipk GCRJD-8NW9H-F2CDX-CCM8D-9D6T9
REM Enterprise Key
cscript slmgr.vbs -ipk NPPR9-FWDCX-D2C8J-H872K-2YT43
goto activate
REM End 81
:win10
echo win10 detected
set osver=Win10
REM Pro key
cscript slmgr.vbs -ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
REM Enterprise Key
cscript slmgr.vbs -ipk NPPR9-FWDCX-D2C8J-H872K-2YT43
goto activate
REM End 10
:activate
REM activation portion
REM timeout 5
cscript slmgr.vbs -skms 10.0.1.2
REM timeout 5
cscript slmgr.vbs -ato
if %errorlevel% neq 0 goto oops4
REM timeout 15
echo TNG System Activated, %computername% - %osver% %date% %time% with %username% >> "\\technologsvr\batchlogs$\winactlog"
endlocal
exit
REM Functions
:oops1
REM Network Fail
cls
color c
echo You don't seem to be conneted to the TNG Network.
echo Please connect to it to continue.
timeout 5
exit
:oops2
REM Elevation Fail
color c
echo You don't seem to be elevated, you twat. XD
echo Elevation is required. Right click and run as admin, or contact your sysadmin.
timeout 5
exit
:oops3
REM OS Unsupported
cls
color c
echo Your OS isn't recognized or supported.
echo am confuse.
timeout 5
exit
:oops4
REM Activation Fail
echo An error has occurred- please refer to the above for more information.
echo Send to your local sysadmin if necesssary.
pause
exit

133
old/TNGActS.bat Normal file
View File

@@ -0,0 +1,133 @@
@echo off
setlocal
REM TNG Activate
REM Initial checks
echo Checking if you're connected to the Technolog internal network...
REM ping 10.0.1.1
ping 10.0.1.2
if %errorlevel% neq 0 goto oops1
ping technologsvr.technolog.net
echo Checking for elevation
net config server
if %errorlevel% neq 0 goto oops2
cd %systemroot%\system32
goto ospicker
:ospicker
REM Finds OS version
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
if "%version%" == "10.0" goto win10
if "%version%" == "6.3" goto win81
if "%version%" == "6.2" echo Windows 8 (regular) isn't supported currently.
if "%version%" == "6.1" goto win7
if "%version%" == "6.0" goto win6
goto oops3
:win6
echo haven't finished this
pause
exit
:win7
echo win2k8r2 dtected
set osver=Win2008R2
REM Standard key
cscript slmgr.vbs -ipk YC6KT-GKW9T-YTKYR-T4X34-R7VHC
REM Enterprise key
cscript slmgr.vbs -ipk 489J6-VHDMP-X63PK-3K798-CPX3Y
REM Datacenter key
cscript slmgr.vbs -ipk 74YFP-3QFB3-KQT8W-PMXWJ-7M648
goto activate
REM End 7
:win81
echo win2k12r2 detected
set osver=Win2012R2
REM Standard key
cscript slmgr.vbs -ipk D2N9P-3P6X9-2R39C-7RTCD-MDVJX
REM Datacenter Key
cscript slmgr.vbs -ipk W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9
goto activate
REM End 81
:win10
echo win2k16 or 19 or whatever detected
set osver=Win201619
REM Standard key
cscript slmgr.vbs -ipk WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY
REM Datacenter Key
cscript slmgr.vbs -ipk CB7KF-BWN84-R7R2Y-793K2-8XDDG
goto activate
REM End 10
:activate
REM activation portion
REM timeout 5
cscript slmgr.vbs -skms 10.0.1.2
REM timeout 5
cscript slmgr.vbs -ato
if %errorlevel% neq 0 goto oops4
REM timeout 15
echo TNG Server System Activated, %computername% - %osver% %date% %time% with %logondomain%\%username% >> "\\technologsvr\batchlogs$\winactlog"
endlocal
exit
REM Functions
:oops1
REM Network Fail
cls
color c
echo You don't seem to be conneted to the TNG Network.
echo Please connect to it to continue.
timeout 5
exit
:oops2
REM Elevation Fail
color c
echo You don't seem to be elevated, you twat. XD
echo Elevation is required. Right click and run as admin, or contact your sysadmin.
timeout 5
exit
:oops3
REM OS Unsupported
cls
color c
echo Your OS isn't recognized or supported.
echo am confuse.
timeout 5
exit
:oops4
REM Activation Fail
echo An error has occurred- please refer to the above for more information.
echo Send to your local sysadmin if necesssary.
pause
exit

119
old/TNGMeshInstaller.bat Normal file
View File

@@ -0,0 +1,119 @@
@echo
title TNG Mesh Installer
:: Updated 2024-05-14
set batchlog=c:\irnh\schtask_log.txt
echo F Mesh Installer started @ %date% %time% >> %batchlog%
goto admincheck
:: echo passing arguments if theres any! >> %batchlog%
REM if "%~1"=="install" (
REM echo install was passed >> %batchlog%
REM goto admincheck
REM )
REM if "%~1"=="uninstall" (
REM echo uninstall was passed >> %batchlog%
REM goto admincheck
REM )
REM if "%~1"=="menu" goto admincheck
rem echo none were passed! >> %batchlog%
:admincheck
REM admin check made mandatory
net config server >> nul
if %errorlevel% neq 0 (
echo User not running with elevated rights %date% %time% >> %batchlog%
echo You're not running as admin rights, you twat XD
echo Press any key to exit
pause >> nul
echo L quitting installer at %date% %time% >> %batchlog%
goto :eof
)
if %errorlevel% equ 0 (
echo admin rights detected >> %batchlog%
if "%~1"=="" {
echo %~1 was passed >> %batchlog%
goto menu
)else goto %~1
goto menu
)
:menu
choice /c AR /m "Add or Remove?"
if %errorlevel% equ 1 (
echo user chose install/add >> %batchlog%
goto install
)
if %errorlevel% equ 2 (
echo user chose uninstall/remove >> %batchlog%
goto uninstall
)
:install
sc query "Mesh Agent"
if %errorlevel% neq 0 (
echo Mesh Agent was not detected >> %batchlog%
:: start %cd%\meshagent64-TNG_Managed.exe -fullinstall
if "%~2"=="tskoff" (
echo script is likely running via group policy as task disable was passed. disabling installer task if the installer ran successfully @ %date% %time% >> %batchlog%
schtasks.exe /Change /TN "NHMeshInstallTask" /Disable
)
if "%~2"=="wks" (
echo Installing WKS Agent...
start %cd%\meshagent64-NH-WKS.exe -fullinstall
)
if "%~2"=="srv"(
echo Installing Server Agent...
start %cd%\meshagent64-NH-Servers.exe -fullinstall
echo L quitting installer at %date% %time% >> %batchlog%
goto :eof
)
if %errorlevel% equ 0 (
echo Mesh Agent is already installed >> %batchlog%
echo Mesh Agent is already installed
echo Checking if started and starting if not started... >> %batchlog%
sc start "Mesh Agent"
if %errorlevel% equ 1056 (
echo Agent is already started >> %batchlog%
rem color a
echo Agent is already started
)
if "%~2"=="tskoff" (
echo script is likely running via group policy as task disable was passed. disabling install task as mesh is installed on %computername% @ %date% %time% >> %batchlog%
schtasks.exe /Change /TN "NHMeshInstallTask" /Disable
)
rem color a
echo Quitting installer in 5 secs
timeout 5
echo L quitting installer at %date% %time% >> %batchlog%
goto :eof
)
:uninstall
sc query "Mesh Agent"
if %errorlevel% equ 0 (
echo Mesh Agent was detected >> %batchlog%
"%programfiles%\Mesh Agent\MeshAgent.exe -fulluninstall"
if %errorlevel% neq 0 (
color c
echo Something happened - check the log %batchlog% for more info :p
pause
echo L quitting installer at %date% %time% >> %batchlog%
goto :eof
)
if %errorlevel% equ 0 (
color a
echo Agent was successfully uninstalled >> %batchlog%
echo Agent was uninstalled successfully
pause
echo L quitting installer at %date% %time% >> %batchlog%
goto :eof
)
)
if %errorlevel% neq 0 (
echo Mesh Agent is already uninstalled >> %batchlog%
echo Mesh Agent is already uninstalled
pause
echo L quitting installer at %date% %time% >> %batchlog%
)

View File

@@ -0,0 +1,28 @@
# Script to get current OU to install MeshCentral Agent.
# Technolog Networks, 04/30/2024
# Define our AD searcher
$adsearcher = New-Object System.DirectoryServices.DirectorySearcher
# Filter to return only computer objs
$adsearcher.Filter = "(&(objectClass=computer)(samAccountName=$env:computername$))"
# Find the object in the directory
$adobjpath = $adsearcher.FindOne()
# Return the LDAP path for the object
$adobject = $adobjpath.GetDirectoryEntry()
# Stupid: get the OU of the computer by returning the parent object
$computerou = $adobject.Parent
if ($computerou.Contains("OU=PersonalComputers")){
echo "This is an XH system ($computerou)"
./TNGMeshInstaller.bat install wks
} elseif ($computerou.Contains("OU=Workstations")) {
echo "This is WKS ($computerou)"
./TNGMeshInstaller.bat install wks
} elseif ($computerou.Contains("OU=Domain Servers")) {
echo "This is a server ($computerou)"
./TNGMeshInstaller.bat install srv
}

39
old/domlogon.bat Normal file
View File

@@ -0,0 +1,39 @@
@echo off
setlocal
title iR/TNG/NH Logon Script
set logonlog="\\technologsvr\batchlogs$\domlogonlog"
set statlog="\\technologsvr\batchlogs$\domstatlog"
rem initial check, if error abort everything
echo Checking if you're on the Technolog internal LAN
ping 10.0.1.2 >nul
ping technologsvr.technolog.net >nul
if %errorlevel% neq 0 goto fuck
rem elevation?
net config server
if %errorlevel% neq 0 echo No elevation found, skipping
rem log to svr
echo $$ System Logon: %username% on %computername% @ %time% %date% >> "\\technologsvr\batchlogs$\domlogonlog"
echo System logon audited
echo Polling stats...
net config workstation >> "\\technologsvr\batchlogs$\domstatlog"
ipconfig >> "\\technologsvr\batchlogs$\domstatlog"
REM net statistics workstation >> "\\technologsvr\batchlogs$\domstatlog"
REM net statistics server >> "\\technologsvr\batchlogs$\domstatlog"
gpresult /r >> "\\technologsvr\batchlogs$\domstatlog"
gpresult >> "\\technologsvr\batchlogs$\domstatlog"
echo stats polled
echo bye
endlocal
exit
:fuck
echo You're not connected to the internal network- aborting
endlocal
exit

11
old/oeminfo.bat Normal file
View File

@@ -0,0 +1,11 @@
set /p manu=set manufacturer:
set /p model=set model:
reg add HKLM\software\microsoft\windows\currentversion\oeminformation\logo /t REG_SZ /d "c:\irnh\horse_120.bmp"
reg add HKLM\software\microsoft\windows\currentversion\oeminformation\Manufacturer /t REG_SZ /d %manu%
reg add HKLM\software\microsoft\windows\currentversion\oeminformation\Model /t REG_SZ /d %model%
reg add HKLM\software\microsoft\windows\currentversion\oeminformation\SupportHours /t REG_SZ /d "None, fuck off"
reg add HKLM\software\microsoft\windows\currentversion\oeminformation\SupportPhone /t REG_SZ /d "867-5309"

4
old/rayburn.bat Normal file
View File

@@ -0,0 +1,4 @@
@echo off
if %username%==srayburn (
start logoff
)