Anshu_Jain
14th May 2008, 19:42
Hi,
The site I work at is migrating from Unix to Windows:rolleyes:.
I have some Shell(...,..) type statements in program scripts.
On windows it give an Error
"No More Pty's available"
Would anyone be able to comment if the "shell" function can still be in a Windows environment.
many thanks
Anshu
NPRao
14th May 2008, 20:24
Refer to the programmer's manual for more info: shell() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_starting_and_stopping_programs_shell)
Notes
This function is supported for backward compatibility only. In new applications, use run.prog() and run.baan.prog() instead.
The function is available only for programs running under UNIX, and not for programs running under Windows NT.
Anshu_Jain
15th May 2008, 13:42
Hi NP,
Many thanks for the clue on run.prog()
It works ok on BaanIVc4 and windows2003 server
thanks
anshu
I found another useful comment to get this working :
Fred,
You need to keep the '/c' in second argument as shown below...
id=run.prog("cmd.exe", "/c copy c:\file1 c:\file2", RP_WAIT)
NPRao
15th May 2008, 19:35
id=run.prog("cmd.exe", "/c copy c:\file1 c:\file2", RP_WAIT)
Anshu,
If you use the Baan std tools function - file.cp() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_directory_file_operations_file_cp) you are OS independent.
Anshu_Jain
20th May 2008, 18:18
Quite true Guru.
I am now using file.** type commands for file management.
All the same
run.prog was very useful to embed "std_gen" in a shell script.
cheers
Anshu