{"data":{"markdownRemark":{"html":"<h2 id=\"if-you-regularly-need-to-open-the-same-windows-in-google-chrome-follow-this-tutorial-to-learn-how-to-automate-that\"><a href=\"#if-you-regularly-need-to-open-the-same-windows-in-google-chrome-follow-this-tutorial-to-learn-how-to-automate-that\" aria-hidden=\"true\" class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>If you regularly need to open the same windows in Google Chrome, follow this tutorial to learn how to automate that</h2>\n<p>This Tutorial is for Windows, (Linux will be later) and will show you how to automate opening the same tabs in Google Chrome at the press of a few keys on your keyboard.</p>\n<p>First of all, open <code class=\"language-text\">notepad</code> in MS Windows, we will create a <code class=\"language-text\">.bat</code> script which is a script able to be run in Windows.</p>\n<p>On the first line of the file type,</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">@echo off</code></pre></div>\n<p>This will stop the \"loading\" of our script and background code being shown (it just looks messy so we turn it off here)</p>\n<p>next line should be</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">start <span class=\"token string\">\"\"</span> <span class=\"token string\">\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"</span> <span class=\"token string\">\"--start-maximized --incognito &lt;website here>\"</span></code></pre></div>\n<p>lets break it down,</p>\n<ul>\n<li>start = \"start a new process/program\"</li>\n<li>\"\" = with no extra environment variables</li>\n<li>\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" = chrome application, (you could use IE or Firefox also, all you need is the full path to that on your system)</li>\n<li>\"--start-maximized --incognito\"  = start Chrome maximized and in incognito mode ( these are optional )</li>\n<li>&#x3C;website here>  = a website you wish to open (eg:  <a href=\"https://reddit.com\">https://reddit.com</a> <a href=\"https://google.com\">https://google.com</a> <a href=\"https://stackoverflow.com\">https://stackoverflow.com</a>)</li>\n</ul>\n<blockquote>\n<p>👍 because of some issues with google searches and some websites not opening correctly, I would recommend to copy and paste the whole line and replace the website for each site you want to open, its not the most efficient way, but seems to solve a lot of problems. They should all open in the same Chrome window. See the example below if needed.</p>\n</blockquote>\n<p>and that's it! Now in Notepad, choose File>Save as..</p>\n<p>and save the file somewhere ( for eg: your Documents Folder ) as a <code class=\"language-text\">bat</code> file ... for example, <code class=\"language-text\">memes.bat</code></p>\n<p>Your <code class=\"language-text\">memes.bat</code> script should look similar to this...</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">@echo off\nstart <span class=\"token string\">\"\"</span> <span class=\"token string\">\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"</span> <span class=\"token string\">\"--start-maximized --incognito https://www.google.com/search?q=scottish+memes\"</span>  \nstart <span class=\"token string\">\"\"</span> <span class=\"token string\">\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"</span> <span class=\"token string\">\"--start-maximized --incognito https://www.google.com/search?q=funny+memes/\"</span>   \nstart <span class=\"token string\">\"\"</span> <span class=\"token string\">\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"</span> <span class=\"token string\">\"--start-maximized --incognito https://www.reddit.com/r/memes/\"</span>  \nstart <span class=\"token string\">\"\"</span> <span class=\"token string\">\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"</span> <span class=\"token string\">\"--start-maximized --incognito https://imgur.com/gallery/1zpe1/\"</span>  \nstart <span class=\"token string\">\"\"</span> <span class=\"token string\">\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\"</span> <span class=\"token string\">\"--start-maximized --incognito https://www.reddit.com/r/dankmemes/\"</span></code></pre></div>\n<p>Now you can double-click this bat file, to execute it, and this is what you should see...</p>\n<p>\n  <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/memes-dba189253ed299c31c9ac2063f5255b5-15f00.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n  \n  <span\n    class=\"gatsby-resp-image-wrapper\"\n    style=\"position: relative; display: block;  max-width: 710px; margin-left: auto; margin-right: auto;\"\n  >\n    <span\n      class=\"gatsby-resp-image-background-image\"\n      style=\"padding-bottom: 10.999408633944412%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAeElEQVQI11XLSxKCMBAEUK6kiJIQKcUvC4UcXZxMEi7Ttrhy8aqrp2sK70fc+x7dqcOF2sMRtWlgmj1q6+CshWGuygrn6w3D6PF4DrCuxXqzRVnt/hQqb2gQBMo5YZ4zNEZEUlW8JmFP3DICu4hQWPbvLfEnLfnzAXmxaMOL2ZpsAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n    >\n      <img\n        class=\"gatsby-resp-image-image\"\n        style=\"width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;\"\n        alt=\"memes\"\n        title=\"\"\n        src=\"/static/memes-dba189253ed299c31c9ac2063f5255b5-09ff3.png\"\n        srcset=\"/static/memes-dba189253ed299c31c9ac2063f5255b5-2279c.png 178w,\n/static/memes-dba189253ed299c31c9ac2063f5255b5-dbe09.png 355w,\n/static/memes-dba189253ed299c31c9ac2063f5255b5-09ff3.png 710w,\n/static/memes-dba189253ed299c31c9ac2063f5255b5-393d8.png 1065w,\n/static/memes-dba189253ed299c31c9ac2063f5255b5-3667d.png 1420w,\n/static/memes-dba189253ed299c31c9ac2063f5255b5-15f00.png 1691w\"\n        sizes=\"(max-width: 710px) 100vw, 710px\"\n      />\n    </span>\n  </span>\n  \n  </a>\n    </p>\n<p>Niiiiiiice.....</p>\n<h2 id=\"but-you-promised-it-would-work-after-a-keyboard-button-is-pressed\"><a href=\"#but-you-promised-it-would-work-after-a-keyboard-button-is-pressed\" aria-hidden=\"true\" class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>But you promised it would work after a keyboard button is pressed...</h2>\n<p>I did, you're right. So lets make it happen...</p>\n<p>First of all its important to know, <code class=\"language-text\">.bat</code> files aren't trusted by default in Windows, that's because it is possible to write some pretty nasty code in a <code class=\"language-text\">.bat</code> file, make it look like a nice, helpful script and pass it around freely. For that reason, Windows chooses not to trust <code class=\"language-text\">.bat</code> files by default.</p>\n<h3 id=\"is-there-a-way-to-make-windows-trust-my-bat-file\"><a href=\"#is-there-a-way-to-make-windows-trust-my-bat-file\" aria-hidden=\"true\" class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Is there a way to make windows trust <em>my</em> .bat file?</h3>\n<p>Yes! easily.  All you do is right click your <code class=\"language-text\">.bat</code> file and select \"create shortcut\", Windows absolutely trusts shortcut files!</p>\n<p>Now rename the shortcut to some unique name, I will rename mine to <code class=\"language-text\">MEME_CENTRAL</code></p>\n<p>\n  <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/central-d879c266a732054b1237bcba214e0497-b28c6.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n  \n  <span\n    class=\"gatsby-resp-image-wrapper\"\n    style=\"position: relative; display: block;  max-width: 710px; margin-left: auto; margin-right: auto;\"\n  >\n    <span\n      class=\"gatsby-resp-image-background-image\"\n      style=\"padding-bottom: 19.440124416796266%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAnklEQVQY042QywqCQABF/Q7xbYnOMCMyKqZCkkRC2KL6/185ySxalovD3R3uvc791qGUJo5jgiBAaY0xNVqXFHlOEIaEG1EUffMXzvVyIjtm+L6P67pIKSnLEikkhzTF8zySJNktdZ6vN491pes6mqZhnmeWZbE5jiPDMFBVlRX/a2eF52mi73uEEOTbRGMMbdtS17VFKUVRFPaOPcIPwyV1b0J4tpIAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n    >\n      <img\n        class=\"gatsby-resp-image-image\"\n        style=\"width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;\"\n        alt=\"central\"\n        title=\"\"\n        src=\"/static/central-d879c266a732054b1237bcba214e0497-09ff3.png\"\n        srcset=\"/static/central-d879c266a732054b1237bcba214e0497-2279c.png 178w,\n/static/central-d879c266a732054b1237bcba214e0497-dbe09.png 355w,\n/static/central-d879c266a732054b1237bcba214e0497-09ff3.png 710w,\n/static/central-d879c266a732054b1237bcba214e0497-393d8.png 1065w,\n/static/central-d879c266a732054b1237bcba214e0497-b28c6.png 1286w\"\n        sizes=\"(max-width: 710px) 100vw, 710px\"\n      />\n    </span>\n  </span>\n  \n  </a>\n    </p>\n<p>now right click your newly renamed file and click \"Properties\", from the window that appears, you can change the icon of the \"application\" you just created ( in the \"Change Icon\" button ), and also in the \"Run:\" option, choose \"Minimized\" to not show any terminal window showing your script running, (it will still show Chrome, don't worry)</p>\n<p>\n  <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/properties-9fbb943a49b430d1d9f09d7a55dc481b-f3cb8.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n  \n  <span\n    class=\"gatsby-resp-image-wrapper\"\n    style=\"position: relative; display: block;  max-width: 375px; margin-left: auto; margin-right: auto;\"\n  >\n    <span\n      class=\"gatsby-resp-image-background-image\"\n      style=\"padding-bottom: 139.20000000000002%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAACXBIWXMAAA7DAAAOwwHHb6hkAAADZklEQVRIx61Va3PaMBD0P+9P6i/ItGnoFAiTkoSGNDwMtsFgG8zLgHltb8+WQztJkw+R50aSrVud7lZrK5rOsJjPEcczJKsV5jKezxdYyXi5XGKxWOBwOOKtdjqdkKYprMUyc0ySRGylQBxvt9sCdL1eY7PZqAN7M9/tdrqOfZpu9b0VxzH6PRu3t3WMRmPMZjG63Q4qlQp+/37SyIPxGPWfddzdNTCZTBBFIRr3DfG51f7m5gbtdke/KeDDwyOq1RqG/gjHwwGDgadgq2StETQfmqhUq3BdTyPudttoPj4pQDAOUKvV0Gw+SjAzWGm6w2Y5QrKc4Xg8Sr4Ohe33+8J4XOaSa8w75o1zHplzbm4JHrz6J7iPnzW5nutoRI7joiPHsO2+gr+nEdja7faIww5W85HsCN2Fux2PeaR5nyU+fdH4rQBkdcIwxsAfSx/qhyAYYzAcIgxC9CTCoYzXUlVDj5fsOULZwR8M4LgufDpK6SdRJAXy4UuRWGXSh1G/1ZSHCihAjGgo1SV1SJN+v49e30Equ55OWeLPzRzVjBllEaEjzr4AmRaFkXCzD7vX08K0Wm10O121Tm62beNJqBVGE+xyFvAUlu5C6rAY+W7kWnYFn41XkDxjP5/NMZ1OlYd8x/WmcBaBeOTpNC64N5FdPSGx5+WWj1kc0imS7/v9c9WZd/opIGnC3TamivLEAh4EgQIMpWAE84e+3KCB2mQyLe41/Qlo8mltNltxlIXi5DiO0oN9X+xA9gut6ExHExGBMjFJFIwsMLeliDBJMgXhsZkCJn0s1Wae+P01oxZEQrMCcCM7jM8qzPar0cDl5RXK5bJUtKPg/7N2u/1cZQ4YhStH5vENQc/F4V8OmmhMb8Dyq5dqVVkE5oIpIA2Wy0xsSRP2/5oR5VWu8sWROfA8F1dXJfz4URZhLePy61eUK9eaw/u7e1xcfEGpVFLRdeWKsurfv5dk3Tf1sbv238TmIKNAqlLOKI3qGJk/f2e0z9hOr6e5ern0fETLxCEHfE2W3mtnAvtxgH9F+NY/9z3zgjb80bxmZrGOz+bFu7O5Rkj5ecnIrdFohJ5oIm8Cx6QR59RB9pxTPFqtlvxabV2j/+WXjKBUltZTCw25iuSemVcrVfmXN+UX4auQ1GrXqN/eqzr9AbdyX/3IvHjuAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n    >\n      <img\n        class=\"gatsby-resp-image-image\"\n        style=\"width: 100%; height: 100%; margin: 0; vertical-align: middle; position: absolute; top: 0; left: 0; box-shadow: inset 0px 0px 0px 400px white;\"\n        alt=\"properties\"\n        title=\"\"\n        src=\"/static/properties-9fbb943a49b430d1d9f09d7a55dc481b-f3cb8.png\"\n        srcset=\"/static/properties-9fbb943a49b430d1d9f09d7a55dc481b-498d2.png 178w,\n/static/properties-9fbb943a49b430d1d9f09d7a55dc481b-652e1.png 355w,\n/static/properties-9fbb943a49b430d1d9f09d7a55dc481b-f3cb8.png 375w\"\n        sizes=\"(max-width: 375px) 100vw, 375px\"\n      />\n    </span>\n  </span>\n  \n  </a>\n    </p>\n<p>and press \"OK\"</p>\n<h2 id=\"are-we-there-yet\"><a href=\"#are-we-there-yet\" aria-hidden=\"true\" class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Are we there yet?</h2>\n<p>Almost done...\nSo now you can just press your windows key on your laptop, or your start button, and type <code class=\"language-text\">MEME</code> and you don't even need to finish the whole script name, <code class=\"language-text\">MEME_CENTRAL</code> will be the first suggestion by Windows and you can just press the <code class=\"language-text\">Enter</code> key to have a look at those juicy juicy memes. The more you press windows and search for <code class=\"language-text\">MEME</code> then <code class=\"language-text\">MEM</code> , the faster windows learns that's the one you want and will recommend it every time.</p>\n<p>Good luck and get creative! Think how this could help you in your daily work, with your studies at home, with your &#x3C;ahem> browsing 😬</p>\n<p>Today we learned how to open up multiple tabs to regularly visited websites in Google Chrome in Windows.</p>\n<p>If Sean Helped You today, feel free to share this post or connect with us soon, available via <a href=\"mailto:seanwillhelpyou@gmail.com\">gmail</a>, <a href=\"https://app.slack.com/client/TLMMVFQ1X/CLVTNC1MM\">slack</a> or <a href=\"https://github.com/RH-sdavey/sean-will-help-you\">github</a>.\nThanks for reading!</p>","timeToRead":4,"excerpt":"If you regularly need to open the same windows in Google Chrome, follow this tutorial to learn how to automate that This Tutorial is for…","frontmatter":{"title":"Windows: Create a script to open webpages automatically","cover":"https://picsum.photos/id/1048/2500/1000","date":"2019-02-17","category":"sysadmin","tags":["Sysadmin","Easy","Windows","Chrome"],"author":"Endless"},"fields":{"slug":"/windows-create-a-script-to-open-webpages-automatically"}},"prev":{"excerpt":"Lets have a look at a very important file for any sysadmin of a Linux machine, /etc/passwd Why is this file so…","frontmatter":{"title":"How to read the /etc/passwd file on Linux","cover":"https://picsum.photos/id/336/2500/1000","date":"2019-03-17"},"fields":{"slug":"/how-to-read-the-etc-passwd-file-on-linux"}},"next":{"excerpt":"How can I add the output of a shell command to my current file open in Vim? Check it out, you're in Vim, you're…","frontmatter":{"title":"Run shell commands in (or to) Vim directly","cover":"https://picsum.photos/id/1073/2500/1000","date":"2019-01-29"},"fields":{"slug":"/run-shell-commands-in-or-to-vim-directly"}},"authors":{"edges":[{"node":{"uid":"Endless","name":"Endless","image":"https://api.adorable.io/avatars/285/pwpwpw.png","url":"https://github.com/RH-sdavey/sean-will-help-you","bio":"Endless Will Help You"}},{"node":{"uid":"Weez","name":"Salloweezy","image":"https://api.adorable.io/avatars/124/weezzzy.png","url":"http://gatsbyjs.org/","bio":"."}},{"node":{"uid":"Sean","name":"Sean","image":"https://api.adorable.io/avatars/124/weez.png","url":"https://github.com/RH-sdavey/sean-will-help-you","bio":"SEAN User created for SWHY"}},{"node":{"uid":"casper","name":"Casper User","image":"https://api.adorable.io/avatars/124/seasz.png","url":"http://gatsbyjs.org/","bio":"Yeah, I like animals better than people sometimes... Especially dogs. Dogs are the best. Every time you come home, they act like they haven't seen you in a year. And the good thing about dogs... is they got different dogs for different people."}},{"node":{"uid":"guinevere","name":"Guinevere Kuiper","image":"https://api.adorable.io/avatars/282/seaszss.png","url":"https://randomuser.me/api/?seed=user1","bio":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam laoreet lorem nec ligula aliquet, porta blandit augue luctus. Vivamus ac quam diam. Sed vestibulum pharetra hendrerit."}}]}},"pageContext":{"slug":"/windows-create-a-script-to-open-webpages-automatically","total":12,"prev":"/how-to-read-the-etc-passwd-file-on-linux","next":"/run-shell-commands-in-or-to-vim-directly"}}