May I ask you to make changes to two batch files to ensure smooth operations
when copying shortcuts and creating pins.
1.: See "%_CUSTOMFILES_%\PEMaterial\Autoruns\Startup\PinShortcuts.bat"
When switching from the user who logged in first (Admin or SYSTEM) to the other (SYSTEM or Admin)
then all user-made pins created by "call PinToStartMenu ..." and "call PinToTaskbar ..."
(they are the content of "PinShortcuts.lua")
are missing because of line #1 "set RunOnce=1" in "PinShortcuts.bat"
So let's exclude the file "%_CUSTOMFILES_%\PEMaterial\Autoruns\Startup\PinShortcuts.bat"
from being renamed by "%_CUSTOMFILES_%\PEMaterial\Autoruns\Runner.bat" after its 1st run at PE startup:
line #1
Code: Select all
set RunOnce=1
Code: Select all
set RunOnce=0
Code: Select all
rem -- set RunOnce=1
2.: See "%_CUSTOMFILES_%\PEMaterial\Autoruns\Startup\BeforeShell\CopyShortcuts.bat"
Add xcopy.exe command parameter (especially the /H - e.i.: include "Hidden" and "System" attributes)
Otherwise, when switching from the initially active Admin account to the SYSTEM account, some shortcuts within folders with the "hidden" and/or "system" attributes will be missing.
Ex.: "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\*.lnk"
and: "X:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\*.lnk"
where I have placed shortcut at build time.
Line #6 and #7
Code: Select all
xcopy /s /y "X:\Users\Administrator..."
Code: Select all
"Xcopy.exe /s /h /y "X:\Users\Administrator..."
Code: Select all
"Xcopy.exe /k /r /e /i /s /c /h /q /y "X:\Users\Administrator..."
I am sure that the additional parameters I have added can only be useful.
What do You think about it?
See You
.