Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restricted user and 3rd party api

Status
Not open for further replies.

krushpof

Programmer
Jul 4, 2003
72
CA

Good Day,

I have been developping a software using a 3rd party api and sdk to access an historian server and write to it's table.

Now when i execute this program using a poweruser,i have no problem.As soon as i try with a restricted user,the api part doesn't seem to find files it needs to initiate it's connection.But the SDK-COM works fine.

I have been discussing this with the compagnie support all week and we can't find a solution.

So here is my question.I have noticed that the api ini file was under the window folder of the users doc&set, but there is also one in the windows folder of the machine.Which one does it access?I would guess the doc&set one.

This ini file gives the path to the software home.Now the log file gives us an error message saying the api cannot find some other ini file contained in this home directorie.

I added a file read and write in my programs,that reads the ini file in the winpath and writes to the home folder,and i have no problems doing so.I still don t know if the winpath is in doc&set or c:\windows.

I have given restricted user read&write on the home folder.But it is still not able to find the files.

What could be the problems.When it reads from ini files that the home directorie is c:\program files\pipc,does it search this adress from the c root or does it search it from a possible users root?

I hope i have given enough info to help you help me get a glimpse at what might be going on.

I am desperate!!

Thank you


 
Maybe i should mention we are using metaframe xp
 
I am not a programmer but a darn good troubleshooter. My suggestion is to remove one of those ini's and see what happens. Logging on as the user that can run the program, see when it fails. Then you will know which one it is.

Jon

There is much pleasure to be gained from useless knowledge. (Bertrand Russell)
 
Citrix copies the file from C:\Winnt and places it in C:\Doc & set\...\Windows

When your program calls for the file using the Windows API to get the .ini file from the Windows System drive, Citrix replaces what you ask for and reads it from the users local area.

If you have one .ini file for your application and it is used by everyone. Store it in your application path and when you read it, do a

app.path & "\app.ini"

to read the ini file in.

Otherwise, you can use :-

Environ("USERPROFILE") & \Windows\App.Ini"

to read file in the users area, if it doesn't exist, read

Environ("WINDIR") & "\App.Ini"

And then save it in

Environ("USERPROFILE") & \Windows\App.Ini"

Does that help you any?

Cheers,
Carl.
 
Hello Carl,

Thank you for your input.It does help me understand why there is a window folder in doc&set.

The real problem now, comes from the fact that the API is not something I control.So when i make a call to the API, it looks for it s ini file in the windir to know where it's gonna find another ini that's specified buffering info or node name.

So it does look for the ini in the windir,to which citrix tells the program it is actually in the doc&set.I have notice another thing...it calls the folder windows but the actual window folder is winnt.Could that make any difference.....i think i ll try that now!

Thank you for your help,all who have answered.Even the api maker is puzzeled.

If anyone as more possible path..I'm all eyes.

 
Try the following :-

Delete the ini file in your doc&set
run a command prompt

?:\???>Change User /Install
?:\???>Notepad ?:\Winnt\app.ini

Add some blank lines at the end or change it so your app
crashes!!!!
Save the file
Exit Notepad

?:\???>Change User /Execute

Log Out
Log in

Check your doc&set\username\windows does the app.ini file exist?

Run the app and what happens?

This "should" tell you which file it is using!

OR

Make sure you have the file in your Doc&Set\username\Windows
and rename the one in ?:\Winnt

What happens with your application?

Again, this will point out which ini file your system is using!

Alternatively, get the developer to use the registry and write everything to HKEY_CURRENT_USER then you won't get this problem!

Cheers,
Carl.
 
When running the app first time there should be no ini in the users windows directory. This is specified in user mangler. Terminal Services Home directory.

When the app is first run the app has a panic cos it can't find the ini, but citrix interupts and says aha but I know where you can get a copy of it. It then copies the one in c:\WINNT to the users home directory.

Should you wish to refresh the ini file at any time or the users corrupt (Oh but of course they don't do that do they) it. You should delete the one in the user5s home directory and let Citrix create a new one from the C:\WINNT one.

Citrix also creates a backup of older ini files and gives them a .CTX extention instead of .ini so you can follow what is going on. You should try to download NTFILMON and NTREGMON to help troubleshoot your problems. They will tell you how and what your app is doing. Please also see Citrix FAQ and best practices for application developers. Yes they do have one. And it doesn't mention "Have you installed the latest client and do you wan't fries with that ?"

Scott.
[bigcheeks]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top