-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.vbs
More file actions
29 lines (23 loc) · 1.03 KB
/
Copy pathsetup.vbs
File metadata and controls
29 lines (23 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Dim sh, shortcut, userprofile, newpath, iconpath, curDir, sysObj
Set sh = CreateObject("WScript.Shell")
userprofile = sh.ExpandEnvironmentStrings("%userprofile%")
Set sysObj = CreateObject("Scripting.FileSystemObject")
curDir = sysObj.GetParentFolderName(WScript.ScriptFullName)
newpath = curDir & "\run_no_splash.vbs"
iconpath = sysObj.GetParentFolderName(curDir) & "\opera.exe"
' taskbar shortcut
Set shortcut = sh.CreateShortcut(userprofile & "\Appdata\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Opera GX Browser.lnk")
shortcut.TargetPath = newpath
shortcut.WorkingDirectory = curDir
shortcut.IconLocation = iconpath
shortcut.Save
' start menu shortcut
Set shortcut = sh.CreateShortcut(userprofile & "\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Opera GX Browser.lnk")
shortcut.TargetPath = newpath
shortcut.WorkingDirectory = curDir
shortcut.IconLocation = iconpath
shortcut.Save
sh.Popup "No Splash setup completed", 0, "No Splash Setup", vbOKOnly
Set sh = Nothing
Set shortcut = Nothing
Set sysObj = Nothing