Jump to content


Photo
- - - - -

Workstation directory when in ProIV


21 replies to this topic

#1 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 14 July 2004 - 02:29 PM

Dear Gang,

Does anyone know an easy way to change the active directory of the GUI workstation during ProIV start up?

I know that within Windows, the Start In directory can be specified, but this has be done on each workstation. A rather daunting task for some of our clients with hundreds of workstations.

Long boring background

The business need is that we are using CLIENT.SEND and CLIENT.RECEIVE so that certain files can be worked on locally. Although CLIENT.SEND does allow you to specify %TEMP%, CLIENT.EXECUTE does not. This would be the ideal solution.

Since there is no way to guarantee a specific directory on all versions of Windows, the next option is to send the file to the active directory and run an application against it. However, the active directory, depending on however the shortcut to the PIV is setup can be a network location, the desktop, or anywhere.

Although we can instruct our clients to then change the "Start In" directory for all the PIV's, it is not a good solution. Ideally, we would use the %TEMP% directory for all such transfers, but cannot do it unless there is a way to make ProIV aware of a workstation environment variable or to change the active directory of ProIV at startup.

Thanks in advance,

Joseph

#2 Bill Loven

Bill Loven

    Expert

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male
  • Location:Coppell, United States

Posted 14 July 2004 - 02:47 PM

:) Joseph, I had the same issue with a Bank Reconcile system.

To retrieve a paid check file, I used the ActiveX File Open Box and the user indicated where to get the file. To place issued checks, I wrote a screen where the user indicated where they wanted the file, Ie: C:\Bank\Export.

Works pretty good.

HTH

Bill

#3 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 14 July 2004 - 04:41 PM

Bill,

Thanks for the suggestion. Unfortunately, the processing question happens so frequently that a prompt to the end user just wouldn't work.

Joseph

#4 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 14 July 2004 - 05:00 PM

Is it not feasible to create a temp directory on the fly,
say c:/temp/myappname/temp for example, use it and then
delete it?
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#5 Bill Loven

Bill Loven

    Expert

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male
  • Location:Coppell, United States

Posted 14 July 2004 - 05:28 PM

:D Joseph, I forgot to add that we use a ProIV supplied utility of GETCOM, GETCOMN, PUTCOM and PUTCOMN. This is an endless supply of meaningful Comm Variables by user. When a user loggs into our app, I reload the users last used comm variables to the TTY they are connected to. When the User loggs out, I write their comm variables to a file by user.

You can find these in the Time Sheet Demo that comes with ProIV. I converted them from pro-isam to Oracle.

Bill.

#6 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 14 July 2004 - 05:35 PM

Chris,

I was trying to avoid creating directories. Some of our clients lock down the C: drive pretty tightly. As such, I can't guarantee that I would be able to create a C:\temp directory.

The only guaranteed access directory would be %TEMP%, but that's different on each version of Windows. If, however, I could figure out what directory that is, then I think that I would be OK.

Of course, having the %TEMP% environment variable work in CLIENT.EXECUTE would be the other solution, but I don't expect that change to come down the pike soon.

Joseph

#7 Rob Donovan

Rob Donovan

    rob@proivrc.com

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

Posted 14 July 2004 - 09:10 PM

Hi,

The %TEMP% tag is just referencing the $TEMP variable from dos.

You can get the value of this in ProIV by using the &$@~TEMP in PrioIV logic. Then you can build up a string that you then use in CLIENT.EXECUTE...

Would that work for you??

Rob D.

#8 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 14 July 2004 - 09:22 PM

Rob,

Unfortunately, no.

&$@~TEMP would work if the environment variable existed on the server. However, I care about %TEMP% on the workstation.

If there were a way to find the environment variable, that would solve my problem.

Joseph

#9 Rob Donovan

Rob Donovan

    rob@proivrc.com

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

Posted 14 July 2004 - 10:12 PM

Opp, sorry.. didnt read it properly...

How about creating an ActiveX control in VB (or what ever), then you can do what you like and pass the vaule back through a property to ProIV.

You could have a 'dummy' screen (or your main menu) as the logon function, that has the ActiveX control on and then store the result back in a file / table for use later on.

Rob D.

#10 Papa Lazarou

Papa Lazarou

    Member

  • Members
  • PipPip
  • 38 posts
  • Gender:Male
  • Location:Royston Vasey
  • Interests:Collecting wives, pegs.

Posted 15 July 2004 - 12:57 AM

You can just use CLIENT.GETPATH to get the TEMP path from the client! :D

#RET = CLIENT.GETPATH(“%TEMP%”, $PATH)

The properties manual lists the following logical paths
GRAPHICS, GRAPHICS_CACHE, GRAPHICS_URL, TEMP, WINDOWS & HOME.
CLIENT also appears to work.

Problem solved? :-"
You're my wife now, Dave!

#11 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 15 July 2004 - 01:29 PM

Papa,

You're my hero :D (for today).

Thanks,

Joseph

#12 Guest_P4GUEST_*

Guest_P4GUEST_*
  • Guests

Posted 24 July 2004 - 12:51 AM

Is it possible to write few lines of text into a batch from PROIV and save it on to the local drive?

Thanks,
P4 Guest

#13 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 24 July 2004 - 01:52 AM

p4 Guest,

Sure.

Write the data to an external file on the server. Then simply use client.send to move the file from the server to the workstation.

Regards,

Joseph

#14 Guest_p4guest_*

Guest_p4guest_*
  • Guests

Posted 24 July 2004 - 09:02 PM

Thanks Joseph.

My basic problem is I am trying to launch an dos based application from PROiv(using SYSTEM) command. I want to close the dos window automatically once the application is closed. Right now I have to close the DOS window by clicking on 'x".

If I execute the batch file on its own, it works fine(closes the window automatically, if i have @cls statement). But the same does not work when called from PROIV. I do not want to run the application in Async mode.

Any suggestions is appreciated.

P4guest.

#15 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 24 July 2004 - 10:18 PM

P4 Guest,

Make sure that you don't have an output from the batch program. ProIV likes to throw open the telnet window to show output.

First line of the batch file should be

@Echo off

hth,

Joseph



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users