'********************************* ' Coded by dUZER(duzer99@mail.ru) '********************************* Option Explicit Const fna = "\MAZDA EPC Europe+Japan.lnk" Dim Text, result, filep, path, Shortcut, filep1, d1, d2, f2 Dim WshShell, fso, regEx, Match, Matches, RetStr Set WshShell = WScript.CreateObject("WScript.Shell") filep = WshShell.SpecialFolders("Desktop") & fna d1 = "C:\Mazepc\mazepc.ini" d2 = "C:\Mazjap\mazepc.ini" Set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists(filep) Then Set WshShell = WScript.CreateObject("WScript.Shell") Set regEx = New RegExp regEx.Pattern = "Fonts" regEx.IgnoreCase = True filep1 = regEx.Replace(WshShell.SpecialFolders(8), "mazepc.ini") Text = "Europe (Yes) Japan (No) Exit (Cancel)" result = MsgBox(Text, vbYesNoCancel, "MAZDA EPC2") If fso.FileExists(filep1) Then fso.DeleteFile filep1 If result = 6 Then Set f2 = fso.GetFile(d1) f2.Copy (filep1) WshShell.Run "C:\Mazepc\Bin\mazdaepc.exe", 1 ElseIf result = 7 Then Set f2 = fso.GetFile(d2) f2.Copy (filep1) WshShell.Run "C:\Mazjap\Bin\mazdaepc.exe", 1 ElseIf result = 2 Then WScript.Quit End If Else path = WScript.ScriptFullName path = Left(path, InstrRev(path, "\")) Set WshShell = WScript.CreateObject("WScript.Shell") Set Shortcut = WshShell.CreateShortcut(filep) Shortcut.TargetPath = WScript.ScriptFullName Shortcut.WorkingDirectory = path Shortcut.IconLocation = "C:\Mazepc\bin\mazdaepc.exe" Shortcut.Save End If