Problems running on a net work

Problems running on a net work

Postby hag » Tue Jan 18, 2011 8:01 pm

I have a user who installed on a network server.
OS is windows xp.
Administrator has no problem using the program but one user without adm. rights gets error messages that reflect the inability to open data bases.
The administrator can't figure out what to do to let a typical user open the program. He can't find anything that allow the user on opening the program as administrator rights as in windows 7.
Any ideas will be welcomed.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Problems running on a net work

Postby James Bott » Tue Jan 18, 2011 9:59 pm

The data and index files cannot be in the Program Files directory like they can under XP.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Problems running on a net work

Postby hag » Tue Jan 18, 2011 10:14 pm

It is xp. I have programs on networks and all files in same directory. Can you send me some info on this. Doesn't make sense.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Problems running on a net work

Postby James Bott » Tue Jan 18, 2011 10:29 pm

Are you using:

SET DEFAULT TO (cDbfDir)

Without that, sometimes the app is looking in the wrong directory.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Problems running on a net work

Postby James Bott » Tue Jan 18, 2011 10:49 pm

This info on "limited" accounts may also help:

http://vlaurie.com/computers2/Articles/xprunas.htm

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Problems running on a net work

Postby hag » Tue Jan 18, 2011 11:27 pm

Thanks for the link. I sent it to the administator.

The program he is using is Not a multi user program so they all use it one at a time.
What is SET DEFAULT TO (cDbfDir)
cDbfDir ????
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Problems running on a net work

Postby James Bott » Tue Jan 18, 2011 11:44 pm

Harvey,

The program he is using is Not a multi user program so they all use it one at a time.


I assume you have thought of this, but maybe one user is trying to run the program when it is already in use. The EXE would load but the DBFs would not open if they are already open in EXCLUSIVE use. This would error out.

What is SET DEFAULT TO (cDbfDir)
cDbfDir ????


This sets the directory where the data files are located. If they are in the same directory as the EXE then you can use:

set default to (cFilePath( GetModuleFileName( GetInstance() ) ))

This is better since the directory is not hard-coded so if the program is installed in another directory that the one intended, it will still work.

By default the EXE's directory is the one that is supposed to be used when the app looks for the dbf's (when no SET DEFAULT is used). However, I have had this fail a few times and never when I use SET DEFAULT TO.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Problems running on a net work

Postby StefanHaupt » Wed Jan 19, 2011 5:18 pm

Harvey,

a normal user is not allowed to write in the programs folder, even not under XP. If you try to open a dbf in read/write mode, this will fail and you will get an error. If you don´t have admin rights, you have to separate the program from the data.

I suggest to move the data to the ProgramData folder instead (standard folder for data since XP) or better a subfolder in the ProgramData folder and set the path to your databases in your application with SET DEFAULT TO (cDbfDir) to this folder as James already said. This works fine for me since XP.

You can also install your software with all dbf in another folder, e.g. c:\myfolder and set read/write rights to this folder for the group "everyone". But this is no standard installation for XP, Vista, Win7, so it´s not recommended.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha and 39 guests