Ivo,
Maybe I'm doing something incorrectly. Can you evaluate my steps to see where I am messing up?
Derived from https://superuser.com/questions/142420/ ... mmand-lineI'm doing this via PowerShell...#1 Create new foldernew-item -Path "C:\Temp\XYZ" -ItemType Directory
#2 Create desktop.ininew-item -path "C:\Temp\XYZ\desktop.ini" -ItemType File
#3 Edit desktop.ini"[.ShellClassInfo]">>"C:\Temp\XYZ\desktop.ini"
"CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}">>"C:\Temp\XYZ\desktop.ini"
"Flags=2">>"C:\Temp\XYZ\desktop.ini"
#4 Create a shortcut named target.lnk in the folder pointing to the destination folder$wshShell = New-Object -ComObject wscript.shell
$shortcut = $wshShell.CreateShortcut("C:\Temp\XYZ\target.lnk")
$shortcut.TargetPath = "C:\Temp\XYZ"
$shortcut.Save()
#5 Add two empty files that the pinned shortcut will cascadeNew-Item -path "C:\Temp\XYZ\test1.txt" -ItemType File
New-Item -Path "C:\Temp\XYZ\Test2.txt" -ItemType File
#6 Add the system attribute to the folder
attrib +s "C:\Temp\XYZ"
Copy-Item -Path "C:\Temp\XYZ" -Destination "C:\Users\svcDT176071w10sv\AppData\Roaming\ClassicShell\Pinned" -Force
Observations:
The 2 folders I pinned via right-click show up as shortcut icons, but the one I just created (XYZ) does not have the shortcut icon (see attachment-2)When I click on Start - I now see XYZ as a pinned shortcut, but when I hoover over it, it cascades to show "Empty." I would expect to see "Test1.txt" and "Test2.txt"
Performing the pinned step manually via right-click#1 Create new folderI created C:\Temp\ZYX
#2 Create two empty text filestest.txt
test2.txt
#3 Pin to Start menu (Classic Shell)ZYX is now pinned to the Start menu, hovering over shows test.txt test2.txt (see attachment-3)