Код:
Global $sFile = @ScriptDir & '\1ст.вмр'
_FileOpenPhotoshop($sFile)
Func _FileOpenPhotoshop($FileName = '')
If Not FileExists($FileName) Then Return SetError(1, 0, 0)
Local $sPATH_PHOTOSHOP_DIR[2] = [ _
RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop\11.0", "ApplicationPath"), _
RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop\10.0", "ApplicationPath")]
For $i = 0 To UBound($sPATH_PHOTOSHOP_DIR) - 1
If FileExists($sPATH_PHOTOSHOP_DIR[$i] & 'Photoshop.exe') Then
$Pid = Run($sPATH_PHOTOSHOP_DIR[$i] & 'Photoshop.exe' & ' ' & $FileName)
Return SetError(0, $Pid, $sPATH_PHOTOSHOP_DIR[$i] & 'Photoshop.exe')
Else
ContinueLoop
EndIf
Next
EndFunc ;==>_FileOpenPhotoshop