diff --git a/03_MakeAll.cmd b/03_MakeAll.cmd index 550a4f9..f062b16 100644 --- a/03_MakeAll.cmd +++ b/03_MakeAll.cmd @@ -17,6 +17,10 @@ date /t time /t echo. +echo cleanup ... +del /F Apps*.txt 2>nul +del /F Packages*.txt 2>nul + rem start scripts for %%S in ( @@ -25,7 +29,7 @@ for %%S in ( export-image.cmd mount-image.cmd - remove-apps.cmd + X_remove-apps.cmd remove-packages.cmd finish-image.cmd diff --git a/scripts/autoconfig-all.cmd b/scripts/autoconfig-all.cmd index d094f66..188f4c9 100644 --- a/scripts/autoconfig-all.cmd +++ b/scripts/autoconfig-all.cmd @@ -10,6 +10,9 @@ del /F %LOG% 1>nul 2>nul if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1 shift /1 +rem show window with log while running scripts ... +start %TOOLS%\installmonitor.exe + echo ####### %0 ####### date /t time /t diff --git a/scripts/cleanup-startmenu.cmd b/scripts/cleanup-startmenu.cmd index 7b771d5..d28d5d5 100644 --- a/scripts/cleanup-startmenu.cmd +++ b/scripts/cleanup-startmenu.cmd @@ -10,6 +10,7 @@ taskkill /f /im StartMenuExperienceHost.exe 2>nul taskkill /f /im shellexperiencehost.exe 2>nul taskkill /f /im explorer.exe 2>nul +echo sleep 3 seconds ... ping 127.0.0.1 -n 3 >nul 2>nul echo cleanup TempState directories and reset cache ... @@ -35,7 +36,7 @@ move /Y %STARTMENU%\"Accessories\System Tools\Character*.*" ^ %STARTMENU%\"Accessories" 2>nul rd /S /Q %STARTMENU%\"Accessories\System Tools" 2>nul -echo start explorer again ... +echo sleep 3 seconds and start explorer ... ping 127.0.0.1 -n 3 >nul 2>nul start explorer.exe diff --git a/scripts/install-firefox.cmd b/scripts/install-firefox.cmd index 6169ab3..1d44d0c 100644 --- a/scripts/install-firefox.cmd +++ b/scripts/install-firefox.cmd @@ -29,7 +29,8 @@ echo ####### %0 ####### @echo on cd %SOFTWARE% firefox-setup.exe /S /MaintenanceService=false /TaskbarShortcut=false /RegisterDefaultAgent=false -timeout /T 10 +echo sleep 10 seconds ... +ping 127.0.0.1 -n 10 > NUL 2>&1 @echo off cd %SCRIPTS% diff --git a/scripts/modify-desktoptheme.cmd b/scripts/modify-desktoptheme.cmd index a889af9..bc16b2d 100644 --- a/scripts/modify-desktoptheme.cmd +++ b/scripts/modify-desktoptheme.cmd @@ -10,7 +10,9 @@ echo activating AEROLITE theme ... powershell -command "Start-Process %THEMES%\aerolite.theme" @echo off -timeout /T 5 +echo sleep 10 seconds ... +ping 127.0.0.1 -n 10 > NUL 2>&1 + taskkill /F /IM SystemSettings.exe 2>nul echo ####### %0 ####### diff --git a/scripts/uninstall-edge.cmd b/scripts/uninstall-edge.cmd index aa60301..2dd7a31 100644 --- a/scripts/uninstall-edge.cmd +++ b/scripts/uninstall-edge.cmd @@ -9,7 +9,9 @@ echo ####### %0 ####### @echo on %EDGEROOT%\%INSTALLER%\setup.exe --uninstall --system-level --verbose-logging --force-uninstall @echo off -timeout /T 10 + +echo sleep 10 seconds ... +ping 127.0.0.1 -n 10 > NUL 2>&1 echo. echo cleanup ... diff --git a/scripts/uninstall-onedrive.cmd b/scripts/uninstall-onedrive.cmd index 594765b..d20f54d 100644 --- a/scripts/uninstall-onedrive.cmd +++ b/scripts/uninstall-onedrive.cmd @@ -7,6 +7,8 @@ echo ####### %0 ####### echo KILLING OneDrive ... taskkill /f /im OneDrive.exe > NUL 2>&1 + +echo sleep 5 seconds ... ping 127.0.0.1 -n 5 > NUL 2>&1 echo UNINSTALLING OneDrive ... @@ -15,6 +17,8 @@ if exist %x64% ( ) else ( %x86% /uninstall ) + +echo sleep 5 seconds ... ping 127.0.0.1 -n 5 > NUL 2>&1 echo CLEANUP OneDrive ... diff --git a/source/installmonitor.pb b/source/installmonitor.pb new file mode 100644 index 0000000..bbec515 --- /dev/null +++ b/source/installmonitor.pb @@ -0,0 +1,80 @@ +; installmonitor.pb +; ------------------------------------------------------------ +; tool to monitor the running installation ... +; LICENSE : GPL +; AUTHOR : Michael H.G. Schmidt +; EMAIL : michael@schmidt2.de +; DATE : 20210321 +; ------------------------------------------------------------ +; + +; Get system drive +SYS$=GetEnvironmentVariable("SystemDrive") + +; logfile to monitor ... +logfile$=SYS$+"\tools\scripts\autoconfig-all.txt" + +;;;;;;; +; MAIN +;;;;;;; + +; open window to hide all other windows on desktop ... +OpenWindow(0, 0, 0, 0, 0, "Unattended Installation - running scripts ...", #PB_Window_SystemMenu | #PB_Window_Maximize) +StickyWindow(0,#True) +SetActiveWindow(0) + +; set colour to windows blue ... +SetWindowColor(0, RGB($00,$a2,$ed)) + +; Get window size +W = WindowWidth(0) +H = WindowHeight(0) + +; create text field ... +EditorGadget(0, 8, 8, W-16, H-16, #PB_Editor_ReadOnly | #PB_Editor_WordWrap) + +; load system font +LoadFont(0, "System", 12) +SetGadgetFont(0, FontID(0)) + +; open logfile ... +If Not ReadFile(0, logfile$, #PB_File_SharedWrite | #PB_File_NoBuffering) + AddGadgetItem(0, -1, "===== ERROR while trying to open logfile: [ "+logfile$+" ] ! =====") + Repeat: Delay(1) + Until WaitWindowEvent() = #PB_Event_CloseWindow + End +EndIf + +; goto end of file ... +FileSeek(0,Lof(0)) + +; print starting message ... +AddGadgetItem(0, -1, "===== Starting Installation. Logfile = [ "+logfile$+"] =====") + +; get filesize ... +filesize=Lof(0) +Repeat + + ; new data ? + If ( filesize < Lof(0) ) + ; print new file contents ... + Repeat + AddGadgetItem(0, -1, ReadString(0)) + Until Eof(0) + filesize=Lof(0) + + ; scroll down editor gadget ... + SendMessage_(GadgetID(0), #EM_SETSEL,-1,-1) + + ; window refresh ... + StickyWindow(0,#True) + SetActiveWindow(0) + + EndIf + +Until WaitWindowEvent() = #PB_Event_CloseWindow + +; IDE Options = PureBasic 5.73 LTS (Windows - x64) +; CursorPosition = 36 +; FirstLine = 15 +; EnableXP \ No newline at end of file diff --git a/source/simpletail.pb b/source/simpletail.pb new file mode 100644 index 0000000..6f492b1 --- /dev/null +++ b/source/simpletail.pb @@ -0,0 +1,76 @@ +; simpletail.pb +; ------------------------------------------------------------ +; show a file and print changes in realtime ... +; LICENSE : GPL +; AUTHOR : Michael H.G. Schmidt +; EMAIL : michael@schmidt2.de +; DATE : 20210321 +; ------------------------------------------------------------ +; + +OpenConsole() +SetConsoleCtrlHandler_(?CTRLC,#True) + +; check commandline ... +If ( CountProgramParameters() <> 2 ) + ConsoleColor(14,0) + PrintN("") + PrintN("usage: simpletail <filename> <refreshtime>") + PrintN("") + ConsoleColor(15,0) + PrintN("show a files content and print changes in realtime") + PrintN(" filename : full or relative path to file") + PrintN(" refreshtime: time in seconds for refresh") + ConsoleColor(7,0) + PrintN("") + End 99 +EndIf + +; get arguments ... +filename$ = ProgramParameter(0) +refreshtime = Val(ProgramParameter(1)) + +; +; MAIN +; + +If Not ReadFile(0, filename$, #PB_File_SharedWrite | #PB_File_NoBuffering) + PrintN("ERROR while opening file: " + filename$ + " !") + End 99 +EndIf + +; goto end of file ... +FileSeek(0,Lof(0)) + +; print a message ... +PrintN("===== Starting TAIL for file [ "+filename$+" ] =====") + +; get filesize ... +filesize=Lof(0) +Repeat + + ; new data ? + If ( filesize < Lof(0) ) + ; print new file contents ... + Repeat + PrintN(ReadString(0)) + Until Eof(0) + filesize=Lof(0) + EndIf + + ; wait (refreshtime in seconds) ... + Delay(refreshtime * 1000) + +ForEver + +; exit here ... +CTRLC: +PrintN("CTRL-C pressed") +CloseFile(0) +CloseConsole() +End 0 + +; IDE Options = PureBasic 5.73 LTS (Windows - x64) +; CursorPosition = 57 +; FirstLine = 25 +; EnableXP \ No newline at end of file diff --git a/tools/.gitignore b/tools/.gitignore index d343ad3..1367f13 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -6,3 +6,5 @@ !setbgcol.exe !deltree.exe !allpull.exe +!simpletail.exe +!installmonitor.exe diff --git a/tools/installmonitor.exe b/tools/installmonitor.exe new file mode 100644 index 0000000..50b3313 Binary files /dev/null and b/tools/installmonitor.exe differ diff --git a/tools/simpletail.exe b/tools/simpletail.exe new file mode 100644 index 0000000..7c75628 Binary files /dev/null and b/tools/simpletail.exe differ diff --git a/wim/SUSPECT.csv b/wim/SUSPECT.csv new file mode 100644 index 0000000..8049020 --- /dev/null +++ b/wim/SUSPECT.csv @@ -0,0 +1,7 @@ +Microsoft-Windows-Backup +Microsoft-Windows-Basic-Http-Minio +Microsoft-Windows-BioEnrollment +Microsoft-Windows-BITS +Microsoft-Windows-Branding-Enterprise +Microsoft-Windows-Browser +Microsoft-Windows-BusinessScanning diff --git a/wim/finish-boot.cmd b/wim/finish-boot.cmd index 320d77d..8dcfafe 100644 --- a/wim/finish-boot.cmd +++ b/wim/finish-boot.cmd @@ -22,7 +22,10 @@ echo replacing setup.exe with our installer utility ... copy /Y installer.exe %BOOT%\setup.exe echo copy snapshot64 to boot ... -copy /Y ..\software\snapshot64.exe %BOOT% +copy /Y ..\software\snapshot64.exe %BOOT% + +echo copy netuse helper script to boot ... +copy /Y netuse.cmd %BOOT% echo showing boot contents ... dir %BOOT% diff --git a/wim/netuse.cmd b/wim/netuse.cmd new file mode 100644 index 0000000..a2e67f7 --- /dev/null +++ b/wim/netuse.cmd @@ -0,0 +1,30 @@ +@echo off + +set DRIVE= +set /p DRIVE="Drive to use [Z] ? " +IF %DRIVE%.==. set DRIVE=Z + +set SERVER= +set /p SERVER="Network Server [nas] ? " +IF %SERVER%.==. set SERVER=nas + +set SHARE= +set /p SHARE="Share to mount [DATA] ? " +IF %SHARE%.==. set SHARE=DATA + +set USER= +set /p USER="User [guest] ? " +IF %USER%.==. set USER=guest + +set PASSWORD= +set /p PASSWORD="Password [guest] ? " +IF %PASSWORD%.==. set PASSWORD=guest + +echo. +echo EXECUTING: net use %DRIVE%: \\%SERVER%\%SHARE% /USER:%USER% xxxxxxxx + +net use %DRIVE%: /DELETE 1>nul 2>nul +net use %DRIVE%: \\%SERVER%\%SHARE% /USER:%USER% %PASSWORD% + +echo READY. +echo. \ No newline at end of file diff --git a/wim/packages-to-remove.csv b/wim/packages-to-remove.csv index 65297e5..4a36320 100644 --- a/wim/packages-to-remove.csv +++ b/wim/packages-to-remove.csv @@ -1,131 +1,5 @@ -Microsoft-Windows-3DAudio -Microsoft-Windows-ApiSetSchemaExtension-HyperV -Microsoft-Windows-AppCompat -Microsoft-Windows-AppManagement -Microsoft-Windows-AppServerClient -Microsoft-Windows-Backup -Microsoft-Windows-Basic-Http-Minio -Microsoft-Windows-BioEnrollment -Microsoft-Windows-BITS -Microsoft-Windows-Branding-Enterprise -Microsoft-Windows-Browser -Microsoft-Windows-BusinessScanning Microsoft-Windows-Casting Microsoft-Windows-Client-AssignedAccess Microsoft-Windows-Client-EmbeddedExp Microsoft-Windows-Client-Optional-Features Microsoft-Windows-Client-ShellLauncher -Microsoft-Windows-Common-Modem -Microsoft-Windows-COM-MSMQ -Microsoft-Windows-Compression -Microsoft-Windows-ContactSupport -Microsoft-Windows-ContentDeliveryManager -Microsoft-Windows-CoreSystem-DebugTransports -Microsoft-Windows-Cortana -Microsoft-Windows-DataCenterBridging -Microsoft-Windows-DeviceSync -Microsoft-Windows-DirectoryServices -Microsoft-Windows-EnterpriseClientSync -Microsoft-Windows-FodMetadata -Microsoft-Windows-Geolocation -Microsoft-Windows-Hello-Face -Microsoft-Windows-Help -Microsoft-Windows-HVSI-Components -Microsoft-Windows-HyperV-OptionalFeature-HypervisorPlatform -Microsoft-Windows-HyperV-OptionalFeature-VirtualMachinePlatform -Microsoft-Windows-Identity-Foundation -Microsoft-Windows-IIS-WebServer -Microsoft-Windows-International -Microsoft-Windows-InternetExplorer -Microsoft-Windows-Internet -Microsoft-Windows-Killbits -Microsoft-Windows-LanguageEnablingComponents -Microsoft-Windows-LanguageFeatures -Microsoft-Windows-Legacy -Microsoft-Windows-Links -Microsoft-Windows-Lxss -Microsoft-Windows-Management-SecureAssessment -Microsoft-Windows-Migration -Microsoft-Windows-MiracastView -Microsoft-Windows-MobileBroadband -Microsoft-Windows-MobileCore -Microsoft-Windows-MobilePC -Microsoft-Windows-MRT10 -Microsoft-Windows-MSMQ -Microsoft-Windows-MultiPoint-Connector -Microsoft-Windows-Network-Connectivity-Assistant -Microsoft-Windows-NetworkDiagnostics -Microsoft-Windows-Network-QoS -Microsoft-Windows-NFS -Microsoft-Windows-Not-Supported-On-LTSB -Microsoft-Windows-OfflineFiles -Microsoft-Windows-OneCore-Containers -Microsoft-Windows-OneDrive -Microsoft-Windows-ParentalControls -Microsoft-Windows-PAW-Feature -Microsoft-Windows-PeerDist -Microsoft-Windows-PeerToPeer -Microsoft-Windows-PerformanceCounters -Microsoft-Windows-PhotoBasic -Microsoft-Windows-Portable-Devices -Microsoft-Windows-Printing-InternetPrinting-Client -Microsoft-Windows-Printing-LocalPrinting-Enterprise -Microsoft-Windows-Printing-PremiumTools -Microsoft-Windows-Printing-PrintToPDFServices -microsoft-windows-printing-wfs-fod-package-Wrapper -Microsoft-Windows-Printing-WFS-FoD-Package -Microsoft-Windows-Printing-XPSServices -Microsoft-Windows-Provisioning -Microsoft-Windows-Proximity -Microsoft-Windows-QuickAssist -Microsoft-Windows-RDC -Microsoft-Windows-RemoteAssistance -Microsoft-Windows-RemoteDesktop -Microsoft-Windows-RemoteFX -Microsoft-Windows-RetailDemo -Microsoft-Windows-Search2 -Microsoft-Windows-SearchEngine -Microsoft-Windows-SenseClient -Microsoft-Windows-Serial -Microsoft-Windows-ShareMedia -Microsoft-Windows-Shell-HomeGroup -Microsoft-Windows-Shell-SettingSync -Microsoft-Windows-Skype -Microsoft-Windows-SMB1Client-D -Microsoft-Windows-SMB1Deprecation-Group -Microsoft-Windows-SMB1 -Microsoft-Windows-SMB1Server-D-Opt -Microsoft-Windows-SmbDirect-Opt -Microsoft-Windows-SmbDirect -Microsoft-Windows-SnippingTool -Microsoft-Windows-SNMP -Microsoft-Windows-StorageService -Microsoft-Windows-Store -Microsoft-Windows-SystemRestore -Microsoft-Windows-TabletPC -Microsoft-Windows-TabletPCMath -microsoft-windows-tabletpcmath-package-Wrapper -Microsoft-Windows-TabShellExperience -Microsoft-Windows-TerminalServices -Microsoft-Windows-TextPrediction-Dictionaries -Microsoft-Windows-TextPrediction -Microsoft-Windows-TroubleShooting -Microsoft-Windows-TS -Microsoft-Windows-UpdateTargeting-ClientOS -Microsoft-Windows-UserExperience -microsoft-windows-userexperience-desktop-package-Wrapper -Microsoft-Windows-Virtualization-RemoteFX-User-Mode-Transport -Microsoft-Windows-Virtualization -Microsoft-Windows-VirtualPC -Microsoft-Windows-VirtualXP -Microsoft-Windows-WebcamExperience -Microsoft-Windows-WindowsFoundation-LanguagePack -Microsoft-Windows-WinOcr -Microsoft-Windows-WinRT -Microsoft-Windows-WinSATMediaFiles -Microsoft-Windows-WMIPerf -Microsoft-Windows-WordBreaking -Microsoft-Windows-WorkplaceJoin -Microsoft-Windows-WPD-LegacyWmdmFeature -Microsoft-Windows-WPD-UltimatePortableDeviceFeature-Feature -Microsoft-Windows-Xps \ No newline at end of file