mirror of
https://github.com/dockur/windows.git
synced 2026-08-24 07:39:00 +01:00
feat: Defer mapped Z drive until first access (#2168)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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' \
|
||||
'' \
|
||||
|
||||
Reference in New Issue
Block a user