J'utilise ShellExecute pour démarrer un .exe
lngReturn = ShellExecute(Me.hwnd, vbNullString, App.Path & "\RVRTupgrade.exe", vbNullString, App.Path, SW_SHOWNORMAL)
If lngReturn > 32 Then
NewVer = True ' Download OK ET l'exe upgrade existe bien
Select Case lngReturn
Case 0: MsgTxt = "The operating system is out of memory or resources"
Case 2: MsgTxt = "The specified file was not found."
Case 3: MsgTxt = "The specified path was not found."
Case 5: MsgTxt = "The operating system denied access to the specified file."
Case 8: MsgTxt = "There was not enough memory to complete the operation."
Case 11: MsgTxt = "The .exe file is invalid (non-Win32 .exe or error in .exe image)."
Case 26: MsgTxt = "A sharing violation occurred."
Case 27: MsgTxt = "The file name association is incomplete or invalid."
Case 28: MsgTxt = "The DDE transaction could not be completed because the request timed out."
Case 29: MsgTxt = "The DDE transaction failed."
Case 30: MsgTxt = "The DDE transaction could not be completed because other DDE transactions were being processed."
Case 31: MsgTxt = "There is no application associated with the given file name extension."
Case 32: MsgTxt = "The specified DLL was not found."
Case Else: MsgTxt = Str$(lngReturn)
MsgBox ("ShellExecute error " & MsgTxt), vbCritical
En IDE tout fonctionne très bien mais si je compile j'ai une erreur 5 "accès refusé".
Y comprenez-vous quelque chose ?