shell execute close the current called exe use:

User avatar
sal21
PlatinumLounger
Posts: 4337
Joined: 26 Apr 2010, 17:36

shell execute close the current called exe use:

Post by sal21 »

i use:

Code: Select all

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
                                     ByVal hwnd As Long, _
                                     ByVal lpOperation As String, _
                                     ByVal lpFile As String, _
                                     ByVal lpParameters As String, _
                                     ByVal lpDirectory As String, _
                                     ByVal nShowCmd As Long) As Long

Public Const SW_HIDE As Long = 0

Public Const SW_SHOWNORMAL As Long = 1

Public Const SW_SHOWMAXIMIZED As Long = 3

Public Const SW_SHOWMINIMIZED As Long = 2

Private Sub Command1_Click()

    Set DOWNLOAD = Nothing
    Shell strSaveTo_EXE, vbNormalFocus
    Unload Me

End Sub
when the code goto the shell, open a new form, but when i click on install the form closes and dont exctract file in the destination dir!!!!

note:
i have the .exe in c:\servizio\my.exe
You do not have the required permissions to view the files attached to this post.
Last edited by sal21 on 16 Mar 2021, 21:47, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78370
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: shell execute close the current called exeI use:

Post by HansV »

I don't think I can help with this, but you don't use ShellExecute at all. You're using Shell instead...
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4337
Joined: 26 Apr 2010, 17:36

Re: shell execute close the current called exeI use:

Post by sal21 »

HansV wrote:
16 Mar 2021, 20:12
I don't think I can help with this, but you don't use ShellExecute at all. You're using Shell instead...
ok
example with Shell?
Tks

User avatar
HansV
Administrator
Posts: 78370
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: shell execute close the current called exeI use:

Post by HansV »

I have no idea what this is all about, sorry.
Best wishes,
Hans