[Lazarus] TProcess and Windows XP

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] TProcess and Windows XP

Richard Mace
Hi,
I'm having an issue running an application using TProcess on Windows XP.
I'm basically getting an exception with error 193. Any ideas?
If I use ShellExcecute, it works fine, but I understand that the better way of doing it now is by TPorcess.

Richard

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TProcess and Windows XP

leledumbo
Administrator
Error 193 is "%1 is not a valid Win32 application", what is your .Executable or .CommandLine property?
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TProcess and Windows XP

Richard Mace
It was the complete path to an .msi file. Does that make a difference?

Richard


On 3 July 2013 07:16, leledumbo <[hidden email]> wrote:
Error 193 is "%1 is not a valid Win32 application", what is your .Executable
or .CommandLine property?



--
View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TProcess-and-Windows-XP-tp4032239p4032244.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TProcess and Windows XP

Michael Van Canneyt


On Wed, 3 Jul 2013, Richard Mace wrote:

> It was the complete path to an .msi file. Does that make a difference?

Yes.

You can only specify executables in TProcess. .msi is not an executable file.
You need to use the shellexecute function (maybe the LCL provides an equivalent)
to start the executable associated with a file type (in this case, the MS installer).

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TProcess and Windows XP

Sven Barth
In reply to this post by Richard Mace
Am 03.07.2013 08:57, schrieb Richard Mace:
It was the complete path to an .msi file. Does that make a difference?

*.msi files are not executables by themselves, they are just stupid files. You don't see this, because they are linked to (AFAIK) msiexec which executes them when you open them in explorer (or with ShellExecute). So you'll need to look into msiexec and it's parameters to install a *.msi file.

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TProcess and Windows XP

Sven Barth
In reply to this post by Michael Van Canneyt
Am 03.07.2013 09:03, schrieb Michael Van Canneyt:

>
>
> On Wed, 3 Jul 2013, Richard Mace wrote:
>
>> It was the complete path to an .msi file. Does that make a difference?
>
> Yes.
>
> You can only specify executables in TProcess. .msi is not an
> executable file.
> You need to use the shellexecute function (maybe the LCL provides an
> equivalent) to start the executable associated with a file type (in
> this case, the MS installer).
>
Or start the executable which processes *.msi files and pass the *.msi
file as argument ;)

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TProcess and Windows XP

Michael Van Canneyt


On Wed, 3 Jul 2013, Sven Barth wrote:

> Am 03.07.2013 09:03, schrieb Michael Van Canneyt:
>>
>>
>> On Wed, 3 Jul 2013, Richard Mace wrote:
>>
>>> It was the complete path to an .msi file. Does that make a difference?
>>
>> Yes.
>>
>> You can only specify executables in TProcess. .msi is not an executable
>> file.
>> You need to use the shellexecute function (maybe the LCL provides an
>> equivalent) to start the executable associated with a file type (in this
>> case, the MS installer).
>>
> Or start the executable which processes *.msi files and pass the *.msi file
> as argument ;)

Obviously. I just don't know what that executable is or where it resides.

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TProcess and Windows XP

Richard Mace
In reply to this post by Michael Van Canneyt

Yes.

You can only specify executables in TProcess. .msi is not an executable file.
You need to use the shellexecute function (maybe the LCL provides an equivalent) to start the executable associated with a file type (in this case, the MS installer).

Ah, that makes sense. Thanks everyone for there help.

Richard

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus