Paradox "Execute" cmd and NT permissions

I have tried to setup a form which will run a .BAT file when the user clicks on a button, but NT (?) is not allowing the user to access the files involved in the Execute.  I have given the user NT permissions for the
parent directory, the files involved and the user can actually click on the BAT file in windows NT Explorer and have it execute cleanly.  BUT - the same user cannot use the Pdox form to do the same thing.  The error is "Access denied" when it tries to reference a TXT file that is mentioned on one line in the batch file.  I, on the other hand, can do this all day, but that's perhaps because I am an Administrator for the server where all of this is stored.  Obviously I cannot make this user an Administrator.

Does anyone know what Username that Pdox might be using (emulating?) when it does the Execute command?




jimmygAsked:
Who is Participating?
 
JgouldConnect With a Mentor Commented:
Question has been closed as per recommendation

JGould-EE Moderator
0
 
kretzschmarCommented:
you must ensure, that user has full-access to the work-dir, private-dir and net-dir

in a batch (didn't know what you call there) you could use parameters for this like

pdox32.exe modulname -w workdirectorypath -p privatedirectorypath

be more specific

meikl ;-)
0
 
MurpheyApplication ConsultantCommented:
Be sure you use the standard dos path names:

C:\porgra~1\access~1\wordpad.exe

 instead of

C:\Program Files\Accessories\wordpad.exe

I don't know for sure if this is a problem for Paradox, but CA400 and VB have problems with this notation.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
jimmygAuthor Commented:
In response to Kretchmar - the user already has access to the directories since she is running my application already.   It's just when I try to execute this BAT file and the script file it calls that I run into trouble.

As for Murphey2's answer - I thought of that but since it works for me, shouldn't it work with the same names for my user?
0
 
kretzschmarCommented:
well, then i have misread the q :-(

but i guess it is not a problem of paradox.

maybe the directory is not changed correctly,

did you include in your bat lines like

cd \somedir

so that before the bat-content really runs the dir where it has to run is correctly set?

meikl ;-)
0
 
jimmygAuthor Commented:
As I said before - it works fine for me, just not for another user who isn't an administrator
0
 
melchioeCommented:
I'd actually think more about murphey2's suggestion about 8-char pathnames.  Paradox gets pretty picky about that.  I am unclear on whether when you say you "can do this all day" if you are doing this from the program or doing it from the command prompt.  Can you do this on one machine logged in as yourself and then cannot do it on the same machine logged in as the user?

Another suggestion is that Paradox is often very picky about where it invokes things - is the batch file in the current directory, or is it somewhere else?  If you need to change the working directory, be careful since it wants to close all windows.  I can dig up my source code for keeping the windows open  on a directory change if you need it.

Another stab in the dark is that Paradox often uses a temp directory for some temp files - perhaps your user doesn't have access to the temp directory?

My final suggestion is to use getUserName() to find the network user name (just pop it up in a message box).  Please note that this returns the user name entered into the Windows login dialog, which may not necessarily be the same as the user's network user name.
Perhaps there's a conflict between those two usernames.


0
 
jimmygAuthor Commented:
all of the latest suggestions don't pertain to my problem.  When I say I can do it all day, I mean I, as an Adimistrator can run the program with success, yet when an ordinary user logs onto the same machine, she cannot.  She can run the application just fine, right up until she tries to execute this batch file.

I do have quite a bit of success with Pdox and network appls.  Currently I am supporting about 30 different appls. in a host of directories without problems.  This is the first time I tried to Execute something though and it is making me a little frustrated.
0
 
melchioeCommented:
Would it be possible to see the code snippet where you invoke the batch, and the batch file itself?  I know it already works for you and not for your user, but perhaps seeing the code might spark something in one of us.

Not to beat a dead horse, but I know that I have gotten tripped up (more times than I care to admit) in not giving read/write or full access when the user might need it.  It sure sounds like a permissions issue, and when i see stuff like this, I get out my fine toothed comb and really check all permissions, whether I "know" they are right or not.  

I've seen unpredictable results with external apps if my users are running Paradox Runtime and I'm running full paradox.  Since you say you're running them on the same machine, I doubt this is the issue, but I thought I'd mention it.

Otherwise, I'm stumped.  I've written/supported over 20 Paradox apps that executed outside apps (both batch and exe), as well as many more totally self contained paradox apps, and what you are doing should work just fine.
0
 
melchioeCommented:
OK, another thing popped into my head, but since I'm not an NT person, I don't know if this is possible.  I've seen batch files bomb when invoked from Windows if there isn't enough environment space.  Does the user get a different batch file environment than the administrator?  Perhaps running the batch encased in its own command shell might help.  (again, I don't know NT, so I don't know if this is an issue.)
0
 
jimmygAuthor Commented:
Melchioe got me thinking and with a fine toothed comb I realized that I was assuming the wrong thing.

My BAT file was doing the following:

ftp -s:E:\xxx\xxx\bidlist.txt >bidlist.log

When it ran I got an error "Access denied" following the line.  I finally put the .TXT file and BAT file on the user's C drive and tried it again, with the same results.  Couldn't understand why since when the user just clicked on the bat file in Windows Explorer, it worked fine.  Finally it dawned on me - the Access Denied didn't pertain to the .TXT file, but rather the creation of he LOG file that I was sending the output messages to. By adding a path to the user's C drive for the Log file, I solved the problem.

Thanks for all the responses people.
0
 
melchioeCommented:
I'm glad you got it working.  I know I kick myself when I finally realize that thype of thing.  Congrats!
0
 
kretzschmarCommented:
? a path change was also missed
0
 
melchioeCommented:
perhaps close out question?
0
 
nico5038Commented:

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.