' ------------------------------------------------------------------------ ' Copyright (C) 2000 Marios Polyzoes. marpoly@ geo.gr ' ------------------------------------------------------------------------ Dim WSHShell Set WSHShell = WScript.CreateObject("WScript.Shell") Dim intDoIt, APath, Myshortcut, fso, WinPath, f, fc, nf, folderName Set fso = CreateObject("Scripting.FileSystemObject") Set WinPath = fso.GetSpecialFolder(WindowsFolder) Apath = (WinPath & "\Start Menu") L_Welcome_MsgBox_Message_Text = "This script creates in Start Menu useful submenus for Dial Up, Control Panel." & Chr(13) & "This will create a 'Shortcut to Notepad' in the folder " & Winpath & "\SendTo." & Chr(13) & "When you right click on a file you can use the send to Notepad to edit it." & Chr(13) & Chr(13) & "Works on Win98, Millennium." L_Welcome_MsgBox_Title_Text = "Useful submenus - by Marios Polyzoes" Call Welcome() folderName = "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Call AddNewFolder(Apath, folderName) folderName = "Dial Up Net.{992CFFA0-F557-101A-88EC-00DD010CCC48}" Call AddNewFolder(Apath, folderName) Set MyShortcut = WSHShell.CreateShortcut(Winpath & "\SendTo\Notepad.lnk") MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings("%windir%\notepad.exe") MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("%windir%") MyShortcut.WindowStyle = 4 MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings(WinPath & "\notepad.exe, 0") MyShortcut.Save WScript.Echo "The shortcuts are created. Click on Start to see them." ' ******************************************************************************** ' * ' * Welcome ' * Sub Welcome() intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _ vbOKCancel + vbInformation, _ L_Welcome_MsgBox_Title_Text ) If intDoIt = vbCancel Then WScript.Quit End If End Sub Sub AddNewFolder(Apath, folderName) Set f = fso.GetFolder(Apath) Set fc = f.SubFolders Set nf = fc.Add(folderName) End Sub