(Some of you might remember me posting about this issue long ago. Sorry to drag it up again.)
Now I understand that NSIS doesn't support unicode, so I've decided to turn to the System plug-in, and use API functions to remove said shortcuts.
But the folder still remains. I've resorted to using 8.3 filename conventions since I'm not that well educated in using the System plugin to string together elaberate filenames.
Before I go on:
$SMPROGRAMS I'm using SetShellVarContext all since the game creates items in the All Users group. and I have a check for Admin privledges.
WIND-A~$6 The $6 is just a number that goes from 1-4 to catch the most obvious instances. The long pathname is Wind - a breath of heart - Re:gratitude (the colon being unicode, hence why I have to resort to using 8.3 convention to address it.)
WIND-A~1.LNK 8.3 filename for the following Wind - a breath of heart - Re:gratitude.lnk
This works:
System::Call "kernel32::RemoveDirectoryW(w '\\?\$SMPROGRAMS\minori\lala' )"
as does this:System::Call "kernel32::RemoveDirectoryW(w '\\?\$SMPROGRAMS\minori\BLAHBL~1' )"
$2 being the filename output from a FindFirst search.System::Call "kernel32:😁eleteFileW(w '$SMPROGRAMS\minori\WIND-A~$6\$2' )"
And to get rid of the Shortcut containing unicode, this works:
System::Call "kernel32:😁eleteFileW(w '\\?\$SMPROGRAMS\minori\WIND-A~$6\WIND-A~1.LNK' )"
But to get rid of the (now) empty folder, this does not work:
Any advice will be greatly appreciated.System::Call "kernel32::RemoveDirectoryW(w '\\?\$SMPROGRAMS\minori\WIND-A~$6\' )"
Thank you very much for your time.