{"id":185,"date":"2008-04-16T17:06:35","date_gmt":"2008-04-16T11:36:35","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=185"},"modified":"2019-04-23T17:16:41","modified_gmt":"2019-04-23T17:16:41","slug":"vbscript-files-open-with-notepad","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/vbscript-files-open-with-notepad\/","title":{"rendered":"[Fix] VBScript Files Open With Notepad"},"content":{"rendered":"<p>When you try to run a VBScript by double-clicking it, the script may open in Notepad. This happens if the user has set Notepad as the default (instead of wscript.exe) program for <code>.vbs<\/code> files, using Open with or through any other methods..<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3664\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/vbsopen.png\" alt=\"vbs files open in notepad\" width=\"650\" height=\"162\" \/><\/p>\n<h2>[Fix] VBScript Files Open With Notepad<\/h2>\n<h4>Running VBScript manually<\/h4>\n<p>To run the script, you may use one of these two Windows Script Host executables.<\/p>\n<ul>\n<li>CScript.exe (Console-based Scripting Host)<\/li>\n<li>WScript.exe (Windows-based Scripting Host)<\/li>\n<\/ul>\n<p><i>Whether you use WScript or CScript, you still run the scripts in the same manner. The difference is only in the output \u2014 WScript generates windowed output, while CScript sends its output to the command window in which it was started. (REF: <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/xazzc41b(VS.85).aspx\" target=\"_blank\" rel=\"noopener noreferrer\">Running Scripts from Windows<\/a>)<\/i><\/p>\n<p>To run a VBScript file using CScript.exe, use the following command-line syntax:<\/p>\n<pre>cscript.exe \"drive:\\path\\filename.vbs\"<\/pre>\n<p>To run a VBScript file using WScript.exe, use the following command-line syntax:<\/p>\n<pre>wscript.exe \"drive:\\path\\filename.vbs\"<\/pre>\n<h4>Fix the Default &#8220;Open&#8221; Action for VBScripts<\/h4>\n<p>To reset the default action for <strong>.vbs<\/strong> file types so that double-clicking executes the file instead of opening it in Notepad, use these steps:<\/p>\n<p>Download <b><a href=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/vbsfix.zip\">vbsfix.zip<\/a><\/b> and save to Desktop. Unzip and run the enclosed REG file <b>vbsfix_vista.reg<\/b> by double-clicking it. Click <b>Yes<\/b> when asked for confirmation.<\/p>\n<p>This changes the default action for <strong>.vbs<\/strong> files associating them with Windows Scripting Host executable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you try to run a VBScript by double-clicking it, the script may open in Notepad. This happens if the user has set Notepad as the default (instead of wscript.exe) program for .vbs files, using Open with or through any other methods.. [Fix] VBScript Files Open With Notepad Running VBScript manually To run the script, &#8230; <a title=\"[Fix] VBScript Files Open With Notepad\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/vbscript-files-open-with-notepad\/\" aria-label=\"Read more about [Fix] VBScript Files Open With Notepad\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[441],"class_list":["post-185","post","type-post","status-publish","format-standard","hentry","category-windows","tag-registry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":10337,"url":"https:\/\/www.winhelponline.com\/blog\/flip-or-reverse-text-file-contents-windows\/","url_meta":{"origin":185,"position":0},"title":"How to Flip or Reverse a Text File Using Different Ways in Windows","author":"Ramesh","date":"July 14, 2019","format":false,"excerpt":"When analyzing plain-text log files such as the Web server logs or the Sfc, or DISM log files, you may sometimes prefer the most recent items appearing at the top. However, most of the log files that Windows generates would have the oldest entries listed first -- entries listed in\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"reverse lines in a text file notepad++","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/reverse-text-file-notepad-plus-5.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/reverse-text-file-notepad-plus-5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/reverse-text-file-notepad-plus-5.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":9357,"url":"https:\/\/www.winhelponline.com\/blog\/find-and-delete-zero-byte-files-recursively-windows\/","url_meta":{"origin":185,"position":1},"title":"How to Delete Empty files (0 byte) in Windows?","author":"Ramesh","date":"May 18, 2019","format":false,"excerpt":"Some applications create empty 0-byte files in their data folders and fail to clear them up. Over time, if you see many zero-byte files in a folder hierarchy, here are some methods to find all those 0-byte files and delete them. Find and\/or delete empty (0 byte) files in Windows:\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"delete empty files recursively","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/delempty-0-byte-files-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/delempty-0-byte-files-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/delempty-0-byte-files-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/delempty-0-byte-files-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":18255,"url":"https:\/\/www.winhelponline.com\/blog\/batch-convert-excel-sheets-to-pdf-files\/","url_meta":{"origin":185,"position":2},"title":"How to Batch Convert Excel Sheets into PDF Files","author":"Ramesh","date":"September 2, 2020","format":false,"excerpt":"Microsoft Excel Spreadsheets are commonly used to store financial data and prepare invoices. Often, you may need to convert the .xls or .xlsx files to .pdf format especially if you're sending out invoices to your clients. Microsoft Excel has a built-in option using which you can save your workbook, active\u2026","rel":"","context":"In &quot;Office&quot;","block_context":{"text":"Office","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/office\/"},"img":{"alt_text":"excel save as pdf using file converter","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/excel-to-pdf-file-converter-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/excel-to-pdf-file-converter-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/excel-to-pdf-file-converter-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/excel-to-pdf-file-converter-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":10144,"url":"https:\/\/www.winhelponline.com\/blog\/how-to-batch-convert-word-documents-into-pdf-files\/","url_meta":{"origin":185,"position":3},"title":"How to Batch Convert Word Documents into PDF Files","author":"Ramesh","date":"July 3, 2019","format":false,"excerpt":"Microsoft Word is a top-notch word processor using which you can save documents in .doc, .docx, and different other formats. When you need to send a document to someone who doesn't have Office Word installed, you usually convert the document to PDF and send it. As you may have known,\u00a0Microsoft\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"batch convert word documents to pdf","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/word-doc-to-pdf-4-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/word-doc-to-pdf-4-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/word-doc-to-pdf-4-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/word-doc-to-pdf-4-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":235,"url":"https:\/\/www.winhelponline.com\/blog\/error-there-is-no-script-engine-for-file-extension-when-running-vbs-files\/","url_meta":{"origin":185,"position":4},"title":"[Fix] Can&#8217;t find Script Engine Vbscript, and &#8220;no script engine for .vbs&#8221;","author":"Ramesh","date":"April 27, 2008","format":false,"excerpt":"When you run a VBScript or .msi setup file that runs a VBScript, you may receive one of the following errors: Can't find script engine \"VBScript\" for script C:\\ProgramData\\Microsoft\\Windows\\OFFICEICON.vbs There is no script engine for file extension \".vbs\". This happens if the vbscript.dll module is not registered correctly or the\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":127,"url":"https:\/\/www.winhelponline.com\/blog\/adding-the-run-as-administrator-option-for-vbs-and-js-files\/","url_meta":{"origin":185,"position":5},"title":"Add Run as Administrator Context Menu Item for VBS and JS files","author":"Ramesh","date":"March 27, 2008","format":false,"excerpt":"By default, Windows does not include the Run as Administrator option in the context menu for Vbscript (.VBS) and JScript (.JS) files. So, to run a script elevated, you either need to launch the script from elevated Command Prompt window, or use the VBScript self-elevation method as described in article\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"add run as administrator context menu for vbs files","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/script_runas.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=185"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/185\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}