Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Clipper > Re: Environment...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 24 of 31 Topic 3895 of 3903
Post > Topic >>

Re: Environment Variables

by "N:dlzc D:aol T:com \(dlzc\)" <dlzc1@[EMAIL PROTECTED] > Apr 30, 2008 at 06:39 PM

Dear Randy H.

"Randy H." <softcare@[EMAIL PROTECTED]
> wrote in message 
news:g04Sj.778$sC6.569@[EMAIL PROTECTED]
> Dear Dan and anyone else who is interested.
> Okay, for my purposes it is actually more than just
> the "TEMP" variable.  It is the TEMP, TMP, and the
> CLIPPER variables.  These all deal somewhat
> with where clipper builds it's "scratch" files.  Some
> of my users have setup a server running my
> program from "Remote Desktops".
> They log in to my program from a single icon on
> the server's desktop.  The "default value" for TEMP,
> TMP, and the CLIPPER swappath and temppath
> variables is "C:\TEMP" on the server. We want to
> be able to change those environment variables on
> the fly "after" the user logs into the program.
> When each user logs in they give their  username
> and password which is "looked-up" in a database.
> When a match is made a "user directory" is
> assigned.  We want to be able to change the
> TEMP, TMP, and CLIPPER environment variables
> to correspond to that user directory.  This is
> not to catch people who don't shut down correctly,
> it is more for security issues.  Logging onto the
> server via remote desktop allows the system
> administrator to assign special security to each
> user and he wants more control over the folders
> that each person has or does not have access
> to.  He does not want every user to have access
> to the C:\TEMP directory.  I'm trying to
> accomodate my customer.

> Does anyone have answers and not just more questions?

int 21h, function 62h returns the address of the PSP of your 
program.
BX points to its segment, ES and DS point to the PSP.

Offset 2Ch in the PSP points to the local copy of the environment 
(presumably still using ES or DS).

Each entry in the environment is an ASCIIZ string.  List 
terminated by an extra chr(0).  Then 0001h.  Then the name of the 
executed program, again in ASCIIZ.  Unused space follows.  I have 
no idea how big the environment will be, without "walking" it.

I have no idea how to code this in C, which will be a whole lot 
more flexible than ASM.

(and I was going to throw those DOS books away...)

David A. Smith




 31 Posts in Topic:
Environment Variables
"Randy H." <  2008-04-28 16:38:08 
Re: Environment Variables
klas.engwall@[EMAIL PROTE  2008-04-29 00:14:45 
Re: Environment Variables
"Randy H." <  2008-04-28 17:50:01 
Re: Environment Variables
klas.engwall@[EMAIL PROTE  2008-04-30 01:35:33 
Re: Environment Variables
"Randy H." <  2008-04-29 23:04:29 
Re: Environment Variables
"Randy H." <  2008-04-28 17:50:25 
Re: Environment Variables
"Randy H." <  2008-04-29 09:28:42 
Re: Environment Variables
"Maurizio la Cecilia  2008-04-29 19:48:42 
Re: Environment Variables
klas.engwall@[EMAIL PROTE  2008-04-30 01:34:30 
Re: Environment Variables
"Stephen Quinn"  2008-04-29 02:11:37 
Re: Environment Variables
"Randy H." <  2008-04-29 09:27:00 
Re: Environment Variables
klas.engwall@[EMAIL PROTE  2008-04-30 01:34:44 
Re: Environment Variables
"N:dlzc D:aol T:com   2008-04-28 19:13:31 
Re: Environment Variables
"Randy H." <  2008-04-28 20:43:34 
Re: Environment Variables
klas.engwall@[EMAIL PROTE  2008-04-30 01:35:17 
Re: Environment Variables
"N:dlzc D:aol T:com   2008-04-29 19:03:11 
Re: Environment Variables
"Randy H." <  2008-04-29 23:22:16 
Re: Environment Variables
Daniel Skousen <dan@[E  2008-04-30 09:00:04 
Re: Environment Variables
"N:dlzc D:aol T:com   2008-04-30 06:12:59 
Re: Environment Variables
Daniel Skousen <dan@[E  2008-04-30 15:28:43 
Re: Environment Variables
"Randy H." <  2008-04-30 12:48:18 
Re: Environment Variables
Daniel Skousen <dan@[E  2008-04-30 17:55:44 
Re: Environment Variables
Daniel Skousen <dan@[E  2008-04-30 18:30:12 
Re: Environment Variables
"N:dlzc D:aol T:com   2008-04-30 18:39:15 
Re: Environment Variables
"Stephen Quinn"  2008-05-01 04:10:45 
Re: Environment Variables
klas.engwall@[EMAIL PROTE  2008-05-01 23:29:39 
Re: Environment Variables
"bill robertson"  2008-04-30 09:03:29 
Re: Environment Variables
"N:dlzc D:aol T:com   2008-04-30 06:11:34 
Re: Environment Variables
R. Totale <slangtruth@  2008-04-30 10:40:58 
Re: Environment Variables
"tom knauf" <  2008-04-30 12:03:44 
Re: Environment Variables
dlzc <dlzc1@[EMAIL PRO  2008-04-30 07:10:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 10:17:38 CDT 2008.