From 84786c304190141bc0b50ad6c69147d50b073fcc Mon Sep 17 00:00:00 2001
From: JG <it@hgw-tornesch.de>
Date: Mon, 22 May 2023 11:21:28 +0200
Subject: [PATCH] Unified pushd/popd usage

---
 Fix long login times.cmd                    | 14 +++++++-------
 Fix printer not install- and selectable.cmd |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Fix long login times.cmd b/Fix long login times.cmd
index 6e8364a..f362db5 100644
--- a/Fix long login times.cmd	
+++ b/Fix long login times.cmd	
@@ -30,13 +30,13 @@ if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)
 REM Functional part
 pushd "C:\Users" && (
 for /f "tokens=*" %%a in ('dir /A:D /b') do (
- if not "%%a" == "Public" if not "%%a" == "All Users" if not "%%a" == "Default User" (
- pushd "C:\Users\%%a\AppData\Local\Microsoft\Windows" && (
-  rd /s /q WebCache
-  del /q /f WebCacheLock.dat
-)
- popd
-)
+  if not "%%a" == "Public" if not "%%a" == "All Users" if not "%%a" == "Default User" (
+    pushd "C:\Users\%%a\AppData\Local\Microsoft\Windows" && (
+    rd /s /q WebCache
+    del /q /f WebCacheLock.dat
+    popd
+    )
+  )
 )
 popd
 )
diff --git a/Fix printer not install- and selectable.cmd b/Fix printer not install- and selectable.cmd
index 15e6776..76dd0bc 100644
--- a/Fix printer not install- and selectable.cmd	
+++ b/Fix printer not install- and selectable.cmd	
@@ -32,8 +32,8 @@ net stop spooler
 pushd "%~dp0\ScriptFiles\PrinterNotInstallable" && (
 reg import "Printer Spooler Registry.reg"
 robocopy spool C:\Windows\System32\spool *
-)
 popd
+)
 net start spooler
 echo Done.
 pause
-- 
GitLab