feat: Defer mapped Z drive until first access (#2168)

This commit is contained in:
Kroese
2026-08-21 00:31:09 +02:00
committed by GitHub
parent eeaf64bdd9
commit f6e6a15b42
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -2057,6 +2057,16 @@ updateSetupScript() {
fi
if ! disabled "${SHORTCUT:-}" && ! disabled "${SAMBA:-}"; then
printf -v content '%s\n%s\n%s\n%s' \
'rem Add the shared folder to the desktop and map it to drive Z:.' \
'reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider" /v "RestoreConnection" /t REG_DWORD /d 0 /f' \
'if not exist "%USERPROFILE%\Desktop\Shared" mklink /d "%USERPROFILE%\Desktop\Shared" \\host.lan\Data' \
'net.exe use Z: \\host.lan\Data /persistent:yes'
replaceSetupBlock "$script" "SHARED_FOLDER" "$content" || return 1
fi
enableLog "$script" || return 1
updateProductKey "$script" || return 1
removeSharedFolder "$script" || return 1
+3
View File
@@ -724,6 +724,9 @@ writeRegistry() {
'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wscsvc]' \
'"Start"=dword:00000004' \
'' \
'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider]' \
'"RestoreConnection"=dword:00000000' \
'' \
'[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]' \
'"NoAutoUpdate"=dword:00000001' \
'' \