{"id":17,"date":"2013-08-01T14:28:52","date_gmt":"2013-08-01T13:28:52","guid":{"rendered":"http:\/\/ketandesai.co.uk\/?p=17"},"modified":"2026-03-22T15:54:17","modified_gmt":"2026-03-22T15:54:17","slug":"startup-items","status":"publish","type":"post","link":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/","title":{"rendered":"Find Startup Items"},"content":{"rendered":"\n<p>A long time ago i&nbsp;found this VBS script to display&nbsp;the start-up&nbsp;items for a windows pc. i&nbsp;can not remember who is the author of the script.<\/p>\n\n\n\n<p>hopefully this will help someone.<\/p>\n\n\n\n<p>&nbsp;This script is a VBS script<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#FFFFFF\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly> \n' StartupList.vbs - Create a text listing of all startup items.\n\n' ************************** User Tweaks *********************************\n' The FileExt variable can be used to change the default output format\n' Suggestions: htm, doc, rtf. If not specified, defaults to .txt\nFileExt\u00a0= \"\" : If FileExt\u00a0= \"\" Then FileExt = \"txt\"\n\n' The OpenWith variable is optional, to open results in specific program\n' If variable is empty, Windows will use default program for FileExt type\nOpenWith\u00a0= \"\" : If OpenWith\u00a0&lt;> \"\" Then OpenWith\u00a0= Trim(OpenWith) &amp; \" \"\n' ************************************************************************\n\nWith CreateObject(\"WScript.Network\")\nComputerName\u00a0= .ComputerName\nUserName = .UserName\nEnd With\n\nSet fso\u00a0= CreateObject(\"Scripting.FileSystemObject\")\nSet ws\u00a0= CreateObject(\"WScript.Shell\")\nTmpFile\u00a0= ws.ExpandEnvironmentStrings(\"%TEMP%\") &amp; \"\\Startup.\" &amp; Trim(FileExt)\n\nWith fso.CreateTextFile(TmpFile, True)\n.WriteLine\u00a0WriteCode(\"Startup Items for Computer: \" &amp; ComputerName &amp; _\n\", User: \" &amp; UserName &amp; \", \" &amp; Now())\n.WriteLine\u00a0WriteCode(\"\")\nFor Each o in GetObject _\n(\"winmgmts:\\\\\" &amp; ComputerName\u00a0&amp; \"\\root\\cimv2\").ExecQuery(_\n\"Select Name, Command, User, Location from Win32_StartupCommand\",,48)\nIf LCase(o.Command) &lt;> \"desktop.ini\" _\nAND LCase(o.User) &lt;> \".default\" _\nAND InStr(LCase(o.User), \"nt authority\") = 0 Then\n.WriteLine\u00a0WriteCode(\"Name: \" &amp; o.Name)\n.WriteLine\u00a0WriteCode(\"Command: \" &amp; o.Command)\n.WriteLine\u00a0WriteCode(\"User: \" &amp; o.User)\n.WriteLine\u00a0WriteCode(\"Startup Location: \" &amp; o.Location)\n.WriteLine\u00a0WriteCode(\"\")\nElse\ns = s\u00a0&amp; vbcrlf\u00a0&amp; WriteCode(\"Name: \" &amp; o.Name)\ns = s\u00a0&amp; vbcrlf\u00a0&amp; WriteCode(\"Command: \" &amp; o.Command)\ns = s\u00a0&amp; vbcrlf\u00a0&amp; WriteCode(\"User: \" &amp; o.User)\ns = s\u00a0&amp; vbcrlf\u00a0&amp; WriteCode(\"Startup Location: \" &amp; o.Location)\ns = s\u00a0&amp; WriteCode(\"\") &amp; vbcrlf\nEnd If\nNext\n\nIf s &lt;> \"\" Then\n.WriteLine\u00a0WriteCode(String(25, \"*\"))\n.WriteLine\u00a0WriteCode(\"Additional non-relevant item(s) \" &amp; _\n\"in the Startup configuration:\")\n.WriteLine s\n.WriteLine\u00a0WriteCode(\"\")\nEnd If\n.WriteLine\u00a0WriteCode(\"NOTE: This file will be deleted when you close \" &amp; _\n\"it. If you wish to retain this information, \" &amp; _\n\"Print it or use File, Save As...\")\n.WriteLine\u00a0WriteCode(\"\")\n.Close\nEnd With\n\n' Some programs do not work properly with bWaitOnReturn argument\nOn Error Resume Next\nws.Run OpenWith &amp; TmpFile,,True\nOn Error GoTo 0\n\nfso.GetFile(TmpFile).Delete\n\nSet fso = Nothing\nSet ws = Nothing\n\nFunction WriteCode(sIn)\nIf LCase(FileExt) = \"htm\" OR LCase(FileExt) = \"html\" Then\nWriteCode = sIn &amp; \"\n\"\nElse\nWriteCode = sIn\nEnd If\nEnd Function\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39; StartupList.vbs - Create a text listing of all startup items.<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39; ************************** User Tweaks *********************************<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39; The FileExt variable can be used to change the default output format<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39; Suggestions: htm, doc, rtf. If not specified, defaults to .txt<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">FileExt<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">FileExt<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Then<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">FileExt<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;txt&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39; The OpenWith variable is optional, to open results in specific program<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39; If variable is empty, Windows will use default program for FileExt type<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">OpenWith<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">OpenWith<\/span><span style=\"color: #000000\">\u00a0&lt;&gt; <\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Then<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">OpenWith<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #795E26\">Trim<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">OpenWith<\/span><span style=\"color: #000000\">) &amp; <\/span><span style=\"color: #A31515\">&quot; &quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39; ************************************************************************<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">With<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">CreateObject<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;WScript.Network&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">ComputerName<\/span><span style=\"color: #000000\">\u00a0= .ComputerName<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">UserName<\/span><span style=\"color: #000000\"> = .UserName<\/span><\/span>\n<span class=\"line\"><span style=\"color: #795E26\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">With<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Set <\/span><span style=\"color: #001080\">fso<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #795E26\">CreateObject<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Scripting.FileSystemObject&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Set <\/span><span style=\"color: #001080\">ws<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #795E26\">CreateObject<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;WScript.Shell&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">TmpFile<\/span><span style=\"color: #000000\">\u00a0= ws.<\/span><span style=\"color: #795E26\">ExpandEnvironmentStrings<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;%TEMP%&quot;<\/span><span style=\"color: #000000\">) &amp; <\/span><span style=\"color: #A31515\">&quot;\\Startup.&quot;<\/span><span style=\"color: #000000\"> &amp; <\/span><span style=\"color: #795E26\">Trim<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">FileExt<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">With<\/span><span style=\"color: #000000\"> fso.<\/span><span style=\"color: #795E26\">CreateTextFile<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">TmpFile<\/span><span style=\"color: #000000\">,<\/span><span style=\"color: #0000FF\"> True<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Startup Items for Computer: &quot;<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> ComputerName<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> _<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">&quot;, User: &quot;<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> UserName<\/span><span style=\"color: #000000\"> &amp; <\/span><span style=\"color: #A31515\">&quot;, &quot;<\/span><span style=\"color: #000000\"> &amp; <\/span><span style=\"color: #795E26\">Now<\/span><span style=\"color: #000000\">())<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">For<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Each<\/span><span style=\"color: #000000\"> o in <\/span><span style=\"color: #795E26\">GetObject<\/span><span style=\"color: #000000\"> _<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;winmgmts:\\\\&quot;<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> ComputerName<\/span><span style=\"color: #000000\">\u00a0&amp; <\/span><span style=\"color: #A31515\">&quot;\\root\\cimv2&quot;<\/span><span style=\"color: #000000\">).<\/span><span style=\"color: #795E26\">ExecQuery<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">_<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">&quot;Select Name, Command, User, Location from Win32_StartupCommand&quot;<\/span><span style=\"color: #000000\">,,<\/span><span style=\"color: #098658\">48<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">LCase<\/span><span style=\"color: #000000\">(o.<\/span><span style=\"color: #001080\">Command<\/span><span style=\"color: #000000\">) &lt;&gt; <\/span><span style=\"color: #A31515\">&quot;desktop.ini&quot;<\/span><span style=\"color: #000000\"> _<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">AND <\/span><span style=\"color: #795E26\">LCase<\/span><span style=\"color: #000000\">(o.<\/span><span style=\"color: #001080\">User<\/span><span style=\"color: #000000\">) &lt;&gt; <\/span><span style=\"color: #A31515\">&quot;.default&quot;<\/span><span style=\"color: #000000\"> _<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">AND <\/span><span style=\"color: #795E26\">InStr<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">LCase<\/span><span style=\"color: #000000\">(o.<\/span><span style=\"color: #001080\">User<\/span><span style=\"color: #000000\">), <\/span><span style=\"color: #A31515\">&quot;nt authority&quot;<\/span><span style=\"color: #000000\">) = <\/span><span style=\"color: #098658\">0<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Name: &quot;<\/span><span style=\"color: #000000\"> &amp; o.<\/span><span style=\"color: #001080\">Name<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Command: &quot;<\/span><span style=\"color: #000000\"> &amp; o.<\/span><span style=\"color: #001080\">Command<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;User: &quot;<\/span><span style=\"color: #000000\"> &amp; o.<\/span><span style=\"color: #001080\">User<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Startup Location: &quot;<\/span><span style=\"color: #000000\"> &amp; o.<\/span><span style=\"color: #001080\">Location<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">s<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #001080\"> s<\/span><span style=\"color: #000000\">\u00a0&amp;<\/span><span style=\"color: #001080\"> vbcrlf<\/span><span style=\"color: #000000\">\u00a0&amp; <\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Name: &quot;<\/span><span style=\"color: #000000\"> &amp; o.<\/span><span style=\"color: #001080\">Name<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">s<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #001080\"> s<\/span><span style=\"color: #000000\">\u00a0&amp;<\/span><span style=\"color: #001080\"> vbcrlf<\/span><span style=\"color: #000000\">\u00a0&amp; <\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Command: &quot;<\/span><span style=\"color: #000000\"> &amp; o.<\/span><span style=\"color: #001080\">Command<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">s<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #001080\"> s<\/span><span style=\"color: #000000\">\u00a0&amp;<\/span><span style=\"color: #001080\"> vbcrlf<\/span><span style=\"color: #000000\">\u00a0&amp; <\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;User: &quot;<\/span><span style=\"color: #000000\"> &amp; o.<\/span><span style=\"color: #001080\">User<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">s<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #001080\"> s<\/span><span style=\"color: #000000\">\u00a0&amp;<\/span><span style=\"color: #001080\"> vbcrlf<\/span><span style=\"color: #000000\">\u00a0&amp; <\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Startup Location: &quot;<\/span><span style=\"color: #000000\"> &amp; o.<\/span><span style=\"color: #001080\">Location<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">s<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #001080\"> s<\/span><span style=\"color: #000000\">\u00a0&amp; <\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\">) &amp;<\/span><span style=\"color: #001080\"> vbcrlf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">End If<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Next<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">s<\/span><span style=\"color: #000000\"> &lt;&gt; <\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">String<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #098658\">25<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #A31515\">&quot;*&quot;<\/span><span style=\"color: #000000\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Additional non-relevant item(s) &quot;<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> _<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">&quot;in the Startup configuration:&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine s<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">End If<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;NOTE: This file will be deleted when you close &quot;<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> _<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">&quot;it. If you wish to retain this information, &quot;<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> _<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">&quot;Print it or use File, Save As...&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.WriteLine\u00a0<\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">.Close<\/span><\/span>\n<span class=\"line\"><span style=\"color: #795E26\">End<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">With<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39; Some programs do not work properly with bWaitOnReturn argument<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">On Error Resume Next<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">ws.Run <\/span><span style=\"color: #001080\">OpenWith<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> TmpFile<\/span><span style=\"color: #000000\">,,<\/span><span style=\"color: #0000FF\">True<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">On Error GoTo <\/span><span style=\"color: #098658\">0<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">fso.<\/span><span style=\"color: #795E26\">GetFile<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">TmpFile<\/span><span style=\"color: #000000\">).Delete<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Set <\/span><span style=\"color: #001080\">fso<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #0000FF\"> Nothing<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Set <\/span><span style=\"color: #001080\">ws<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #0000FF\"> Nothing<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Function<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">WriteCode<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">sIn<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">LCase<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">FileExt<\/span><span style=\"color: #000000\">) = <\/span><span style=\"color: #A31515\">&quot;htm&quot;<\/span><span style=\"color: #000000\"> OR <\/span><span style=\"color: #795E26\">LCase<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">FileExt<\/span><span style=\"color: #000000\">) = <\/span><span style=\"color: #A31515\">&quot;html&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">WriteCode<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #001080\"> sIn<\/span><span style=\"color: #000000\"> &amp; <\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">WriteCode<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #001080\"> sIn<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">End If<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">End Function<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<code>\n<\/code>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A long time ago i&nbsp;found this VBS script to display&nbsp;the start-up&nbsp;items for a windows pc. i&nbsp;can not remember who is the author of the script. hopefully this will help someone. &nbsp;This script is a VBS script<\/p>\n","protected":false},"author":1,"featured_media":1025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,7,10],"tags":[6,11,8,9],"class_list":["post-17","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","category-vbs","category-windows","tag-scripting-2","tag-startup","tag-vbs-2","tag-windows-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Find Startup Items<\/title>\n<meta name=\"description\" content=\"Find Startup Items\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Find Startup Items\" \/>\n<meta property=\"og:description\" content=\"Find Startup Items\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/\" \/>\n<meta property=\"og:site_name\" content=\"Ketan Desai\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-01T13:28:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-22T15:54:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ketan Desai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ketan Desai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/\"},\"author\":{\"name\":\"Ketan Desai\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"headline\":\"Find Startup Items\",\"datePublished\":\"2013-08-01T13:28:52+00:00\",\"dateModified\":\"2026-03-22T15:54:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/\"},\"wordCount\":48,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"image\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/VBS-Script.png\",\"keywords\":[\"scripting\",\"Startup\",\"vbs\",\"windows\"],\"articleSection\":[\"Scripting\",\"VBS\",\"Windows\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/\",\"name\":\"Find Startup Items\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/VBS-Script.png\",\"datePublished\":\"2013-08-01T13:28:52+00:00\",\"dateModified\":\"2026-03-22T15:54:17+00:00\",\"description\":\"Find Startup Items\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/VBS-Script.png\",\"contentUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/VBS-Script.png\",\"width\":1536,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/startup-items\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ketandesai.co.uk\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Find Startup Items\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#website\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/\",\"name\":\"Ketan Desai\",\"description\":\"Anything IT\",\"publisher\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ketandesai.co.uk\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\",\"name\":\"Ketan Desai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"caption\":\"Ketan Desai\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\"},\"sameAs\":[\"http:\\\/\\\/staging.ketandesai.co.uk\"],\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/author\\\/ketandesaiadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Find Startup Items","description":"Find Startup Items","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/","og_locale":"en_GB","og_type":"article","og_title":"Find Startup Items","og_description":"Find Startup Items","og_url":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/","og_site_name":"Ketan Desai","article_published_time":"2013-08-01T13:28:52+00:00","article_modified_time":"2026-03-22T15:54:17+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","type":"image\/png"}],"author":"Ketan Desai","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ketan Desai","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/#article","isPartOf":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/"},"author":{"name":"Ketan Desai","@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"headline":"Find Startup Items","datePublished":"2013-08-01T13:28:52+00:00","dateModified":"2026-03-22T15:54:17+00:00","mainEntityOfPage":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/"},"wordCount":48,"commentCount":0,"publisher":{"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"image":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/#primaryimage"},"thumbnailUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","keywords":["scripting","Startup","vbs","windows"],"articleSection":["Scripting","VBS","Windows"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/","url":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/","name":"Find Startup Items","isPartOf":{"@id":"https:\/\/ketandesai.co.uk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/#primaryimage"},"image":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/#primaryimage"},"thumbnailUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","datePublished":"2013-08-01T13:28:52+00:00","dateModified":"2026-03-22T15:54:17+00:00","description":"Find Startup Items","breadcrumb":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/#primaryimage","url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","contentUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/startup-items\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ketandesai.co.uk\/"},{"@type":"ListItem","position":2,"name":"Find Startup Items"}]},{"@type":"WebSite","@id":"https:\/\/ketandesai.co.uk\/#website","url":"https:\/\/ketandesai.co.uk\/","name":"Ketan Desai","description":"Anything IT","publisher":{"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ketandesai.co.uk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424","name":"Ketan Desai","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","caption":"Ketan Desai"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g"},"sameAs":["http:\/\/staging.ketandesai.co.uk"],"url":"https:\/\/ketandesai.co.uk\/index.php\/author\/ketandesaiadmin\/"}]}},"jetpack_featured_media_url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":1,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":1028,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/17\/revisions\/1028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/media\/1025"}],"wp:attachment":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}