Bonjour,
Je suis en train de basculer à Vista, mais la commande SHELL qui fonctionne
bien sous W2K ou WXP génére une erreur 5.
Je cherche depuis deux jour mais je ne trouve aucune réponse por l'instant.
Merci d'avance à celui qui me donnera une réponse
Bonjour,
Je suis en train de basculer à Vista, mais la commande SHELL qui fonctionne
bien sous W2K ou WXP génére une erreur 5.
Je cherche depuis deux jour mais je ne trouve aucune réponse por l'instant.
Merci d'avance à celui qui me donnera une réponse
Bonjour,
Je suis en train de basculer à Vista, mais la commande SHELL qui fonctionne
bien sous W2K ou WXP génére une erreur 5.
Je cherche depuis deux jour mais je ne trouve aucune réponse por l'instant.
Merci d'avance à celui qui me donnera une réponse
Pascal a écrit :Bonjour,
Je suis en train de basculer à Vista, mais la commande SHELL qui
fonctionne
bien sous W2K ou WXP génére une erreur 5.
Je cherche depuis deux jour mais je ne trouve aucune réponse por
l'instant.
Merci d'avance à celui qui me donnera une réponse
Peux tu publier ici la partie de ton code qui pose problème
J'ai essayé avec :
Private Sub Command1_Click()
Shell "notepad.exe", vbMaximizedFocus
End Sub
ça passe sans difficulté. Peut être le problème se trouve t-il ailleurs.
--
Cordialement,
Jacques.
Pascal a écrit :
Bonjour,
Je suis en train de basculer à Vista, mais la commande SHELL qui
fonctionne
bien sous W2K ou WXP génére une erreur 5.
Je cherche depuis deux jour mais je ne trouve aucune réponse por
l'instant.
Merci d'avance à celui qui me donnera une réponse
Peux tu publier ici la partie de ton code qui pose problème
J'ai essayé avec :
Private Sub Command1_Click()
Shell "notepad.exe", vbMaximizedFocus
End Sub
ça passe sans difficulté. Peut être le problème se trouve t-il ailleurs.
--
Cordialement,
Jacques.
Pascal a écrit :Bonjour,
Je suis en train de basculer à Vista, mais la commande SHELL qui
fonctionne
bien sous W2K ou WXP génére une erreur 5.
Je cherche depuis deux jour mais je ne trouve aucune réponse por
l'instant.
Merci d'avance à celui qui me donnera une réponse
Peux tu publier ici la partie de ton code qui pose problème
J'ai essayé avec :
Private Sub Command1_Click()
Shell "notepad.exe", vbMaximizedFocus
End Sub
ça passe sans difficulté. Peut être le problème se trouve t-il ailleurs.
--
Cordialement,
Jacques.
Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y a
quelques années sur Internet et que j'utilise depuis trés réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As Long)
As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal hProcess
As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment
As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO,
lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= > ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y a
quelques années sur Internet et que j'utilise depuis trés réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As Long)
As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal hProcess
As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment
As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO,
lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= > ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y a
quelques années sur Internet et que j'utilise depuis trés réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As Long)
As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal hProcess
As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment
As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO,
lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= > ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
Bonjour Pascal,
Pascal a écrit :Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y
a quelques années sur Internet et que j'utilise depuis trés
réguliérement.
J'y jette un oeil demain, un peu cassé là.
Bonjour Pascal,
Pascal a écrit :
Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y
a quelques années sur Internet et que j'utilise depuis trés
réguliérement.
J'y jette un oeil demain, un peu cassé là.
Bonjour Pascal,
Pascal a écrit :Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y
a quelques années sur Internet et que j'utilise depuis trés
réguliérement.
J'y jette un oeil demain, un peu cassé là.
- Plus intéressant, un shell synchrone, très simple
et très pratique:
Jean-marc Noury (jean_marc_n2)
Microsoft MVP - Visual Basic
mailto: remove '_no_spam_' ;
FAQ VB: http://faq.vb.free.fr/
- Plus intéressant, un shell synchrone, très simple
et très pratique:
Jean-marc Noury (jean_marc_n2)
Microsoft MVP - Visual Basic
mailto: remove '_no_spam_' ; _no_spam_jean_marc_n2@yahoo.fr
FAQ VB: http://faq.vb.free.fr/
- Plus intéressant, un shell synchrone, très simple
et très pratique:
Jean-marc Noury (jean_marc_n2)
Microsoft MVP - Visual Basic
mailto: remove '_no_spam_' ;
FAQ VB: http://faq.vb.free.fr/
Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y a
quelques années sur Internet et que j'utilise depuis trés réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As Long)
As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal hProcess
As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment
As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO,
lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= > ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y a
quelques années sur Internet et que j'utilise depuis trés réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As Long)
As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal hProcess
As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment
As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO,
lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= > ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y a
quelques années sur Internet et que j'utilise depuis trés réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As Long)
As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal hProcess
As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment
As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO,
lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= > ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
"jean-marc" wrote in message
news:4668f97e$0$13850$- Plus intéressant, un shell synchrone, très simple
et très pratique:
Je me suis trompé de lien :-))
voila le bon:
http://faq.vb.free.fr/index.php?question2
"jean-marc" <jean_marc_n2@yahoo.fr.invalid> wrote in message
news:4668f97e$0$13850$ba620e4c@news.skynet.be...
- Plus intéressant, un shell synchrone, très simple
et très pratique:
Je me suis trompé de lien :-))
voila le bon:
http://faq.vb.free.fr/index.php?question2
"jean-marc" wrote in message
news:4668f97e$0$13850$- Plus intéressant, un shell synchrone, très simple
et très pratique:
Je me suis trompé de lien :-))
voila le bon:
http://faq.vb.free.fr/index.php?question2
Bonjour Pascal,
Pascal a écrit :Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y
a quelques années sur Internet et que j'utilise depuis trés
réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As
Long) As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal
hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal
lpEnvironment As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As
STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= >> ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As
Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >>
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
Ton code, ainsi que celui de la FAQ, indiqué par Jean-Marc, fonctionne
parfaitement chez moi. Ce qui m'étonne c'est que l'erreur que tu obtiens :
Erreur 5 Appel ou argument de procédure incorrecte ne peut, normalement,
se produire que sur l'appel d'une procédure VB, par exemple
Text1.Visible = False
Text1.SetFocus
or ton code utilise uniquement des assignations de variables et des appels
aux API's.
As tu la possibilité de tracer ton programme, ou d'y insérer un code de
gestion d'erreur ?
--
Cordialement,
Jacques.
Bonjour Pascal,
Pascal a écrit :
Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y
a quelques années sur Internet et que j'utilise depuis trés
réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As
Long) As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal
hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal
lpEnvironment As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As
STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= >> ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As
Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >>
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
Ton code, ainsi que celui de la FAQ, indiqué par Jean-Marc, fonctionne
parfaitement chez moi. Ce qui m'étonne c'est que l'erreur que tu obtiens :
Erreur 5 Appel ou argument de procédure incorrecte ne peut, normalement,
se produire que sur l'appel d'une procédure VB, par exemple
Text1.Visible = False
Text1.SetFocus
or ton code utilise uniquement des assignations de variables et des appels
aux API's.
As tu la possibilité de tracer ton programme, ou d'y insérer un code de
gestion d'erreur ?
--
Cordialement,
Jacques.
Bonjour Pascal,
Pascal a écrit :Voici le code que j'utilise, c'est un shellsynchrone que j'ai trouvé il y
a quelques années sur Internet et que j'utilise depuis trés
réguliérement.
Utilisation du Shell synchrone
If SyncShell("Notepad.exe") Then
MsgBox "Fin normal"
Else
MsgBox "Fin Anormal"
End If
Module
Option Explicit
'Shell Constants
Public Const NORMAL_PRIORITY_CLASS As Long = &H20&
Public Const INFINITE As Long = -1&
Public Const STATUS_WAIT_0 As Long = &H0
Public Const WAIT_OBJECT_0 As Long = STATUS_WAIT_0
Public Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Public Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Private Declare Function CloseHandle Lib "Kernel32" (ByVal hObject As
Long) As Long
Private Declare Function WaitForSingleObject Lib "Kernel32" (ByVal
hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function InputIdle Lib "user32" Alias "WaitForInputIdle"
(ByVal hProcess As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CreateProcessA Lib "Kernel32" (ByVal
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal
bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal
lpEnvironment As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As
STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
''============================================================================= >> ''Code flow routines:
Public Function SyncShell(CommandLine As String, Optional Timeout As
Long, _
Optional WaitForInputIdle As Boolean, _
Optional Hide As Boolean = False) As Boolean
Dim hProcess As Long
Dim ret As Long
Dim nMilliseconds As Long
If Timeout > 0 Then
nMilliseconds = Timeout
Else
nMilliseconds = INFINITE
End If
hProcess = StartProcess(CommandLine, Hide)
If WaitForInputIdle Then
'Wait for the shelled application to finish setting up its UI:
ret = InputIdle(hProcess, nMilliseconds)
Else
'Wait for the shelled application to terminate:
ret = WaitForSingleObject(hProcess, nMilliseconds)
End If
CloseHandle hProcess
'Return True if the application finished. Otherwise it timed out or
erred.
SyncShell = (ret = WAIT_OBJECT_0)
End Function
Public Function StartProcess(CommandLine As String, _
Optional Hide As Boolean = False) As Long
Const STARTF_USESHOWWINDOW As Long = &H1
Const SW_HIDE As Long = 0
Dim proc As PROCESS_INFORMATION
Dim Start As STARTUPINFO
'Initialize the STARTUPINFO structure:
Start.cb = Len(Start)
If Hide Then
Start.dwFlags = STARTF_USESHOWWINDOW
Start.wShowWindow = SW_HIDE
End If
'Start the shelled application:
CreateProcessA 0&, CommandLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, Start, proc
StartProcess = proc.hProcess
End Function
=========================================================== >>
J'ai aussi essayé le code suivant :
ShellSynchrone Me, "NotePad.Exe", " C:Test.Txt"
Module
Option Explicit
Declare Function GetActiveWindow Lib "user32" () As Long
Public Sub ShellSynchrone(w As Form, prg As String, Param As String)
'Exemple Utilisation
Dim X As Long
Dim hwndTask As Long
' Partie 1 lancement de l'application
X = Shell(prg & " " & Param, vbNormalFocus)
' Attente que l'application se termine
Do While GetActiveWindow() = w.hwnd
DoEvents
Loop
Do Until GetActiveWindow() = w.hwnd
DoEvents
Loop
End Sub
Ton code, ainsi que celui de la FAQ, indiqué par Jean-Marc, fonctionne
parfaitement chez moi. Ce qui m'étonne c'est que l'erreur que tu obtiens :
Erreur 5 Appel ou argument de procédure incorrecte ne peut, normalement,
se produire que sur l'appel d'une procédure VB, par exemple
Text1.Visible = False
Text1.SetFocus
or ton code utilise uniquement des assignations de variables et des appels
aux API's.
As tu la possibilité de tracer ton programme, ou d'y insérer un code de
gestion d'erreur ?
--
Cordialement,
Jacques.
Merci pour ces réponses, en creusant j'ai trouvé que le probleme viens de ce
que j'appele pas la façon. Le programme appelé par le Shell est situé sur un
partage réseau, si je le remplace par notepad.exe cela fonctionne, donc il
doit y avoir un probleme de droit quelque part, le programme appelé existe
bien, l'éxecution via l'explorateur fonctionne, il n'y a quel par mon shell
que cela ne fonctionne pas !!!
Les droits sur l'objet sont "Tout le monde" accés complet, sur des PC sous
W2K ou WXP il n'y a pas de problémes !!!!
Merci pour ces réponses, en creusant j'ai trouvé que le probleme viens de ce
que j'appele pas la façon. Le programme appelé par le Shell est situé sur un
partage réseau, si je le remplace par notepad.exe cela fonctionne, donc il
doit y avoir un probleme de droit quelque part, le programme appelé existe
bien, l'éxecution via l'explorateur fonctionne, il n'y a quel par mon shell
que cela ne fonctionne pas !!!
Les droits sur l'objet sont "Tout le monde" accés complet, sur des PC sous
W2K ou WXP il n'y a pas de problémes !!!!
Merci pour ces réponses, en creusant j'ai trouvé que le probleme viens de ce
que j'appele pas la façon. Le programme appelé par le Shell est situé sur un
partage réseau, si je le remplace par notepad.exe cela fonctionne, donc il
doit y avoir un probleme de droit quelque part, le programme appelé existe
bien, l'éxecution via l'explorateur fonctionne, il n'y a quel par mon shell
que cela ne fonctionne pas !!!
Les droits sur l'objet sont "Tout le monde" accés complet, sur des PC sous
W2K ou WXP il n'y a pas de problémes !!!!
Pascal a écrit :Merci pour ces réponses, en creusant j'ai trouvé que le probleme viens de
ce que j'appele pas la façon. Le programme appelé par le Shell est situé
sur un partage réseau, si je le remplace par notepad.exe cela fonctionne,
donc il doit y avoir un probleme de droit quelque part, le programme
appelé existe bien, l'éxecution via l'explorateur fonctionne, il n'y a
quel par mon shell que cela ne fonctionne pas !!!
Les droits sur l'objet sont "Tout le monde" accés complet, sur des PC
sous W2K ou WXP il n'y a pas de problémes !!!!
Peut être lié à l'UAC (User Access Control). Essaie de lancer ton
programme en tant qu'administrateur, ou de désactiver UAC, juste pour
voir.
--
Cordialement,
Jacques.
Pascal a écrit :
Merci pour ces réponses, en creusant j'ai trouvé que le probleme viens de
ce que j'appele pas la façon. Le programme appelé par le Shell est situé
sur un partage réseau, si je le remplace par notepad.exe cela fonctionne,
donc il doit y avoir un probleme de droit quelque part, le programme
appelé existe bien, l'éxecution via l'explorateur fonctionne, il n'y a
quel par mon shell que cela ne fonctionne pas !!!
Les droits sur l'objet sont "Tout le monde" accés complet, sur des PC
sous W2K ou WXP il n'y a pas de problémes !!!!
Peut être lié à l'UAC (User Access Control). Essaie de lancer ton
programme en tant qu'administrateur, ou de désactiver UAC, juste pour
voir.
--
Cordialement,
Jacques.
Pascal a écrit :Merci pour ces réponses, en creusant j'ai trouvé que le probleme viens de
ce que j'appele pas la façon. Le programme appelé par le Shell est situé
sur un partage réseau, si je le remplace par notepad.exe cela fonctionne,
donc il doit y avoir un probleme de droit quelque part, le programme
appelé existe bien, l'éxecution via l'explorateur fonctionne, il n'y a
quel par mon shell que cela ne fonctionne pas !!!
Les droits sur l'objet sont "Tout le monde" accés complet, sur des PC
sous W2K ou WXP il n'y a pas de problémes !!!!
Peut être lié à l'UAC (User Access Control). Essaie de lancer ton
programme en tant qu'administrateur, ou de désactiver UAC, juste pour
voir.
--
Cordialement,
Jacques.