Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #5096 > unrolled thread

RUN do not work under windows 8

Started byJürgen Knauf <j.knauf@kp-software.de>
First post2013-04-20 18:51 +0200
Last post2013-04-22 16:53 +0200
Articles 7 — 2 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  RUN do not work under windows 8 Jürgen Knauf <j.knauf@kp-software.de> - 2013-04-20 18:51 +0200
    Re: RUN do not work under windows 8 "Jamal" <jamal@examples.net> - 2013-04-20 23:24 -0400
      Re: RUN do not work under windows 8 Jürgen Knauf <j.knauf@kp-software.de> - 2013-04-21 11:55 +0200
        Re: RUN do not work under windows 8 "Jamal" <jamal@examples.net> - 2013-04-21 12:08 -0400
          Re: RUN do not work under windows 8 Jürgen Knauf <j.knauf@kp-software.de> - 2013-04-22 09:08 +0200
            Re: RUN do not work under windows 8 "Jamal" <jamal@examples.net> - 2013-04-22 09:09 -0400
              Re: RUN do not work under windows 8 Jürgen Knauf <j.knauf@kp-software.de> - 2013-04-22 16:53 +0200

#5096 — RUN do not work under windows 8

FromJürgen Knauf <j.knauf@kp-software.de>
Date2013-04-20 18:51 +0200
SubjectRUN do not work under windows 8
Message-ID<5172c790$0$9510$9b4e6d93@newsspool1.arcor-online.net>
Hi,

I tried to get the "RUN" command working under Windows 8, but with no 
effort!

  cRun := WorkDir()+"DoSomething.exe"
  GetAppObject():Run(cRun)

Any Idea? 

[toc] | [next] | [standalone]


#5097

From"Jamal" <jamal@examples.net>
Date2013-04-20 23:24 -0400
Message-ID<kkvm7d$fb5$1@speranza.aioe.org>
In reply to#5096
It works fine for me.

Jamal

"Jürgen Knauf"  wrote in message 
news:5172c790$0$9510$9b4e6d93@newsspool1.arcor-online.net...

Hi,

I tried to get the "RUN" command working under Windows 8, but with no
effort!

  cRun := WorkDir()+"DoSomething.exe"
  GetAppObject():Run(cRun)

Any Idea? 

[toc] | [prev] | [next] | [standalone]


#5099

FromJürgen Knauf <j.knauf@kp-software.de>
Date2013-04-21 11:55 +0200
Message-ID<5173b7bb$0$9504$9b4e6d93@newsspool1.arcor-online.net>
In reply to#5097
Hi Jamal,

I try to call a AutoHotKey Script (tmscript.exe), which gives a "Hello 
World" message out.
This do not work under Windows 8!

Regards
Jürgen

"Jamal"  schrieb im Newsbeitrag news:kkvm7d$fb5$1@speranza.aioe.org...

It works fine for me.

Jamal

"Jürgen Knauf"  wrote in message
news:5172c790$0$9510$9b4e6d93@newsspool1.arcor-online.net...

Hi,

I tried to get the "RUN" command working under Windows 8, but with no
effort!

  cRun := WorkDir()+"DoSomething.exe"
  GetAppObject():Run(cRun)

Any Idea? 

[toc] | [prev] | [next] | [standalone]


#5103

From"Jamal" <jamal@examples.net>
Date2013-04-21 12:08 -0400
Message-ID<kl12t2$6be$1@speranza.aioe.org>
In reply to#5099
Hi Jürgen,

Are you getting any error message? Is the exe a valid 32-bit app?

BTW, the  GetAppObject():Run() method internally calls:

WinExec(String2Psz(sCommand), SW_SHOWNORMAL)

According to the Win32 documentation:

The WinExec function runs the specified application.

This function is provided for compatibility with earlier versions of 
Windows. For Win32-based applications, use the CreateProcess function.

UINT WinExec(

LPCSTR lpCmdLine,
// address of command line

UINT uCmdShow
// window style for new application

);


Parameters

lpCmdLine

Points to a null-terminated character string that contains the command line 
(filename plus optional parameters) for the application to be executed. If 
the name of the executable file in the lpCmdLine parameter does not contain 
a directory path, Windows searches for the executable file in this sequence:

1.The directory from which the application loaded.

2.The current directory.

3.The Windows system directory. The GetSystemDirectory function retrieves 
the path of this directory.

4.The Windows directory. The GetWindowsDirectory function retrieves the path 
of this directory.

5.The directories listed in the PATH environment variable.

uCmdShow

Specifies how a Windows-based application window is to be shown and is used 
to supply the wShowWindow member of the STARTUPINFO parameter to the 
CreateProcess function. For a list of the acceptable values, see the 
description of the nCmdShow parameter of the ShowWindow function. For a 
non-Windows - based application, the PIF file, if any, for the application 
determines the window state.

Return Values

If the function succeeds, the return value is greater than 31.

If the function fails, the return value is one of the following error 
values:

Value
Meaning

0
The system is out of memory or resources.

ERROR_BAD_FORMAT
The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).

ERROR_FILE_NOT_FOUND
The specified file was not found.

ERROR_PATH_NOT_FOUND
The specified path was not found.

Remarks

Win32-based applications should use the CreateProcess function rather than 
this function. The WinExec function exists in Win32 to provide compatibility 
with earlier versions of Windows. For more information about how the WinExec 
function is implemented, see the Remarks section of the LoadModule function.

In Win32, the WinExec function returns when the started process calls the 
GetMessage function or a time-out limit is reached. To avoid waiting for the 
time out delay, call the GetMessage function as soon as possible in any 
process started by a call to WinExec.

See Also

CreateProcess, GetMessage, GetSystemDirectory, GetWindowsDirectory, 
LoadModule, ShowWindow

Jamal

"Jürgen Knauf"  wrote in message 
news:5173b7bb$0$9504$9b4e6d93@newsspool1.arcor-online.net...

Hi Jamal,

I try to call a AutoHotKey Script (tmscript.exe), which gives a "Hello
World" message out.
This do not work under Windows 8!

Regards
Jürgen

"Jamal"  schrieb im Newsbeitrag news:kkvm7d$fb5$1@speranza.aioe.org...

It works fine for me.

Jamal

"Jürgen Knauf"  wrote in message
news:5172c790$0$9510$9b4e6d93@newsspool1.arcor-online.net...

Hi,

I tried to get the "RUN" command working under Windows 8, but with no
effort!

  cRun := WorkDir()+"DoSomething.exe"
  GetAppObject():Run(cRun)

Any Idea? 

[toc] | [prev] | [next] | [standalone]


#5106

FromJürgen Knauf <j.knauf@kp-software.de>
Date2013-04-22 09:08 +0200
Message-ID<5174e1d2$0$6567$9b4e6d93@newsspool3.arcor-online.net>
In reply to#5103
>>Are you getting any error message?
No message

>> Is the exe a valid 32-bit app?
Yes

You can download and test the script:
http://www.kp-software.de/files/tmscript.exe

cRun := WorkDir()+"tmscript.exe"
GetAppObject():Run(cRun)


CreateProcess() also do not work.

Under Windows 7 there is no problem!

Juergen


"Jamal"  schrieb im Newsbeitrag news:kl12t2$6be$1@speranza.aioe.org...

Hi Jürgen,

Are you getting any error message? Is the exe a valid 32-bit app?

BTW, the  GetAppObject():Run() method internally calls:

WinExec(String2Psz(sCommand), SW_SHOWNORMAL)

According to the Win32 documentation:

The WinExec function runs the specified application.

This function is provided for compatibility with earlier versions of
Windows. For Win32-based applications, use the CreateProcess function.

UINT WinExec(

LPCSTR lpCmdLine,
// address of command line

UINT uCmdShow
// window style for new application

);


Parameters

lpCmdLine

Points to a null-terminated character string that contains the command line
(filename plus optional parameters) for the application to be executed. If
the name of the executable file in the lpCmdLine parameter does not contain
a directory path, Windows searches for the executable file in this sequence:

1.The directory from which the application loaded.

2.The current directory.

3.The Windows system directory. The GetSystemDirectory function retrieves
the path of this directory.

4.The Windows directory. The GetWindowsDirectory function retrieves the path
of this directory.

5.The directories listed in the PATH environment variable.

uCmdShow

Specifies how a Windows-based application window is to be shown and is used
to supply the wShowWindow member of the STARTUPINFO parameter to the
CreateProcess function. For a list of the acceptable values, see the
description of the nCmdShow parameter of the ShowWindow function. For a
non-Windows - based application, the PIF file, if any, for the application
determines the window state.

Return Values

If the function succeeds, the return value is greater than 31.

If the function fails, the return value is one of the following error
values:

Value
Meaning

0
The system is out of memory or resources.

ERROR_BAD_FORMAT
The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).

ERROR_FILE_NOT_FOUND
The specified file was not found.

ERROR_PATH_NOT_FOUND
The specified path was not found.

Remarks

Win32-based applications should use the CreateProcess function rather than
this function. The WinExec function exists in Win32 to provide compatibility
with earlier versions of Windows. For more information about how the WinExec
function is implemented, see the Remarks section of the LoadModule function.

In Win32, the WinExec function returns when the started process calls the
GetMessage function or a time-out limit is reached. To avoid waiting for the
time out delay, call the GetMessage function as soon as possible in any
process started by a call to WinExec.

See Also

CreateProcess, GetMessage, GetSystemDirectory, GetWindowsDirectory,
LoadModule, ShowWindow

Jamal

"Jürgen Knauf"  wrote in message
news:5173b7bb$0$9504$9b4e6d93@newsspool1.arcor-online.net...

Hi Jamal,

I try to call a AutoHotKey Script (tmscript.exe), which gives a "Hello
World" message out.
This do not work under Windows 8!

Regards
Jürgen

"Jamal"  schrieb im Newsbeitrag news:kkvm7d$fb5$1@speranza.aioe.org...

It works fine for me.

Jamal

"Jürgen Knauf"  wrote in message
news:5172c790$0$9510$9b4e6d93@newsspool1.arcor-online.net...

Hi,

I tried to get the "RUN" command working under Windows 8, but with no
effort!

  cRun := WorkDir()+"DoSomething.exe"
  GetAppObject():Run(cRun)

Any Idea? 

[toc] | [prev] | [next] | [standalone]


#5109

From"Jamal" <jamal@examples.net>
Date2013-04-22 09:09 -0400
Message-ID<kl3cql$7r0$1@speranza.aioe.org>
In reply to#5106
What return value you get when you run the following in a terminal app:

? WinExec(String2Psz(workdir() + "tmscript.exe"), SHOWNORMAL)

Jamal

"Jürgen Knauf"  wrote in message 
news:5174e1d2$0$6567$9b4e6d93@newsspool3.arcor-online.net...

>>Are you getting any error message?
No message

>> Is the exe a valid 32-bit app?
Yes

You can download and test the script:
http://www.kp-software.de/files/tmscript.exe

cRun := WorkDir()+"tmscript.exe"
GetAppObject():Run(cRun)


CreateProcess() also do not work.

Under Windows 7 there is no problem!

Juergen


"Jamal"  schrieb im Newsbeitrag news:kl12t2$6be$1@speranza.aioe.org...

Hi Jürgen,

Are you getting any error message? Is the exe a valid 32-bit app?

BTW, the  GetAppObject():Run() method internally calls:

WinExec(String2Psz(sCommand), SW_SHOWNORMAL)

According to the Win32 documentation:

The WinExec function runs the specified application.

This function is provided for compatibility with earlier versions of
Windows. For Win32-based applications, use the CreateProcess function.

UINT WinExec(

LPCSTR lpCmdLine,
// address of command line

UINT uCmdShow
// window style for new application

);


Parameters

lpCmdLine

Points to a null-terminated character string that contains the command line
(filename plus optional parameters) for the application to be executed. If
the name of the executable file in the lpCmdLine parameter does not contain
a directory path, Windows searches for the executable file in this sequence:

1.The directory from which the application loaded.

2.The current directory.

3.The Windows system directory. The GetSystemDirectory function retrieves
the path of this directory.

4.The Windows directory. The GetWindowsDirectory function retrieves the path
of this directory.

5.The directories listed in the PATH environment variable.

uCmdShow

Specifies how a Windows-based application window is to be shown and is used
to supply the wShowWindow member of the STARTUPINFO parameter to the
CreateProcess function. For a list of the acceptable values, see the
description of the nCmdShow parameter of the ShowWindow function. For a
non-Windows - based application, the PIF file, if any, for the application
determines the window state.

Return Values

If the function succeeds, the return value is greater than 31.

If the function fails, the return value is one of the following error
values:

Value
Meaning

0
The system is out of memory or resources.

ERROR_BAD_FORMAT
The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).

ERROR_FILE_NOT_FOUND
The specified file was not found.

ERROR_PATH_NOT_FOUND
The specified path was not found.

Remarks

Win32-based applications should use the CreateProcess function rather than
this function. The WinExec function exists in Win32 to provide compatibility
with earlier versions of Windows. For more information about how the WinExec
function is implemented, see the Remarks section of the LoadModule function.

In Win32, the WinExec function returns when the started process calls the
GetMessage function or a time-out limit is reached. To avoid waiting for the
time out delay, call the GetMessage function as soon as possible in any
process started by a call to WinExec.

See Also

CreateProcess, GetMessage, GetSystemDirectory, GetWindowsDirectory,
LoadModule, ShowWindow

Jamal

"Jürgen Knauf"  wrote in message
news:5173b7bb$0$9504$9b4e6d93@newsspool1.arcor-online.net...

Hi Jamal,

I try to call a AutoHotKey Script (tmscript.exe), which gives a "Hello
World" message out.
This do not work under Windows 8!

Regards
Jürgen

"Jamal"  schrieb im Newsbeitrag news:kkvm7d$fb5$1@speranza.aioe.org...

It works fine for me.

Jamal

"Jürgen Knauf"  wrote in message
news:5172c790$0$9510$9b4e6d93@newsspool1.arcor-online.net...

Hi,

I tried to get the "RUN" command working under Windows 8, but with no
effort!

  cRun := WorkDir()+"DoSomething.exe"
  GetAppObject():Run(cRun)

Any Idea? 

[toc] | [prev] | [next] | [standalone]


#5113

FromJürgen Knauf <j.knauf@kp-software.de>
Date2013-04-22 16:53 +0200
Message-ID<51754ed5$0$6584$9b4e6d93@newsspool3.arcor-online.net>
In reply to#5109
>>? WinExec(String2Psz(workdir() + "tmscript.exe"), SHOWNORMAL)

I have tried shellexecute() and now it seems to work.

Thank you for your help.

Juergen




"Jamal"  schrieb im Newsbeitrag news:kl3cql$7r0$1@speranza.aioe.org...

What return value you get when you run the following in a terminal app:

? WinExec(String2Psz(workdir() + "tmscript.exe"), SHOWNORMAL)

Jamal

"Jürgen Knauf"  wrote in message
news:5174e1d2$0$6567$9b4e6d93@newsspool3.arcor-online.net...

>>Are you getting any error message?
No message

>> Is the exe a valid 32-bit app?
Yes

You can download and test the script:
http://www.kp-software.de/files/tmscript.exe

cRun := WorkDir()+"tmscript.exe"
GetAppObject():Run(cRun)


CreateProcess() also do not work.

Under Windows 7 there is no problem!

Juergen


"Jamal"  schrieb im Newsbeitrag news:kl12t2$6be$1@speranza.aioe.org...

Hi Jürgen,

Are you getting any error message? Is the exe a valid 32-bit app?

BTW, the  GetAppObject():Run() method internally calls:

WinExec(String2Psz(sCommand), SW_SHOWNORMAL)

According to the Win32 documentation:

The WinExec function runs the specified application.

This function is provided for compatibility with earlier versions of
Windows. For Win32-based applications, use the CreateProcess function.

UINT WinExec(

LPCSTR lpCmdLine,
// address of command line

UINT uCmdShow
// window style for new application

);


Parameters

lpCmdLine

Points to a null-terminated character string that contains the command line
(filename plus optional parameters) for the application to be executed. If
the name of the executable file in the lpCmdLine parameter does not contain
a directory path, Windows searches for the executable file in this sequence:

1.The directory from which the application loaded.

2.The current directory.

3.The Windows system directory. The GetSystemDirectory function retrieves
the path of this directory.

4.The Windows directory. The GetWindowsDirectory function retrieves the path
of this directory.

5.The directories listed in the PATH environment variable.

uCmdShow

Specifies how a Windows-based application window is to be shown and is used
to supply the wShowWindow member of the STARTUPINFO parameter to the
CreateProcess function. For a list of the acceptable values, see the
description of the nCmdShow parameter of the ShowWindow function. For a
non-Windows - based application, the PIF file, if any, for the application
determines the window state.

Return Values

If the function succeeds, the return value is greater than 31.

If the function fails, the return value is one of the following error
values:

Value
Meaning

0
The system is out of memory or resources.

ERROR_BAD_FORMAT
The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).

ERROR_FILE_NOT_FOUND
The specified file was not found.

ERROR_PATH_NOT_FOUND
The specified path was not found.

Remarks

Win32-based applications should use the CreateProcess function rather than
this function. The WinExec function exists in Win32 to provide compatibility
with earlier versions of Windows. For more information about how the WinExec
function is implemented, see the Remarks section of the LoadModule function.

In Win32, the WinExec function returns when the started process calls the
GetMessage function or a time-out limit is reached. To avoid waiting for the
time out delay, call the GetMessage function as soon as possible in any
process started by a call to WinExec.

See Also

CreateProcess, GetMessage, GetSystemDirectory, GetWindowsDirectory,
LoadModule, ShowWindow

Jamal

"Jürgen Knauf"  wrote in message
news:5173b7bb$0$9504$9b4e6d93@newsspool1.arcor-online.net...

Hi Jamal,

I try to call a AutoHotKey Script (tmscript.exe), which gives a "Hello
World" message out.
This do not work under Windows 8!

Regards
Jürgen

"Jamal"  schrieb im Newsbeitrag news:kkvm7d$fb5$1@speranza.aioe.org...

It works fine for me.

Jamal

"Jürgen Knauf"  wrote in message
news:5172c790$0$9510$9b4e6d93@newsspool1.arcor-online.net...

Hi,

I tried to get the "RUN" command working under Windows 8, but with no
effort!

  cRun := WorkDir()+"DoSomething.exe"
  GetAppObject():Run(cRun)

Any Idea? 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web