Nibhatish
asked on
Cannot create program workspace error when FoxPro 2.6 application executed from VC++ MFC
Hi,
We are trying to run Foxpro exe from VC++ application using CreateProcess. FoxPro application gives error - "Cannot create program workspace". If we run application using CreateProcessWithLogonW with logged in user's credentials then it runs fine. But in production, we do not want to have any user/passwords entered or stored in application. Any alternate solution for this ?
We are trying to run Foxpro exe from VC++ application using CreateProcess. FoxPro application gives error - "Cannot create program workspace". If we run application using CreateProcessWithLogonW with logged in user's credentials then it runs fine. But in production, we do not want to have any user/passwords entered or stored in application. Any alternate solution for this ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try at least this then
TMPFILES = D:\temp
then add
SORTWORK = D:\temp
the rest are for development version.
I am not sure about OVERLAY. I found it on the net and no documentation.
TMPFILES = D:\temp
then add
SORTWORK = D:\temp
the rest are for development version.
I am not sure about OVERLAY. I found it on the net and no documentation.
ASKER
I am again getting same error now i.e. "Cannot create program workspace". I have also added one line at the start of file
RESOURCE=OFF. So my config.fp is looks as below
RESOURCE=OFF
TMPFILES = D:\temp\Bill
SORTWORK = D:\temp\Bill
RESOURCE=OFF. So my config.fp is looks as below
RESOURCE=OFF
TMPFILES = D:\temp\Bill
SORTWORK = D:\temp\Bill
Is your application an exe, app or prg?
ASKER
It is .exe file. We do not have source code for the application.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
eg ShellExecute( 0, "Open", "notepad.exe" , "", "", 1 ) opens notepad.
ASKER
@Olaf: Initially I tried it using ShellExecute but I was not able to run .exe using ShellExecute. I am able to open notepad , batch files etc. with ShellExecute but not the FoxPro exe. I am not sure of the reason.
I believe you are putting the config.fp with the exe file, right?
What about the access privileges of the user currently logged in when you launch the software? Under what operating system? On XP it should be no problem.
What about the access privileges of the user currently logged in when you launch the software? Under what operating system? On XP it should be no problem.
ASKER
@CaptainCyril: Config file and .exe file are in same folder. I am using following command to launch application
D:\\TEMP\\BILL\\<Applicati onName> -cD:\\temp\\bill\\config.f p
It is windows xp machine. I am currently logged in with the user having admin rights. If I run the application from command line, or using CreateProcessWithLogonW passing credentials of logged in users, it runs fine. I am not sure, when we debug application in VC++, which user is used to run createprocess. I tried building my VC++ application and then running it using "Run as" option. But still I am getting same error.
D:\\TEMP\\BILL\\<Applicati
It is windows xp machine. I am currently logged in with the user having admin rights. If I run the application from command line, or using CreateProcessWithLogonW passing credentials of logged in users, it runs fine. I am not sure, when we debug application in VC++, which user is used to run createprocess. I tried building my VC++ application and then running it using "Run as" option. But still I am getting same error.
I am not sure which user is logged in when you run in Debug mode. That's the problem causing the application not to have access to the temp folder.
No external CONFIG will help if there is one included in the EXE.
Also, are you talking about FoxPro for DOS application?
Also, are you talking about FoxPro for DOS application?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you're probably missing runtime files on your machine.
ASKER
The solutions provided here could not solved my issue but these might solve for someone else. Solution is rated as good and not excellent because we were not able to get the solution on my machine though we got it to work in production.
ASKER