スタートアップスクリプト
会社でPCログイン後に色々と立ち上げるのが
かったるいんで、少し楽をしようかということで
少しくみました。APP1つ立ち上げてからChromeを3つ起動で
1つはシークレットモードという内容です。
でこいつをスタートアップに組み込めば一丁上がり。
startup.vbs
かったるいんで、少し楽をしようかということで
少しくみました。APP1つ立ち上げてからChromeを3つ起動で
1つはシークレットモードという内容です。
でこいつをスタートアップに組み込めば一丁上がり。
startup.vbs
'参照サイト
'http://www.atmarkit.co.jp/ait/articles/0709/12/news125_2.html
'https://msdn.microsoft.com/ja-jp/library/cc364423.aspx
'
Option Explicit
Dim objWshShell
Set objWshShell = WScript.CreateObject("WScript.Shell")
Dim APP1
APP1 = """C:\Program Files\APP1\App1.exe"""
Dim Chrome
Dim arg1 '新規ウィンドウ
Dim arg2 'シークレットモード
Dim RunChromeWin(3) '起動用
Dim targetURL(3) 'それぞれのURLターゲット用
Chrome = """C:\Users\XXXXX\AppData\Local\Google\Chrome\Application\chrome.exe"""
Arg1=" --new-window"
Arg2=" --incognito"
'楽したいからつくりは雑
targetURL(0)=" "
targetURL(1)=" "
targetURL(2)=" "
RunChromeWin(0) = Chrome + Arg1 + targetURL(0)
RunChromeWin(1) = Chrome + Arg1 + targetURL(1)
RunChromeWin(2) = Chrome + Arg2 + targetURL(2)
'APP1を起動
objWshShell.Run APP1
WScript.Sleep 1000
objWshShell.AppActivate "APP1"
WScript.Sleep 1000
objWshShell.SendKeys "{TAB}"
WScript.Sleep 1000
objWshShell.SendKeys "*****"
objWshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
'GoogleChromeを起動
objWshShell.Run RunChromeWin(0)
WScript.Sleep 4000
objWshShell.Exec RunChromeWin(1)
WScript.Sleep 4000
objWshShell.Exec RunChromeWin(2)
WScript.Sleep 1000
MsgBox "今日も一日頑張りましょう!!"
Set objWshShell = Nothing
コメント