Jump to content


- - - - -

SYSTEM COMMAND


17 replies to this topic

#1 Guest_marco_*

Guest_marco_*
  • Guests

Posted 10 April 2002 - 12:39 PM

We have a PRO-IV installations on a Windows 2000 server, and we need to run an .exe file on the same server from a client.
The reason is because we need to run a Crystal Report generated exe.
Best regards

#2 Guest_marco_*

Guest_marco_*
  • Guests

Posted 10 April 2002 - 12:41 PM

If we use the SYSTEM command with the name of the file the exe is not executed

#3 Wim Soutendijk

Wim Soutendijk

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 211 posts
  • Gender:Male
  • Location:Netherlands

Posted 10 April 2002 - 12:46 PM

Did you include the full path name in your SYSTEM command?

#4 Guest_marco_*

Guest_marco_*
  • Guests

Posted 10 April 2002 - 01:03 PM

we did. Are you able to run an exe on the Windows 2000 server of pro-iv installation?

#5 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 10 April 2002 - 01:12 PM

Hi,

To run the command on the server...

#X = SYSTEM('dir >dir.txt')

To run the command on the client PC...

#X = SYSTEM('GUI WINDOWS dir >dir.txt')

Rob D

#6 Wim Soutendijk

Wim Soutendijk

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 211 posts
  • Gender:Male
  • Location:Netherlands

Posted 10 April 2002 - 01:17 PM

Yes I am able to execute at lease a .bat script located on the win2000 server

#7 DARREN

DARREN

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 396 posts
  • Gender:Male
  • Location:Florida,USA

Posted 10 April 2002 - 04:51 PM

there is a new method available to developers on version 5 for running client side apps called client.execute()

This replaces the GUI WINDOWS system command and can also reference logical paths e.g. CLIENT.EXECUTE(%MYPATH%MYPROGRAM.EXE)where MYPATH is an entry in the proivconst.ini

This is a much cleaner way of invoking programs on the client side.
Things should be made as simple as possible, but not simpler

#8 Glenn Meyers

Glenn Meyers

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 221 posts
  • Gender:Male
  • Location:St. Louis, MO, United States
  • Interests:I also raise African Gray Parrots and build hot rod automobiles.

Posted 08 July 2003 - 07:21 PM

An oldie but a goodie.......
I have a similar problem as above.

I cannot get :
#X = SYSTEM('GUI WINDOWS dir >dir.txt')
to run and create a file on the drive. It "runs" and returns and the function carries on, but no joy on the data file :) .

I get a stop button with the message "Unable to execute local command" message.

The command was entered as above in Logic In of a screen function. My host systems is an HP Unix platform running 4.6. The client is a windows 2000 based PC. Client is 5.0EA Build 283 Dated July 3, 2001.
ProIV has no newer clients for 4.6 that I am aware of.

I have made a function work to dump to an Excel Spreadsheet using:
#RC = SYSTEM("GUI WINDOWS ASYNC EXCEL")
but I still get that same stop button/message before the write to Excel begins and it is horribly slow.

Ultimately what I am trying to do is have the SYSTEM command pop up an IExplorer session with a diagram of a manufacturing configuration. This function sits on the manufacturing line and the user will scan in a serialized part. The assembly instructions (a jpeg) will then pop up on the screen for the assembler.

Ideas anyone???

Thanks in advance!

Glenn

Edited by Glenn Meyers, 08 July 2003 - 07:24 PM.


#9 Andy Jones

Andy Jones

    Member

  • Members
  • PipPip
  • 41 posts
  • Gender:Male

Posted 08 July 2003 - 11:02 PM

I cannot get :
#X = SYSTEM('GUI WINDOWS dir >dir.txt')
to run and create a file on the drive. It "runs" and returns and the function carries on, but no joy on the data file :) .

I get a stop button with the message "Unable to execute local command" message.

The reason your DIR command doesn't work is because you've used the WINDOWS keyword. It's only of use when you are intending to run an executable file (program or batch file).
In your example DIR is a shell command.

To execute shell commands such as DIR, just drop the 'WINDOWS' part.
i.e. #X = SYSTEM('GUI dir >dir.txt')

That should work!
Nothing is foolproof to a sufficiently talented fool...

Don't learn from your own mistakes - it's safer and more entertaining to learn from the mistakes of others!

Just because you can, it doesn't mean you should!

#10 Glenn Meyers

Glenn Meyers

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 221 posts
  • Gender:Male
  • Location:St. Louis, MO, United States
  • Interests:I also raise African Gray Parrots and build hot rod automobiles.

Posted 09 July 2003 - 01:42 PM

Thanks for the response Andy.
Well, It worked and it didn't.
It worked in that ProIV didn't choke on it and send up the button/message.
No joy on the creation of a file on the C drive, however.

While I'm still struggling with this....any other ideas????

Thanks!

Glenn

#11 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 09 July 2003 - 01:52 PM

Hi,

Could it be that its creating it in the ProIV startup dir, or somewhere else?

Does it work if you put on a path?

#X = SYSTEM('GUI dir > c:\temp\dir.txt')

Rob D.

#12 Glenn Meyers

Glenn Meyers

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 221 posts
  • Gender:Male
  • Location:St. Louis, MO, United States
  • Interests:I also raise African Gray Parrots and build hot rod automobiles.

Posted 09 July 2003 - 02:26 PM

Das ist GOODT!

With a path it worked correctly.

Now, How do I get it to call Windows Explorer?

Thanks Guys!

Glenn

#13 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 09 July 2003 - 02:33 PM

OK... try this....


#X = SYSTEM("GUI WINDOWS EXPLORER")

But ProIV will not wait for the windwos command to finish.. It continues, once the windows prog has started.

Rob D.

#14 Glenn Meyers

Glenn Meyers

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 221 posts
  • Gender:Male
  • Location:St. Louis, MO, United States
  • Interests:I also raise African Gray Parrots and build hot rod automobiles.

Posted 09 July 2003 - 02:38 PM

Editing the above failed so here goes again:

I have tried:

THIS worked correctly:
#RC = SYSTEM(“GUI WINDOWS NOTEPAD.EXE”)

This did NOT work:
$CMD = '/C "C:\PROGRAM FILES\INTERNET EXPLORER\IEXPLORE.EXE" ' +
'HTTP://WWW.GOOGLE.COM'
#X = SYSTEM('GUI WINDOWS ASYNC' + $CMD)
I tried the above with all combinations of WINDOWS, ASYNC, and the /C command for older clients.

This too did not work with all combinations of WINDOWS and ASYNC:
$CMD = ' C:\Program Files\Internet Explorer\IExplore.EXE'
#RC = SYSTEM("GUI WINDOWS ASYNC" + $CMD)

Still stumped....or am I expecting too much???
Glenn

#15 Glenn Meyers

Glenn Meyers

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 221 posts
  • Gender:Male
  • Location:St. Louis, MO, United States
  • Interests:I also raise African Gray Parrots and build hot rod automobiles.

Posted 09 July 2003 - 02:41 PM

Rob,

#X = SYSTEM("GUI WINDOWS EXPLORER")

Did work.

Glenn



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users