Recent

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

wp

  • Hero Member
  • *****
  • Posts: 7529
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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

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: 3520
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: 3520
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8722
  • 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

  • Sr. Member
  • ****
  • Posts: 461
  • Automation leads to relaxation...
    • Free BrainWaveCC Console Utilities
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.0.11 r63516 / FPC v3.2.1-r46879 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 2004 (Build 19041.508)
Other Systems: Windows 10 Pro x64, Version 2004 or greater

ASBzone

  • Sr. Member
  • ****
  • Posts: 461
  • Automation leads to relaxation...
    • Free BrainWaveCC Console Utilities
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.0.11 r63516 / FPC v3.2.1-r46879 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 2004 (Build 19041.508)
Other Systems: Windows 10 Pro x64, Version 2004 or greater

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8722
  • 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

  • Sr. Member
  • ****
  • Posts: 461
  • Automation leads to relaxation...
    • Free BrainWaveCC Console Utilities
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.0.11 r63516 / FPC v3.2.1-r46879 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 2004 (Build 19041.508)
Other Systems: Windows 10 Pro x64, Version 2004 or greater

 

TinyPortal © 2005-2018