Recent

Author Topic: ShellExecute not work with msiexec  (Read 4566 times)

wp

  • Hero Member
  • *****
  • Posts: 11831
Re: ShellExecute not work with msiexec
« Reply #15 on: January 24, 2020, 12:29:30 pm »
EOSError = operating system error... Just a wild guess: Maybe your program does not the rights to run this mysql program? (don't know, though, why ShellExecute can...). Try as admin.

wytwyt02

  • Jr. Member
  • **
  • Posts: 83
Re: ShellExecute not work with msiexec
« Reply #16 on: January 24, 2020, 01:49:13 pm »
EOSError = operating system error... Just a wild guess: Maybe your program does not the rights to run this mysql program? (don't know, though, why ShellExecute can...). Try as admin.


admin is the same

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: ShellExecute not work with msiexec
« Reply #17 on: January 24, 2020, 11:06:45 pm »
maybe it's already been covered but I'll repeat it here if not..

Windows no longer allows direct execution of the File for some items in Windows 10, 7 etc

 For example Edge browser can no longer be executed via its EXE...

 You need to use the shellExecute with the file in mind via the extension and the Shell will then execute the proper app in the system for it but it will do it under the control of windows, not your app.

 So for example

 ShellExcute(normal Parms, 'TheInstallerFileName.msi',....)

all you should include is the paths for your files and make no attempt to use a windows EXE..

basically using TProcess etc most likely will not work.

The only true wisdom is knowing you know nothing

wytwyt02

  • Jr. Member
  • **
  • Posts: 83
Re: ShellExecute not work with msiexec
« Reply #18 on: January 25, 2020, 02:05:25 am »
maybe it's already been covered but I'll repeat it here if not..

Windows no longer allows direct execution of the File for some items in Windows 10, 7 etc

 For example Edge browser can no longer be executed via its EXE...

 You need to use the shellExecute with the file in mind via the extension and the Shell will then execute the proper app in the system for it but it will do it under the control of windows, not your app.

 So for example

 ShellExcute(normal Parms, 'TheInstallerFileName.msi',....)

all you should include is the paths for your files and make no attempt to use a windows EXE..

basically using TProcess etc most likely will not work.

TProcess is not base on ShellExcute?

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: ShellExecute not work with msiexec
« Reply #19 on: January 25, 2020, 05:26:33 am »
maybe it's already been covered but I'll repeat it here if not..

Windows no longer allows direct execution of the File for some items in Windows 10, 7 etc

 For example Edge browser can no longer be executed via its EXE...

 You need to use the shellExecute with the file in mind via the extension and the Shell will then execute the proper app in the system for it but it will do it under the control of windows, not your app.

 So for example

 ShellExcute(normal Parms, 'TheInstallerFileName.msi',....)

all you should include is the paths for your files and make no attempt to use a windows EXE..

basically using TProcess etc most likely will not work.

TProcess is not base on ShellExcute?

No
The only true wisdom is knowing you know nothing

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11352
  • FPC developer.
Re: ShellExecute not work with msiexec
« Reply #20 on: January 25, 2020, 03:29:38 pm »
I doubt that is the case though, since mysql* doesn't sound like something microsofty.

Tprocess is based on CreateProcess()

wytwyt02

  • Jr. Member
  • **
  • Posts: 83
Re: ShellExecute not work with msiexec
« Reply #21 on: January 26, 2020, 05:01:40 am »
I doubt that is the case though, since mysql* doesn't sound like something microsofty.

Tprocess is based on CreateProcess()

What's microsofty?

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: ShellExecute not work with msiexec
« Reply #22 on: January 26, 2020, 05:03:35 am »
I doubt that is the case though, since mysql* doesn't sound like something microsofty.

Tprocess is based on CreateProcess()

What's microsofty?


"microsofty"  = something resembling or pertaining to Microsoft.   :)
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: ShellExecute not work with msiexec
« Reply #23 on: January 26, 2020, 05:05:34 am »
I doubt that is the case though, since mysql* doesn't sound like something microsofty.

True, mysql isn't a Microsoft app, but mysql.msi is going to call the official Windows installer (MSIEXEC), and then the things that Jamie identified are likely going to come into play.
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11352
  • FPC developer.
Re: ShellExecute not work with msiexec
« Reply #24 on: January 26, 2020, 02:09:19 pm »
I doubt that is the case though, since mysql* doesn't sound like something microsofty.

True, mysql isn't a Microsoft app, but mysql.msi is going to call the official Windows installer (MSIEXEC), and then the things that Jamie identified are likely going to come into play.

Seems you missed this is bit: (the boldening is mine)

Hi, Mysql msi installed success, Now I need to config the mysql instance, MySQL provide a toll called MySQLInstanceConfig.exe to config, So I tried with:

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: ShellExecute not work with msiexec
« Reply #25 on: January 26, 2020, 07:01:23 pm »
Seems you missed this is bit: (the boldening is mine)


 :-[


Indeed I did. Oops.
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

 

TinyPortal © 2005-2018