' ' ------------------------------------------------------------------------ ' Copyright (C) 2002 Marios Polyzoes. marpoly@geo.(gr) ' ------------------------------------------------------------------------ 'SN 020507 ' ******************************************************************************** Dim WSHShell, theFolder, fso, d, f, fc, s, nf, MyShortcut, MyDesktop, WinPath, TheCurrentUser Set WSHShell = WScript.CreateObject("WScript.Shell") ' ******************************************************************************** ' This reads who is the current user TheCurrentUser = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon User Name") L_Welcome_MsgBox_Message_Text = "This script will create The shortcut of Photoshop 7 in SendTo folder of the user " & TheCurrentUser & Chr(13) & "When you right click on a file you can use the 'send to Photoshop 7' to edit it." & Chr(13) & Chr(13) & "Questions and queries? marpolyz@hotmail. com" L_Welcome_MsgBox_Title_Text = "A script from Marios" Call Welcome() Set fso = CreateObject("Scripting.FileSystemObject") Set WinPath = fso.GetSpecialFolder(WindowsFolder) Set d = fso.GetDrive(fso.GetDriveName(WinPath)) s = d.DriveLetter ' Create the Shortcut in send to folder Set MyShortcut = WSHShell.CreateShortcut(s & ":\Documents and Settings\" & TheCurrentUser & "\SendTo\Photoshop 7.0.lnk") MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings(s & ":\Program Files\Adobe\Photoshop 7.0\Photoshop.exe") MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings(s & ":\Program Files\Adobe\Photoshop 7.0\") MyShortcut.WindowStyle = 4 MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings(s & ":\Program Files\Adobe\Photoshop 7.0\Photoshop.exe, 0") MyShortcut.Save '------------------------- WScript.Echo "The work is done. Thank you " & TheCurrentUser & "!" ' ******************************************************************************** ' * ' * Welcome ' * Sub Welcome() Dim intDoIt intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _ vbOKCancel + vbInformation, _ L_Welcome_MsgBox_Title_Text ) If intDoIt = vbCancel Then WScript.Quit End If End Sub