OO verbessert und ahk hinzugefügt.
This commit is contained in:
28
config.ps1
28
config.ps1
@@ -10,7 +10,7 @@ $toRemove = @('Clipchamp.Clipchamp_yxz26nhyzhsrt', 'Microsoft.549981C3F5F10_8wek
|
||||
|
||||
$toInstall = @('7zip.7zip', 'VideoLAN.VLC', 'SumatraPDF.SumatraPDF', 'Microsoft.VisualStudioCode', 'Bitwarden.Bitwarden', 'Mozilla.Firefox', 'IrfanSkiljan.IrfanView', 'Microsoft.PowerToys',
|
||||
'Joplin.Joplin', 'WireGuard.WireGuard', 'Devolutions.RemoteDesktopManager', 'TeamViewer.TeamViewer', 'NickeManarin.ScreenToGif', 'JanDeDobbeleer.OhMyPosh', 'WiresharkFoundation.Wireshark', 'Famatech.AdvancedIPScanner',
|
||||
'yt-dlp.yt-dlp'.'Audacity.Audacity', 'ffmpeg', 'mp4-merge')
|
||||
'yt-dlp.yt-dlp'.'Audacity.Audacity', 'ffmpeg', 'mp4-merge', 'AutoHotkey.AutoHotkey')
|
||||
|
||||
$toInstallOpt = @('Element.Element', 'Discord.Discord', 'Corsair.iCUE.4', 'Valve.Steam', 'GOG.Galaxy', 'TeXstudio.TeXstudio', 'MiKTeX.MiKTeX', 'Citrix.Workspace', 'Nvidia.GeForceExperience', 'Mojang.MinecraftLauncher',
|
||||
'Elgato.StreamDeck', 'REALiX.HWiNFO', '9P4CLT2RJ1RS', 'Microsoft.SQLServerManagementStudio', 'Soundboard', 'VMware.WorkstationPro', 'OBSProject.OBSStudio', 'Microsoft.Teams')
|
||||
@@ -102,12 +102,22 @@ function InstallSoftware {
|
||||
Write-Host "Installiere mp4-merge..." -ForegroundColor Blue
|
||||
try {
|
||||
curl.exe -L https://github.com/gyroflow/mp4-merge/releases/download/v0.1.4/mp4_merge-windows64.exe -o C:\Windows\mp4merge.exe
|
||||
Write-Host "ffmpeg wurde erfolgreich installiert." -ForegroundColor Green
|
||||
Write-Host "mp4-merge wurde erfolgreich installiert." -ForegroundColor Green
|
||||
}
|
||||
catch {
|
||||
Write-Host "Es ist ein Fehler bei der Installation von mp4-merge auftreten. Bitte das Log durchsuchen." -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
elseif ($utility -eq 'AutoHotkey.AutoHotkey'){
|
||||
Write-Host "Installiere AutoHotkey..." -ForegroundColor Blue
|
||||
try {
|
||||
winget install -e --id AutoHotkey.AutoHotkey -l "C:\Program Files\AutoHotKey"
|
||||
Write-Host "AutoHotkey wurde erfolgreich installiert." -ForegroundColor Green
|
||||
}
|
||||
catch {
|
||||
Write-Host "Es ist ein Fehler bei der Installation von Autohotkey auftreten. Bitte das Log durchsuchen." -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Catch {
|
||||
@@ -235,6 +245,15 @@ function InstallSoftware {
|
||||
}
|
||||
}
|
||||
}
|
||||
# Autohotkey in Startup
|
||||
Write-Host "Verlinke AutoHokey Scripts ..." -ForegroundColor Blue
|
||||
$sourceDir = "~\.winconfig\configs\autohotkey"
|
||||
$targetDir = "~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||
Get-ChildItem -Path $sourceDir | ForEach-Object {
|
||||
$linkPath = Join-Path $targetDir $_.Name
|
||||
New-Item -ItemType SymbolicLink -Path $linkPath -Target $_.FullName -ErrorAction SilentlyContinue | Out-Null
|
||||
}
|
||||
Write-Host "AutoHotkey Scripts erfolgreich installiert." -ForegroundColor Green
|
||||
# Powershell Modul für Updates
|
||||
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
|
||||
Write-Hoste "Windows Update Powershell Modul ist bereits installiert." -ForegroundColor Blue
|
||||
@@ -253,11 +272,12 @@ function InstallSoftware {
|
||||
Read-Host "Bitte das Terminal / Powershell neu starten damit die Aenderungen uebernommen werden."
|
||||
# Windows Explorer Einrichten
|
||||
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -Value "" -Force
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'Hidden' -value '00000001'
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFileExt' -value '00000000'
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'Hidden' -value '00000001' # Versteckte Files anzeigen
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFileExt' -value '00000000' # Fileextensions anzeigen lassen
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CabinetState' -Name 'FullPath' -value '00000001'
|
||||
Remove-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'TaskbarSi'
|
||||
New-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'TaskbarSi' -value '0000001' -PropertyType DWORD
|
||||
Set-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' -Name 'EnableAutoTray' -value '00000001' # Alle Tray Icons immer anzeigen
|
||||
Write-Host "Starte Explorer neu um änderungen zu übernehmen"
|
||||
Get-Process explorer | Stop-Process
|
||||
|
||||
|
||||
34
configs/autohotkey/NewTxt.ahk
Normal file
34
configs/autohotkey/NewTxt.ahk
Normal file
@@ -0,0 +1,34 @@
|
||||
#Requires AutoHotkey v2.0
|
||||
;Mit Strg, Shift + M wird ein leeres Textfile erzeugt.
|
||||
#HotIf ("ahk_class CabinetWClass")
|
||||
^+m::
|
||||
{
|
||||
WinID := WinGetID("ahk_class CabinetWClass")
|
||||
CurrentPath := GetPath(WinID)
|
||||
CreateFile(CurrentPath)
|
||||
return
|
||||
}
|
||||
#HotIf
|
||||
|
||||
;Ermittelt den aktuellen Pfad
|
||||
GetPath(_hwnd)
|
||||
{
|
||||
for w in ComObject("Shell.Application").Windows
|
||||
if (w.hwnd = _hwnd)
|
||||
{
|
||||
path := StrReplace(w.LocationURL, "file:///")
|
||||
return StrReplace(path, "%20", " ")
|
||||
}
|
||||
}
|
||||
|
||||
;Schreibt die Datei
|
||||
CreateFile(path)
|
||||
{
|
||||
file := path "/NewFile.txt"
|
||||
if FileExist(file)
|
||||
{
|
||||
MsgBox "NewFile.txt bereits vorhanden"
|
||||
return
|
||||
}
|
||||
FileAppend "", file
|
||||
}
|
||||
@@ -41,7 +41,7 @@ P016 -
|
||||
A001 +
|
||||
A002 +
|
||||
A003 +
|
||||
A004 +
|
||||
A004 -
|
||||
A006 -
|
||||
A005 +
|
||||
P007 +
|
||||
|
||||
@@ -11,6 +11,14 @@ function allupdates {
|
||||
Set-Location $HOME/.winconfig ; ./OOSU10.exe configs/ooshutup10/ooshutup10.cfg /quiet
|
||||
Write-Host "Ziehe aktuelle winconfig von git..." -ForegroundColor Blue
|
||||
Set-Location $HOME/.winconfig ; git pull
|
||||
Write-Host "Aktuallisiere AutoHokey Scripts ..." -ForegroundColor Blue
|
||||
$sourceDir = "$HOME\.winconfig\configs\autohotkey"
|
||||
$targetDir = "$HOME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||
Get-ChildItem -Path $targetDir -Filter *.ahk -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue
|
||||
Get-ChildItem -Path $sourceDir | ForEach-Object {
|
||||
$linkPath = Join-Path $targetDir $_.Name
|
||||
New-Item -ItemType SymbolicLink -Path $linkPath -Target $_.FullName -ErrorAction SilentlyContinue | Out-Null
|
||||
}
|
||||
Write-Host "Update aller Powershell Module..." -ForegroundColor Blue
|
||||
Write-Host -ForegroundColor Blue 'Get all PowerShell modules'
|
||||
function Remove-OldPowerShellModules {
|
||||
@@ -146,7 +154,4 @@ function allupdates {
|
||||
}
|
||||
}
|
||||
}
|
||||
# ooshutup10 ausführen. Manchmal werden settings nach Windos updates zurückgesetzt
|
||||
Write-Host "Spiele aktuelle OOSHUTUP10 config ein... " -ForegroundColor Blue
|
||||
Set-Location $HOME/.winconfig ; ./OOSU10.exe configs/ooshutup10/ooshutup10.cfg /quiet
|
||||
}
|
||||
Reference in New Issue
Block a user