{"id":306,"date":"2011-06-01T13:22:31","date_gmt":"2011-06-01T13:22:31","guid":{"rendered":"https:\/\/blog.alwawee.ru\/?p=306"},"modified":"2011-07-06T13:13:15","modified_gmt":"2011-07-06T13:13:15","slug":"vbscript-for-automatic-programs-and-folders-opening","status":"publish","type":"post","link":"https:\/\/blog.alwawee.ru\/?p=306","title":{"rendered":"VBScript for automatic opening of programs, files and folders"},"content":{"rendered":"<p>Here I will explain a simple VBScript that I wrote today to make opening of some programs and folders automatic. This problem occured in my work because I needed to open frequently my postgraduate dissertation and some other TeX files and needed to open some folders and other programs fastly when I need. So let&#8217;s look at the script:<br \/>\n<code><br \/>\nDim objShellApp, WshShell<\/p>\n<p>'\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/p>\n<p>Set WshShell = CreateObject (\"WScript.Shell\")<br \/>\nSet objShellApp = CreateObject (\"Shell.Application\")<\/p>\n<p>a = WshShell.Popup (\"\u0422\u044b \u0443\u0432\u0435\u0440\u0435\u043d(\u0430), \u0447\u0442\u043e \u0445\u043e\u0447\u0435\u0448\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b? =))\",,\"\u041f\u043e\u0434\u0443\u043c\u0430\u0439!\", 4+32)<br \/>\nIf a = 7 Then WScript.Quit<\/p>\n<p>WshShell.CurrentDirectory = \"C:\\Program Files\\LEd\"<br \/>\nWshShell.Run \"LEd.exe\"<br \/>\nWshShell.Run \"LEd.exe\"<br \/>\nWshShell.Run \"LEd.exe\"<br \/>\nobjShellApp.ToggleDesktop<\/p>\n<p>WshShell.CurrentDirectory = \"C:\\totalcmd\"<br \/>\nWshShell.Run \"TOTALCMD.exe\"<br \/>\nobjShellApp.ToggleDesktop<\/p>\n<p>WshShell.CurrentDirectory = \"C:\\Documents and Settings\\wzbozon\\\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b\"<br \/>\nWshShell.Run \"ImageSaver.exe\"<br \/>\nobjShellApp.ToggleDesktop<\/p>\n<p>objShellApp.Open(\"C:\\Documents and Settings\\wzbozon\\\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b\\TeX Books\")<\/p>\n<p>WshShell.CurrentDirectory = \"C:\\Documents and Settings\\wzbozon\\\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b\\Alwawee\\\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Alwawee\\TexRef\"<br \/>\nWshShell.Run \"TexDatabase.xlsx\"<\/p>\n<p>WshShell.CurrentDirectory = \"C:\\Program Files\\Google\\Chrome\\Application\"<br \/>\nWshShell.Run \"chrome.exe\"<\/p>\n<p>WshShell.CurrentDirectory = \"c:\\\u0410\u0441\u043f\u0438\u0440\u0430\u043d\u0442\u0443\u0440\u0430\\DIPLOM\\\"<br \/>\nWshShell.Run \"final.doc\"<\/p>\n<p>objShellApp.ToggleDesktop<\/code><\/p>\n<p>First of all I should say, that this is a usual text file, called StartAll.vbs, that is edited in NotePad++. It can be edited on usual Notepad also, but I strongly recommend you to use Notepad++. <\/p>\n<p>Here, at first I create 2 objects, that are used to manipulate the file system in Windows Script Host. Then I ask with a popup window if the user is sure to run this script. I do this, because I don&#8217;t need to run script, if user or me just press two times on it, because this script makes a lot of things. Then Led.exe program is opened 3 times from a directory, where it is located and then Desktop is toggled. Then I open Total Commander, ImageSaver.exe and TeX Books folder. The rest is analogous. It is noteworthy that Excel and Word files can be opened directly with Run method. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here I will explain a simple VBScript that I wrote today to make opening of some programs and folders automatic. This problem occured in my work because I needed to open frequently my postgraduate dissertation and some other TeX files and needed to open some folders and other programs fastly when I need. So let&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-android"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>VBScript for automatic opening of programs, files and folders - Denis Kutlubaev<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.alwawee.ru\/?p=306\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VBScript for automatic opening of programs, files and folders - Denis Kutlubaev\" \/>\n<meta property=\"og:description\" content=\"Here I will explain a simple VBScript that I wrote today to make opening of some programs and folders automatic. This problem occured in my work because I needed to open frequently my postgraduate dissertation and some other TeX files and needed to open some folders and other programs fastly when I need. So let&#8217;s [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.alwawee.ru\/?p=306\" \/>\n<meta property=\"og:site_name\" content=\"Denis Kutlubaev\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/alwaweemobile\" \/>\n<meta property=\"article:published_time\" content=\"2011-06-01T13:22:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-07-06T13:13:15+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/blog.alwawee.com\/?attachment_id=1982\" \/>\n<meta name=\"author\" content=\"Denis Kutlubaev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Denis Kutlubaev\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306\"},\"author\":{\"name\":\"Denis Kutlubaev\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#\\\/schema\\\/person\\\/58f1f1f57155b48afab83ba53b3e26a7\"},\"headline\":\"VBScript for automatic opening of programs, files and folders\",\"datePublished\":\"2011-06-01T13:22:31+00:00\",\"dateModified\":\"2011-07-06T13:13:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306\"},\"wordCount\":218,\"commentCount\":0,\"articleSection\":[\"Android\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306\",\"url\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306\",\"name\":\"VBScript for automatic opening of programs, files and folders - Denis Kutlubaev\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#website\"},\"datePublished\":\"2011-06-01T13:22:31+00:00\",\"dateModified\":\"2011-07-06T13:13:15+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#\\\/schema\\\/person\\\/58f1f1f57155b48afab83ba53b3e26a7\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/?p=306#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.alwawee.ru\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VBScript for automatic opening of programs, files and folders\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#website\",\"url\":\"https:\\\/\\\/blog.alwawee.ru\\\/\",\"name\":\"Denis Kutlubaev\",\"description\":\"iOS Development\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.alwawee.ru\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.alwawee.ru\\\/#\\\/schema\\\/person\\\/58f1f1f57155b48afab83ba53b3e26a7\",\"name\":\"Denis Kutlubaev\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg\",\"caption\":\"Denis Kutlubaev\"},\"description\":\"iOS Developer, creator of Tornado Browser and many other popular apps\",\"sameAs\":[\"http:\\\/\\\/dennis.alwawee.com\"],\"url\":\"https:\\\/\\\/blog.alwawee.ru\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"VBScript for automatic opening of programs, files and folders - Denis Kutlubaev","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:\/\/blog.alwawee.ru\/?p=306","og_locale":"en_US","og_type":"article","og_title":"VBScript for automatic opening of programs, files and folders - Denis Kutlubaev","og_description":"Here I will explain a simple VBScript that I wrote today to make opening of some programs and folders automatic. This problem occured in my work because I needed to open frequently my postgraduate dissertation and some other TeX files and needed to open some folders and other programs fastly when I need. So let&#8217;s [&hellip;]","og_url":"https:\/\/blog.alwawee.ru\/?p=306","og_site_name":"Denis Kutlubaev","article_publisher":"https:\/\/www.facebook.com\/alwaweemobile","article_published_time":"2011-06-01T13:22:31+00:00","article_modified_time":"2011-07-06T13:13:15+00:00","og_image":[{"url":"http:\/\/blog.alwawee.com\/?attachment_id=1982","type":"","width":"","height":""}],"author":"Denis Kutlubaev","twitter_misc":{"Written by":"Denis Kutlubaev","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.alwawee.ru\/?p=306#article","isPartOf":{"@id":"https:\/\/blog.alwawee.ru\/?p=306"},"author":{"name":"Denis Kutlubaev","@id":"https:\/\/blog.alwawee.ru\/#\/schema\/person\/58f1f1f57155b48afab83ba53b3e26a7"},"headline":"VBScript for automatic opening of programs, files and folders","datePublished":"2011-06-01T13:22:31+00:00","dateModified":"2011-07-06T13:13:15+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.alwawee.ru\/?p=306"},"wordCount":218,"commentCount":0,"articleSection":["Android"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.alwawee.ru\/?p=306#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.alwawee.ru\/?p=306","url":"https:\/\/blog.alwawee.ru\/?p=306","name":"VBScript for automatic opening of programs, files and folders - Denis Kutlubaev","isPartOf":{"@id":"https:\/\/blog.alwawee.ru\/#website"},"datePublished":"2011-06-01T13:22:31+00:00","dateModified":"2011-07-06T13:13:15+00:00","author":{"@id":"https:\/\/blog.alwawee.ru\/#\/schema\/person\/58f1f1f57155b48afab83ba53b3e26a7"},"breadcrumb":{"@id":"https:\/\/blog.alwawee.ru\/?p=306#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.alwawee.ru\/?p=306"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.alwawee.ru\/?p=306#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.alwawee.ru\/"},{"@type":"ListItem","position":2,"name":"VBScript for automatic opening of programs, files and folders"}]},{"@type":"WebSite","@id":"https:\/\/blog.alwawee.ru\/#website","url":"https:\/\/blog.alwawee.ru\/","name":"Denis Kutlubaev","description":"iOS Development","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.alwawee.ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.alwawee.ru\/#\/schema\/person\/58f1f1f57155b48afab83ba53b3e26a7","name":"Denis Kutlubaev","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/346de75d27c818be0aa7fddeada2e50e30cc15b4da6b3b8110c5d766cd2afa34?s=96&d=mm&r=pg","caption":"Denis Kutlubaev"},"description":"iOS Developer, creator of Tornado Browser and many other popular apps","sameAs":["http:\/\/dennis.alwawee.com"],"url":"https:\/\/blog.alwawee.ru\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=306"}],"version-history":[{"count":0,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=\/wp\/v2\/posts\/306\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.alwawee.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}