chocolatey/chocolatey — pull request #238 by gep13 (2013-01-30 21:48:14+00:00)
Title: Issue 235 - Created new Helper Function to create generic shortcut

As described here:

https://github.com/chocolatey/chocolatey/issues/235

I have created a generic Install-ChocoatelyShortcut helper function to allow a shortcut, with optional parameters, to be created anywhere the user specifies.

I believe that this may also solve Issue 218 as well:

https://github.com/chocolatey/chocolatey/issues/218

I have included 7 new Unit Tests to verify the functionality.

The only thing that I am not "convinced" by are the last two tests. I have created fake files at the root of the C:\ drive, which are tided up after the test is completed. Obviously, it would be better to mock these files. I attempted to use TestDrive for this purpose, however, I could not get this to work. I believe that this is due to .CreateShortcut being a call into a ComObject, which TestDrive can't handle.

Let me know if you have any questions.

Thanks

Gary