1

I am trying to create a program that has the option to allow the user to have the program start automatically on start-up.

I am currently using the Windows Script Host Object Model but that is not usable by default in Windows 8.1.

Does anyone have an idea of how I can create a shortcut? I am considering adding a key to the registry but I rather have it in the start-up folder. I just rather deal with the registry as little as possible if that is realistic.

Thanks

none
  • 418
  • 5
  • 8
  • I would think that the only way would be to know the format of a LNK file and create one yourself using a FileStream. You could create the shortcut you want in Windows and then examine the text/binary data of the file to see how to recreate it. It might take a bit of extra research to find out what it all means though. – jmcilhinney Feb 13 '14 at 02:24
  • Format of the .lnk binary files can be found on: http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/[MS-SHLLINK].pdf – thepirat000 Feb 13 '14 at 03:45
  • Possible duplicate http://stackoverflow.com/questions/234231/creating-application-shortcut-in-a-directory – thepirat000 Feb 13 '14 at 03:48
  • ShellLink looks like it needs a COM object. I am trying to keep from using those since WSH has already bitten me on Windows 8.1. – none Feb 13 '14 at 23:17
  • possible duplicate of [How can I use JScript to create a shortcut that uses "Run as Administrator"](http://stackoverflow.com/questions/11162802/how-can-i-use-jscript-to-create-a-shortcut-that-uses-run-as-administrator) – Paul Sweatte Aug 21 '14 at 02:09

0 Answers0