Set Fso = WScript.CreateObject( "Scripting.FileSystemObject" ) strCurPath = WScript.ScriptFullName Set obj = Fso.GetFile( strCurPath ) Set obj = obj.ParentFolder strCurPath = obj.Path Set WshShell = WScript.CreateObject("WScript.Shell") strDesktop = WshShell.SpecialFolders("Desktop") Set oShellLink = WshShell.CreateShortcut(strDesktop & "\WinOfSql.lnk") oShellLink.TargetPath = strCurPath & "\WinOfSql.exe" oShellLink.WindowStyle = 1 oShellLink.IconLocation = strCurPath & "\WinOfSql.exe, 0" oShellLink.Description = "ショートカット スクリプト." oShellLink.WorkingDirectory = strCurPath oShellLink.Save Wscript.Echo "デスクトップに" & oShellLink.TargetPath & "のショートカットが作成されました"