SCCM: How to deploy a shortcut
October 26, 2012
Posted by on
1. Create a shortcut
2. copy the shortcut to a file share where you keep your package source files
3. Create a package containing the shortcut
4. Create a program to copy the shortcut to a location you need. Do not forget to put “cmd /c” if you use “copy” command. So it will look like:
cmd /c copy yourlink.lnk <destination folder>\*.*
Where to copy? First of keep in mind SCCM Client works under SYSTEM account and will not put the shortcut to a specific user desktop – for that better use GPOs. What you can do is to put the shortcut for All Users.
In Windows 7 All Users Desktop is located %ProgramData%\Desktop you will not have access to this folder probably, but SCCM Client will.
In one case we needed to put a file in SYSTEM32 folder. I know it is not a good idea to put files there, but it was a requirement of a third-party app. If you try to run a program to copy a file to C:\WINDOWS\SYSTEM32 you may have a surprise – on 64-bit OS your file will occur in c:\WINDOWS\SYSWOW64 instead of \SYSTEM32!
To workaround this behaviour you can use a Task Sequence:
1. Add a Run Command Line step to a custom TS.
2. Configure the step Disable 64-bit file system redirection
3. Add you Package (that instructs the TS to copy it to a local cache)
4. Add command line.