How to create shortcut in startup menu using powershell?Hi, <br/><br/>Can anybody tell me how to create shortcut in startup menu using powershell?<br/><br/>I found some samples about how to do this using VBS but I prefer powershell. :)<br/><br/>Thanks<br/>Leon© 2009 Microsoft Corporation. All rights reserved.Thu, 02 Jul 2009 11:35:04 Z75da1154-cba3-4e38-bd1c-78ebe4984be2http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#75da1154-cba3-4e38-bd1c-78ebe4984be2http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#75da1154-cba3-4e38-bd1c-78ebe4984be2Leonjlhttp://social.technet.microsoft.com/Profile/en-US/?user=LeonjlHow to create shortcut in startup menu using powershell?Hi, <br/><br/>Can anybody tell me how to create shortcut in startup menu using powershell?<br/><br/>I found some samples about how to do this using VBS but I prefer powershell. :)<br/><br/>Thanks<br/>LeonMon, 29 Jun 2009 18:53:20 Z2009-06-29T18:53:20Zhttp://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#fda88355-2fce-4a7d-92a3-91fce4d6e7f8http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#fda88355-2fce-4a7d-92a3-91fce4d6e7f8Marco Shawhttp://social.technet.microsoft.com/Profile/en-US/?user=Marco%20ShawHow to create shortcut in startup menu using powershell?I think these are typically .lnk files.  I don't think PowerShell can easily create these...  Unless you have an existing .lnk file, and you simply want to copy it to a new folder, you may need to refer to the VBS code.<br/> <br/> It possibly uses WScript, and you may want to use an interface to WScript for this...<br/> <br/> So the important question is...  Do you already have an .lnk file, and just need to copy it? Or do you need something from scratch?<br/>Mon, 29 Jun 2009 19:18:06 Z2009-06-29T19:18:06Zhttp://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#f42194df-5a34-4c39-a9f4-ba84c3fd4ac0http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#f42194df-5a34-4c39-a9f4-ba84c3fd4ac0Vadims Podanshttp://social.technet.microsoft.com/Profile/en-US/?user=Vadims%20PodansHow to create shortcut in startup menu using powershell?<pre><span style="color:#800080">$objShell</span><span style="color:#000000"> </span><span style="color:#FF0000">=</span><span style="color:#000000"> </span><span style="color:#5F9EA0;font-weight:bold">New-Object</span><span style="color:#000000"> </span><span style="color:#5F9EA0;font-style:italic">-ComObject</span><span style="color:#000000"> (</span><span style="color:#800000">&quot;</span><span style="color:#800000">WScript.Shell</span><span style="color:#800000">&quot;</span><span style="color:#000000">) </span><span style="color:#800080">$objShortCut</span><span style="color:#000000"> </span><span style="color:#FF0000">=</span><span style="color:#000000"> </span><span style="color:#800080">$objShell</span><span style="color:#000000">.CreateShortcut(</span><span style="color:#800080">$env:USERPROFILE</span><span style="color:#000000"> </span><span style="color:#FF0000">+</span><span style="color:#000000"> </span><span style="color:#800000">&quot;</span><span style="color:#800000">Start Menu\Programs\Startup</span><span style="color:#800000">&quot;</span><span style="color:#000000"> </span><span style="color:#FF0000">+</span><span style="color:#000000"> </span><span style="color:#800000">&quot;</span><span style="color:#800000">\program.lnk</span><span style="color:#800000">&quot;</span><span style="color:#000000">) </span><span style="color:#800080">$objShortCut</span><span style="color:#000000">.TargetPath(</span><span style="color:#800000">&quot;</span><span style="color:#800000">path to program</span><span style="color:#800000">&quot;</span><span style="color:#000000">) </span><span style="color:#800080">$objShortCut</span><span style="color:#000000">.Save()</span></pre> this will create link from scratch.<hr class="sig">[тут могла быть ваша реклама] http://www.sysadmins.lvMon, 29 Jun 2009 21:04:07 Z2009-06-29T21:04:07Zhttp://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#436357ef-74cd-4c9e-886c-60e2ff406abdhttp://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#436357ef-74cd-4c9e-886c-60e2ff406abdMozillaKilledhttp://social.technet.microsoft.com/Profile/en-US/?user=MozillaKilledHow to create shortcut in startup menu using powershell?I think you can do this with the PSCX  extensions package.Tue, 30 Jun 2009 20:40:36 Z2009-06-30T20:40:36Zhttp://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#9e0a7d3f-56ee-41a7-a1fa-8b5e2c6f47e5http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/75da1154-cba3-4e38-bd1c-78ebe4984be2#9e0a7d3f-56ee-41a7-a1fa-8b5e2c6f47e5Mervyn Zhanghttp://social.technet.microsoft.com/Profile/en-US/?user=Mervyn%20ZhangHow to create shortcut in startup menu using powershell?Hi,<br/> <br/> Detailed explanation for Vadims script: <br/> <br/> http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/wshsave.mspx <br/> <br/> Thanks. <br/><hr class="sig">This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights.Thu, 02 Jul 2009 03:36:22 Z2009-07-02T03:36:22Z