cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

APTPRFWCF problem

AndyEsslinger
1-Newbie

APTPRFWCF problem




This may have noting to do with Arbortext, but maybe someone else has seen the problem. Or it may be an Arbortext problem since Epic is the program writing the file. My Setup = Windows XP, SP2, Arbortext 5.1F, Doc Architext and Editor with print composer license.



The idea is for each writer to have his own preference file, but to put everyone's preference file in a directory where I can investigate them when a user has problems.



The way I do this is to set the APTPRFWCF environment variable at system level to W:\PRF\%UserName%.wcf.




To make this a type REG_EXPAND_SZ and poke the filename in I use this little reg file:




;######## START REG FILE


Windows Registry Editor Version 5.00




[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment]


"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\


65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00


;######## END REG FILE




Double click on the reg file and then look at the key in regedit and the value of APTPRFWCF=W:\PRF\%UserName%.wcf.




Now the problem:




For some people or on some machines, the filename created actually is "%UserName%.wcf" instead of their username. It works fine on mine and creates a file named "essliaw.wcf ".



Does anyone have a clue?




Thanks,


-Andy




\ / Andy Esslinger F-22 Tech Order Data


_____-/\-_____ (817) 777 3047 LM Aero Box 748


\_\/_/ Fort Worth, TX 76101


5 REPLIES 5

Hey, Andy...

class=110372618-23082006> Off the top of my head, I'd guess that on those
machines, the "UserName" environment variable doesn't exist, at least not at the
time that the APTPRFWCF variable gets set. This may have to do with the
USERNAME variable being a "local" rather than "system" variable and therefore
not getting set until after APTPRFWCF has already been set. If you can
figure out a good way to set APTPRFWCF in each user's HKEY_CURRENT_USER section
of the registry instead of HKEY_LOCAL_MACHINE, the problem might go
away.

Brandon Ibach
Lockheed Martin Space
Systems
Cape Canaveral, FL
321-476-7051







From: Esslinger, Andy W
Sent:
Wednesday, August 23, 2006 2:10 PM
To:
adepters@arbortext.com
Subject: APTPRFWCF problem




This may have noting to do with Arbortext, but maybe
someone else has seen the problem. Or it may be an Arbortext problem since Epic
is the program writing the file. My Setup = Windows XP, SP2, Arbortext 5.1F, Doc
Architext and Editor with print composer license.



The idea is for each writer to have his own
preference file, but to put everyone's preference file in a directory where I
can investigate them when a user has problems.



The way I do this is to set the face="Courier New" size=2>APTPRFWCF environment variable at system level to
W:\PRF\%UserName%.wcf.



To make this a type REG_EXPAND_SZ and poke
the filename in I use this little reg file:



;######## START REG FILE
face="Courier New" size=2>Windows Registry Editor Version 5.00


[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session
Manager\Environment]
"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\


65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00


;######## END REG FILE


Double click on the reg file and then look at the key
in regedit and the value of APTPRFWCF=W:\PRF\%UserName%.wcf.



Now the problem:


For some people or on some machines, the filename
created actually is "%UserName%.wcf" instead of their username. It works fine on
mine and creates a file named "essliaw.wcf ".



Does anyone have a clue?


Thanks,
-Andy


\
/ Andy Esslinger F-22 Tech
Order Data

_____-/\-_____ (817)
777 3047 LM Aero Box 748



\_\/_/
Fort Worth, TX 76101


>> To unsubscribe from the list, send an
email to listmanager@maillist.arbortext.com with the following in the body:
unsubscribe adepters - For additional information on the adepters list (how to
subscribe or unsubscribe etc), send an email to:
listmanager@maillist.arbortext.com with the following in the body: info Adepters
- You may also go to forums.arbortext.com, enter the Adepters folder and change
your subscription options and preferences.>>

This is not exactly what you're looking for (one directory with files based on user name) but we create user-specific files in a subdirectory under their folder in: c:\Documents and Settings\<userlogin>\

By querying:
System.getProperty("user.home") in Java.

Since all of our users login to the domain, this variable has worked well in getting their domain name. I have noticed that sometimes the variable returns "
user.domain" and sometimes simply "user" but splitting on the . may work.

I'm not certain how globablly-reliable this is, but it has worked at least locally for all of our users so far.

keith


On 8/23/06, Esslinger, Andy W <-> wrote:





This may have noting to do with Arbortext, but maybe someone else has seen the problem. Or it may be an Arbortext problem since Epic is the program writing the file. My Setup = Windows XP, SP2, Arbortext
5.1F, Doc Architext and Editor with print composer license.




The idea is for each writer to have his own preference file, but to put everyone's preference file in a directory where I can investigate them when a user has problems.



The way I do this is to set the APTPRFWCF environment variable at system level to W:\PRF\%UserName%.wcf.




To make this a type REG_EXPAND_SZ and poke the filename in I use this little reg file:




;######## START REG FILE


Windows Registry Editor Version 5.00




[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment]


"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\


65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00


;######## END REG FILE




Double click on the reg file and then look at the key in regedit and the value of APTPRFWCF=W:\PRF\%UserName%.wcf.




Now the problem:




For some people or on some machines, the filename created actually is "%UserName%.wcf" instead of their username. It works fine on mine and creates a file named "essliaw.wcf ".




Does anyone have a clue?




Thanks,


-Andy




\ / Andy Esslinger F-22 Tech Order Data


_____-/\-_____ (817) 777 3047 LM Aero Box 748


\_\/_/ Fort Worth, TX 76101





Thanks for the clue Brandon,




I found the list of pre-defined variables at the bottom of the page at this link: <u></u><u>http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shel...






It shows USERNAME as a "local" variable. I don't see that "local" or "system" should matter, because in either case I can type:



echo %UserName%




and the machines always returns the name of the user that is logged in.




To check it out, there seems to be a couple of places for CURRENT_USER environment. I wonder which Epic uses?





[HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]


"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\


65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00




[HKEY_CURRENT_USER\Environment]


"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\


65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00




Thanks,


-Andy







\ / Andy Esslinger F-22 Tech Order Data


_____-/\-_____ (817) 777 3047 LM Aero Box 748


\_\/_/ Fort Worth, TX 76101




________________________________




From: Ibach, Brandon L


Sent: Wednesday, August 23, 2006 1:33 PM


To: adepters@arbortext.com


Subject: RE: APTPRFWCF problem








Hey, Andy...


Off the top of my head, I'd guess that on those machines, the "UserName" environment variable doesn't exist, at least not at the time that the APTPRFWCF variable gets set. This may have to do with the USERNAME variable being a "local" rather than "system" variable and therefore not getting set until after APTPRFWCF has already been set. If you can figure out a good way to set APTPRFWCF in each user's HKEY_CURRENT_USER section of the registry instead of HKEY_LOCAL_MACHINE, the problem might go away.



Brandon Ibach

Lockheed Martin Space Systems

Cape Canaveral, FL

321-476-7051





From: Esslinger, Andy W

Sent: Wednesday, August 23, 2006 2:10 PM

To: adepters@arbortext.com

Subject: APTPRFWCF problem




This may have noting to do with Arbortext, but maybe someone else has seen the problem. Or it may be an Arbortext problem since Epic is the program writing the file. My Setup = Windows XP, SP2, Arbortext 5.1F, Doc Architext and Editor with print composer license.



The idea is for each writer to have his own preference file, but to put everyone's preference file in a directory where I can investigate them when a user has problems.



The way I do this is to set the APTPRFWCF environment variable at system level to W:\PRF\%UserName%.wcf.


To make this a type REG_EXPAND_SZ and poke the filename in I use this little reg file:


;######## START REG FILE

Windows Registry Editor Version 5.00



[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment]

"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\

65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00

;######## END REG FILE



Double click on the reg file and then look at the key in regedit and the value of APTPRFWCF=W:\PRF\%UserName%.wcf.


Now the problem:


For some people or on some machines, the filename created actually is "%UserName%.wcf" instead of their username. It works fine on mine and creates a file named "essliaw.wcf ".



Does anyone have a clue?


Thanks,

-Andy



\ / Andy Esslinger F-22 Tech Order Data


_____-/\-_____ (817) 777 3047 LM Aero Box 748


\_\/_/ Fort Worth, TX 76101


Let me caveat the following by saying
that I don't really know all of this for fact, but I'm fairly confident based on
my previous experience.

I'm not sure what the difference is
between these two locations, as they both seem to store user environment
variables. However, Epic doesn't look at either of those locations in the
registry. Rather, the entries in those keys tell Windows what variables to
set in the environment when a user logs in. A copy of this environment is
then passed to each new process. The substitution of %UserName% with the
value of that variable happens at the time that the variable is set in the
environment, so the variable you're referencing needs to already be set,
first.

If the APTPRFWCF variable is set before
the USERNAME variable, Windows will leave the reference as-is (just like it will
if you type "echo %SomeVariableThatIsNotSet%" at the command prompt). My
theory is that local variables are set later than system variables, thus making
USERNAME unavailable at the time that APTPRFWCF is set. This doesn't
explain why it works for some users or machines and not others, but it may
provide a way to ensure that it works for all of them.




Brandon Ibach
Lockheed Martin Space Systems
Cape
Canaveral, FL
321-476-7051







From: Esslinger, Andy W
Sent:
Wednesday, August 23, 2006 4:36 PM
To:
adepters@arbortext.com
Subject: RE: APTPRFWCF
problem



Thanks for the clue
Brandon,



I found the list of
pre-defined variables at the bottom of the page at this link:
href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shellove...href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shellove...</u>lang=en-us>




It shows USERNAME as
a "local" variable.
I don't see
that "local" or "system" should matter, because
in either
case I
can typeface=Arial color=#0000ff size=2>:



echo %UserName%


and the machines
always return
sface=Arial color=#0000ff size=2> the name of the user that is logged in.



To check it out, there
seems to be a couple of places for CURRENT_USER environment. I wonder
which Epic uses?


[HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment]

"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\

65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00



[HKEY_CURRENT_USER\Environment]
"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\

65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00



Thanks,

-Andy




lang=en-us> \
/ Andy Esslinger F-22 Tech
Order Data

_____-/\-_____ (817) 777 3047 LM
Aero Box 748

face="Courier New" size=2>
\_\/_/
Fort Worth, TX 76101



________________________________


From: Ibach, Brandon L
lang=en-us> Sent: Wednesday, August 23, 2006 1:33 PM
lang=en-us> To: adepters@arbortext.com
lang=en-us> Subject: RE: APTPRFWCF problem
lang=en-us>
lang=en-us>
lang=en-us>Hey, Andy...face="Times New Roman">
Off the top of my head, I'd guess that on those machines,
the "UserName" environment variable doesn't exist, at least not at the time that
the APTPRFWCF variable gets set. This may have to do with the USERNAME variable
being a "local" rather than "system" variable and therefore not getting set
until after APTPRFWCF has already been set. If you can figure out a good way to
set APTPRFWCF in each user's HKEY_CURRENT_USER section of the registry instead
of HKEY_LOCAL_MACHINE, the problem might go away.face="Times New Roman">



Brandon Ibach
Lockheed Martin
Space Systems
Cape Canaveral, FL
321-476-7051



From:face=Tahoma size=2> Esslinger, Andy W
Sent: Wednesday, August 23, 2006 2:10
PM
To:
adepters@arbortext.com
Subject: APTPRFWCF
problem

This may
have noting to do with Arbortext, but maybe someone else has seen the problem.
Or it may be an Arbortext problem since Epic is the program writing the file. My
Setup = Windows XP, SP2, Arbortext 5.1F, Doc Architext and Editor with print
composer license.



The idea is for each writer to have
his own preference file, but to put everyone's preference file in a directory
where I can investigate them when a user has problems.



The way I do this is to set
the
APTPRFWCF environment variable at system level to
W:\PRF\%UserName%.wcf.

To make this
a type REG_EXPAND_SZ and poke the filename in I use this little reg
file:

lang=en-us>;######## START REG FILEface="Times New Roman">
Windows
Registry Editor Version 5.00


[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session
Manager\Environment]
"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\face="Times New Roman">
65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00face="Times New Roman">
;######## END REG
FILE

lang=en-us>Double click on the reg file and then look at
the key in regedit and the value of APTPRFWCF=W:\PRF\%UserName%.wcf.
face="Times New Roman">

Now the problem:
For some people or on some machines, the filename created actually is
"%UserName%.wcf" instead of their username. It works fine on mine and creates a
file named "essliaw.wcf ".



Does anyone have a clue?face="Times New Roman">
Thanks,
-Andy

lang=en-us> \
/ Andy Esslinger F-22 Tech
Order Data

_____-/\-_____ (817) 777 3047 LM
Aero Box 748

face="Courier New" size=2>
\_\/_/
Fort Worth, TX 76101


>> To unsubscribe from the list,
send an email to listmanager@maillist.arbortext.com with the following in the
body: unsubscribe adepters - For additional information on the adepters list
(how to subscribe or unsubscribe etc), send an email to:
listmanager@maillist.arbortext.com with the following in the body: info Adepters
- You may also go to forums.arbortext.com, enter the Adepters folder and change
your subscription options and preferences.>>

Right after I sent that, of course, I
looked a little closer at it. The first location doesn't exist in
HKEY_CURRENT_USER, it is in HKEY_LOCAL_MACHINE, and is where system environment
variables are stored. User variables are stored in the second
location.

Brandon Ibach
Lockheed Martin Space Systems
Cape
Canaveral, FL
321-476-7051








From: Ibach, Brandon L
Sent:
Wednesday, August 23, 2006 7:18 PM
To:
adepters@arbortext.com
Subject: RE: APTPRFWCF
problem



Let me caveat the following by saying
that I don't really know all of this for fact, but I'm fairly confident based on
my previous experience.

I'm not sure what the difference is
between these two locations, as they both seem to store user environment
variables. However, Epic doesn't look at either of those locations in the
registry. Rather, the entries in those keys tell Windows what variables to
set in the environment when a user logs in. A copy of this environment is
then passed to each new process. The substitution of %UserName% with the
value of that variable happens at the time that the variable is set in the
environment, so the variable you're referencing needs to already be set,
first.

If the APTPRFWCF variable is set before
the USERNAME variable, Windows will leave the reference as-is (just like it will
if you type "echo %SomeVariableThatIsNotSet%" at the command prompt). My
theory is that local variables are set later than system variables, thus making
USERNAME unavailable at the time that APTPRFWCF is set. This doesn't
explain why it works for some users or machines and not others, but it may
provide a way to ensure that it works for all of them.




Brandon Ibach
Lockheed Martin Space Systems
Cape
Canaveral, FL
321-476-7051







From: Esslinger, Andy W
Sent:
Wednesday, August 23, 2006 4:36 PM
To:
adepters@arbortext.com
Subject: RE: APTPRFWCF
problem



Thanks for the clue
Brandon,



I found the list of
pre-defined variables at the bottom of the page at this link:
href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shellove...href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shellove...</u>lang=en-us>



It shows USERNAME as a "local" variable. I don't see that "local" or "system" should matter,
because in either case I can type:



echo %UserName%


and the machines
always return
sface=Arial color=#0000ff size=2> the name of the user that is logged in.



To check it out, there
seems to be a couple of places for CURRENT_USER environment. I wonder
which Epic uses?


[HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment]

"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\

65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00



[HKEY_CURRENT_USER\Environment]
"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\

65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00



Thanks,

-Andy




lang=en-us> \
/ Andy Esslinger F-22 Tech
Order Data

_____-/\-_____ (817) 777 3047 LM
Aero Box 748

face="Courier New" size=2>
\_\/_/
Fort Worth, TX 76101



________________________________


From: Ibach, Brandon L
lang=en-us> Sent: Wednesday, August 23, 2006 1:33 PM
lang=en-us> To: adepters@arbortext.com
lang=en-us> Subject: RE: APTPRFWCF problem
lang=en-us>
lang=en-us>
lang=en-us>Hey, Andy...face="Times New Roman">
Off the top of my head, I'd guess that on those machines,
the "UserName" environment variable doesn't exist, at least not at the time that
the APTPRFWCF variable gets set. This may have to do with the USERNAME variable
being a "local" rather than "system" variable and therefore not getting set
until after APTPRFWCF has already been set. If you can figure out a good way to
set APTPRFWCF in each user's HKEY_CURRENT_USER section of the registry instead
of HKEY_LOCAL_MACHINE, the problem might go away.face="Times New Roman">



Brandon Ibach
Lockheed Martin
Space Systems
Cape Canaveral, FL
321-476-7051



From:face=Tahoma size=2> Esslinger, Andy W
Sent: Wednesday, August 23, 2006 2:10
PM
To:
adepters@arbortext.com
Subject: APTPRFWCF
problem

This may
have noting to do with Arbortext, but maybe someone else has seen the problem.
Or it may be an Arbortext problem since Epic is the program writing the file. My
Setup = Windows XP, SP2, Arbortext 5.1F, Doc Architext and Editor with print
composer license.



The idea is for each writer to have
his own preference file, but to put everyone's preference file in a directory
where I can investigate them when a user has problems.



The way I do this is to set
the
APTPRFWCF environment variable at system level to
W:\PRF\%UserName%.wcf.

To make this
a type REG_EXPAND_SZ and poke the filename in I use this little reg
file:

lang=en-us>;######## START REG FILEface="Times New Roman">
Windows
Registry Editor Version 5.00


[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session
Manager\Environment]
"APTPRFWCF"=hex(2):57,00,3a,00,5c,00,50,00,52,00,46,00,5c,00,25,00,55,00,73,00,\face="Times New Roman">
65,00,72,00,4e,00,61,00,6d,00,65,00,25,00,2e,00,77,00,63,00,66,00,00,00face="Times New Roman">
;######## END REG
FILE

lang=en-us>Double click on the reg file and then look at
the key in regedit and the value of APTPRFWCF=W:\PRF\%UserName%.wcf.
face="Times New Roman">

Now the problem:
For some people or on some machines, the filename created actually is
"%UserName%.wcf" instead of their username. It works fine on mine and creates a
file named "essliaw.wcf ".



Does anyone have a clue?face="Times New Roman">
Thanks,
-Andy

lang=en-us> \
/ Andy Esslinger F-22 Tech
Order Data

_____-/\-_____ (817) 777 3047 LM
Aero Box 748

face="Courier New" size=2>
\_\/_/
Fort Worth, TX 76101


>> To unsubscribe from the list,
send an email to listmanager@maillist.arbortext.com with the following in the
body: unsubscribe adepters - For additional information on the adepters list
(how to subscribe or unsubscribe etc), send an email to:
listmanager@maillist.arbortext.com with the following in the body: info Adepters
- You may also go to forums.arbortext.com, enter the Adepters folder and change
your subscription options and preferences.>> >> To unsubscribe from
the list, send an email to listmanager@maillist.arbortext.com with the following
in the body: unsubscribe adepters - For additional information on the adepters
list (how to subscribe or unsubscribe etc), send an email to:
listmanager@maillist.arbortext.com with the following in the body: info Adepters
- You may also go to forums.arbortext.com, enter the Adepters folder and change
your subscription options and preferences.>>
Announcements