w10install/scripts/install-logonscript.cmd
Michael H.G. Schmidt 4aa6dffcf9 .
2021-01-12 19:11:44 +01:00

22 lines
514 B
Batchfile

@echo off
set TOOLS=c:\tools
set TARGET="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
echo ####### %0 #######
echo cleanup ...
del /Q /F %TARGET%\logon* 1>nul 2>nul
rd /S /Q %PUBLIC%\Desktop\Startup 1>nul 2>nul
echo creating link for logon script ...
mklink %TARGET%\logon.cmd %TOOLS%\logon.cmd
echo create link for Startup folder on desktop ...
mklink /D "%PUBLIC%\Desktop\Startup" %TARGET%
echo execute logon script ...
call %TARGET%\logon.cmd
echo ####### %0 #######