The best way to open and close automatically at a specified time to prevent memory leaks(VBscript)

Thanks to the dear user “Paper”

This is the solution

Run Chrome with --user-data-dir = “Your Chrome profile name” (below code)

Set shell=CreateObject("Shell.Application")
' shell.ShellExecute "application", "arguments", "path", "verb", window
shell.ShellExecute  "chrome.exe"," --user-data-dir=""c:\test\Profile 1""","""C:\Program Files (x86)\Google\Chrome\Application\""", "", 1

Set shell=CreateObject("Shell.Application")
' shell.ShellExecute "application", "arguments", "path", "verb", window
shell.ShellExecute  "chrome.exe"," --user-data-dir=""c:\test\Profile 2""","""C:\Program Files (x86)\Google\Chrome\Application\""", "", 1

use follow code and replace “myMacro” with your chrome profile name

and enjoy :watermelon:

1 Like