Link to home
Start Free TrialLog in
Avatar of crcsupport
crcsupportFlag for United States of America

asked on

exe file can't open ini file.

I have a custom application which can not be modified.
there are two exe files and one ini file.
aaa.exe : main software execution file. Coded in C#.
bbb.exe: a sub execution file which is called by aaa.exe. This file already read configuration information from ccc.ini
ccc.ini: located on network drive, is called by bbb.exe

Now, when I run aaa.exe in Windows 7 64bit OS, it prompts;
"do you want to allow the following program from an unknown publisher to make changes to this computer?
program: bbb.exe
publisher: unknown"

Then, I select Yes, get the following error message;
"INI file 'F:\folder1\ccc.ini' not found.
Please contact your computer department for support.
V1.3 Copyright 2000-2002 Tony Toews www.granite.ab.ca"

I thought it was some access right issue, so I tried to give full access to Everyone on F:\folder1, but still the same error message. When I browse to the folder, I was able to open the file from any user logged on.

How can I resolve this?
ASKER CERTIFIED SOLUTION
Avatar of it_saige
it_saige
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of crcsupport

ASKER

Temody, do you mean that ini file always has to be reside on the same folder as exe file? I am not familiar with programming, but it seems a bit restrictive. The program refers to the correct network folder and file,  the file exists on the folder. So I guess that's what it is, ini and exe file has to be on the same folder.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, I can open the file from the trouble computer.
I also gave full access NTFS rights just in case, still same error messages.
Below is the INI file bbb.exe refers to, but as the warning message says, it can't find the file, so I think it's irrelevant

[Settings]

MainApp=C:\Program Files\xxx\aaa.exe

Server=F:\Folder1

ShortCut=F:\Folder1 aaa.lnk

SupportMsg=Please contact MIS department for support

LockOut=No
LockOutMsg=Sorry, not allowed into the system right now.

CreateShortCutOnDesktop=No

WindowStyle=NormalFocus
I think I got the solution. I just created a shortcut to the exe file which is on the network drive where ini file is, now the program works.

Thanks.