dmcnally
21st November 2011, 18:02
We’re running Baan IVc4 agso.
We have a custom session script that generates an xml file and ftp’s it to the client’s pc and opens Excel.

On a Windows 7 client When running the bw client version b40c 101 the file is placed in the folder

C:\Users\%userid%\AppData\Local\Infor\BW\Baan IV\config
And Excel Opens the file without issue.

When using the Infor Worktop client version 2.5.11 I am getting the following error message As Excel opens:

“tmp23720.xml could not be found. Check the speling of the file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files, make sure that the file has not been renamed, moved, or deleted.”

I am guessing that Baan is trying to write to the folder
C:\Users\%userid%:confused:\AppData\Local\Infor\Worktop
Or a subfolder below it.

The session script simply sends a file name without a path to be placed in the current working directory on the client pc, which works fine on our Windows XP and Windows 7 clients running bw client b40c 101.

The code that sends the file os below

code:
write.to.path="/u08/baan4/bse/tmp/tmpr"&str$(random())&str$(random())
client.file.path="tmp237"&str$(rnd.i(40))&".xml" |** will write file to current Baan user directory
disp="Moving File To Client PC"
display("disp")
retlong=server2client(write.to.path, strip$(client.file.path), 1)
if not retlong then
retlong=app_start("excel.exe """&strip$(client.file.path)&"""", "", "", "", "")
if not retlong then
message("ERROR STARTING EXCELL, File Can Be Found At: ", strip$(client.file.path))
endif
else
message("ERROR MOVING FILE TO PC: "&str$(-retlong))
endif
code:

I have checked the permissions on the local Infor\Worktop folder and they seem to be the same as the corresponding Infor\BW folder.

Has anyone seen this issue? I think it is something to do with permissions on the default directory that Worktop is using but I am not sure.

Any help would be appreciated.

Thanks,

Dave

dmcnally
21st November 2011, 20:58
I have changed the client.file.path to c:\Windows\Temp and now it works fine,
so it must have been something related to the permissions on the current working directory that Worktop utilizes. If anyone has a better idea, please let me know. I really don't like putting hard coded paths in scripts.

Thanks,

Dave

günther
22nd November 2011, 09:15
Hi Dave,

I also had some trouble with Windows 7 and ttstpconv or client2server(). While the Baan/UNIX side is easy to check and debug, the Windows side sometimes becomes obscure. That's why I use the tools from sysinternals (former filemon).

Günther