CJSmith dot me

I dump stuff I find useful here

Creating a shortcut to a non existent location on Windows

Published / by Chris Smith / Leave a Comment

Credit: ServerFault
Credit: Craig Tolley
I came across the need to create a shortcut to a non existent file share (Where a wireless network had a different ip range on a different site). I thought Windows would let shortcuts for SMB shares be created if they didn’t exist, but Windows 10 insisted the share had to exist before being created.
ServerFault has a nice little VBS script (Although it created the shortcut, when run it didn’t close the Microsoft Script Host program. I just closed the command prompt window after)

The forum post shows it has been run on Windows 7, I have run this on Windows 10 Enterprise 64 Bit 1607 and created the shortcut on the desktop

After finding another use for the code I ran into an issue adding parameters to the shortcuts.
I wasn’t aware “Arguments” can be used, Craig Tolley has a nice post on how it is used.

Leave a Reply