wsh - Form disappears when trying to create a shortcut VB.NET -


When my code is dim MyShortcut ... reach ... line vanishes There is no exception, error reporting the windows form still ends with the ongoing process.

More sub CreateShortcut (as the location string target as String) Dim MyShortcut IWshRuntimeLibrary.IWshShortcut = CType ((IWshRuntimeLibrary.WshShellClass new). CreateShortcut (location), IWshRuntimeLibrary .IWsh shortcut) MyShortcut.TargetPath = target MyShortcut.Save () end sub

Please check whether you need more details. I was not sure what might be the cause of this issue, so it did not know what else included.

Thanks in advance!


Comments