Solved

Paradox "Execute" cmd and NT permissions

Posted on 2001-07-03
15
401 Views
Last Modified: 2013-11-18
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?




0
Comment
Question by:jimmyg
  • 5
  • 4
  • 3
  • +3
15 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6251424
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
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 6252534
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
 

Author Comment

by:jimmyg
ID: 6255305
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
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6255594
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
 

Author Comment

by:jimmyg
ID: 6255618
As I said before - it works fine for me, just not for another user who isn't an administrator
0
 
LVL 2

Expert Comment

by:melchioe
ID: 6260405
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
 

Author Comment

by:jimmyg
ID: 6260418
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 2

Expert Comment

by:melchioe
ID: 6260529
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
 
LVL 2

Expert Comment

by:melchioe
ID: 6260548
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
 

Author Comment

by:jimmyg
ID: 6266285
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
 
LVL 2

Expert Comment

by:melchioe
ID: 6266333
I'm glad you got it working.  I know I kick myself when I finally realize that thype of thing.  Congrats!
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6266443
? a path change was also missed
0
 
LVL 2

Expert Comment

by:melchioe
ID: 6438205
perhaps close out question?
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7257331

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
 

Accepted Solution

by:
Jgould earned 0 total points
ID: 7282270
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now