StefanFoerner
Programmer
Hi eryone,
since the latest update for Windows 10 (version 1709, build 16299.192) you can apparently no longer create a link on the desktop with the Windows Scripting Host method CreateShortcut ...
(Info: in normal folders / subfolders everything works)
The following error message appears:
OLE IDispatch Exception Code 0 from WshShortcut.Save: The "C:\Users\Memotech\Desktop\Test.lnk" link was not saved ...
Under slightly older Windows 10 versions and under Windows 7 everything still works without any problems and without an error message!
- has anyone noticed this effect already?
- must something be changed at the code sequence above?
Regards, Stefan
since the latest update for Windows 10 (version 1709, build 16299.192) you can apparently no longer create a link on the desktop with the Windows Scripting Host method CreateShortcut ...
(Info: in normal folders / subfolders everything works)
Code:
WshShell = CreateObject( "Wscript.Shell" )
desktopStr = WshShell.SpecialFolders( "Desktop" )
shortcutObj = WshShell.CreateShortcut( desktopStr + "\Test.lnk" )
WITH shortcutObj
.TargetPath = "C:\Test\Test.exe"
.WorkingDirectory = "C:\Test"
.Description = "Test-Programm"
.WindowStyle = 1
.Save
ENDWITH
The following error message appears:
OLE IDispatch Exception Code 0 from WshShortcut.Save: The "C:\Users\Memotech\Desktop\Test.lnk" link was not saved ...
Under slightly older Windows 10 versions and under Windows 7 everything still works without any problems and without an error message!
- has anyone noticed this effect already?
- must something be changed at the code sequence above?
Regards, Stefan