APEX Folder Problem
#1087
11 Mar 14 01:20 PM
|
Joined: Jun 2001
Posts: 11,794
Jack McGregor
OP
Member
|
OP
Member
Joined: Jun 2001
Posts: 11,794 |
Occasionally someone encounters a problem with APEX printing caused by failure to locate or create the APEX work directory. Typically the symptom is a popup message saying something like "Unable to create APEX directory", or something like these examples (from an installation using Citrix): The problem is caused by a failure to retrieve a valid location for the My Documents directory from the Registry, for which APEX uses this path: One workaround is to define the APEX environment variable (on the client workstation) to point to a known-to-work directory. (If the environment variable exists, APEX just uses it as the directory, without trying to locate the My Documents directory.) The simplest way to do this would be via a AG_SETENV statement that references a known-to-exist location on the client, such as %MIAME%. For example: ? tab(-10,AG_SETENV);"APEX=%MIAME%\APEX";chr(127); The %MIAME% variable is virtually guaranteed to be defined on the client, so this should virtually always work. But if you want to put APEX in a location based on an environment variable which may not exist, such as %TEMP%, you could code it more robustly as follows: program SETAPEX,1.0(100) ! set APEX environment variable to TEMP\APEX
!---------------------------------------------------------------------
!EDIT HISTORY
![100] March 11, 2014 12:20 PM Edited by jackmc
! Created as example of how to work around problems with the
! registry definition of the My Documents directory (which is
! the normal location for the APEX work directory).
!NOTES:
! This works for both A-Shell/Windows and ATE.
!--------------------------------------------------------------------
++include ashinc:ashell.def
map1 envdir$,s,260
! retrieve client %TEMP% directory
xcall MIAMEX, MX_AGWRAPPER, AG_GETENV, "TEMP", envdir$
? "Client 'TEMP' directory: ";envdir$
! if it doesn't exist, try something else (or give up)
if envdir$ = "" then
? "%TEMP% not defined, trying %MIAME%\APEX ..."
? tab(-10,AG_SETENV);"APEX=%MIAME%\APEX";chr(127);
else
! set APEX to <%TEMP%>\APEX
! (note: set timeout to 1 ms to make sure we don't wait for response)
envdir$ = "APEX=" + envdir$ + "\APEX"
? "Setting ";envdir$
xcall MIAMEX, MX_AGWRAPPER, AG_SETENV, envdir$, "", 1
endif
! verify that it worked
xcall MIAMEX, MX_AGWRAPPER, AG_GETENV, "APEX", envdir$
? "Verify: 'APEX' now defined as: ";envdir$
end Notes:1) APEX will create the directory if it doesn't exist, but the parent directory has to exist and we have to have sufficient privileges to create a new directory within in. 2) As of 6.1.1374.5, APEX will automatically use the %TEMP% directory if it can't locate the My Documents directory. But that may not eliminate the problem if the My Documents directory is defined to something inaccessible (as in the first images above, where the path is in a weird drive or path CEdD\).
|
|
|
Re: APEX Folder Problem
#1088
11 Mar 14 03:24 PM
|
Joined: Sep 2002
Posts: 5,471
Frank
Member
|
Member
Joined: Sep 2002
Posts: 5,471 |
|
|
|
Re: APEX Folder Problem
#1089
15 Jan 19 07:55 PM
|
Joined: Sep 2002
Posts: 5,471
Frank
Member
|
Member
Joined: Sep 2002
Posts: 5,471 |
Well gee, look how time flies... found myself back here looking for a bit of help. I had held onto W7 as long as possible, but unfortunately a crapped out HD has caused me to move to W10... Somehow during the registration process MS installed and activated Onedrive. Now i don't know if my files are local? on the cloud? or both! Forums seem to be as confusing with replies with basically saying well, depends on the W10 version, setup, etc. In my case i DONT WANT my files on the cloud unless i specifically request them, but in its infinite wisdom, W10 has decided that my desktop, documents and pictures folders were to be installed within the Onedrive directory. To make matters a bit more interesting this desktop comes with a 120GB solid state "C:\ boot drive". While this sounds good on paper, and does seem to boot the system very quickly, every program wants to store itself on C which is going to fill C: up very rapidly and i have to move and point everything over to the D: hard drive. :rolleyes: Anyways... because it is using the default "documents" folder i have discovered that APEX is chunking lots of temp files into the onedrive repository. Not only is this unnecessary but also seems to be confusing to APEX which says it cannot open the file. (perhaps its locked for transfer into the great beyond?) I would like to move the APEX dir to my D:\temp folder. However I only want to do it on this workstation. What method would you recommend for this? TIA. (and sorry for the rant... i just really miss DOS.. lol)
|
|
|
Re: APEX Folder Problem
#1090
15 Jan 19 08:59 PM
|
Joined: Sep 2002
Posts: 5,471
Frank
Member
|
Member
Joined: Sep 2002
Posts: 5,471 |
Ok well after a too-late cappuccino I navigated to the One drive settings an unchecked all the standard folders. Which much to my dismay also removed them from my own system.... SEE! Good thing there wasn't much there yet. But that was exactly what i was concerned about. I can see if you have a chromebook, etc, then you are running from the cloud full time, and this makes great sense, but i want to see and hold my own files. Guess i am not quite ready to relinquish my files to Microsoft. Anyways, after those folders disappeared from the onedrive folder, i went back in and now APEX lives under the non-cloud documents folder. Hopefully this resolves the problem.
|
|
|
Re: APEX Folder Problem
#1091
16 Jan 19 08:41 AM
|
Joined: Jun 2001
Posts: 3,406
Jorge Tavares - UmZero
Member
|
Member
Joined: Jun 2001
Posts: 3,406 |
Hi Frank, For what can matter, I'm doing exactly the opposite, I moved everything, including my development platform, to OneDrive which is configured in three computers, one in Portugal just to keep an "on earth" backup, the other at home where I usually work and another in a Surface that I use to travel and I'm very happy to know that I have a lot of backups and can travel w/o think if I have all I need to keep working. There a couple of folders, with non-relevant content, that I unmark at the OneDrive setup to not update locally and, for example, in the Surface that has a small 128GB HD, I unmark the Pictures folder to not run out of space. And I don't think that Microsoft is very interested in my files because if I think that way, the solution would be to switch off any equipment around me
Jorge Tavares
UmZero - SoftwareHouse Brasil/Portugal
|
|
|
Re: APEX Folder Problem
#1092
16 Jan 19 08:44 AM
|
Joined: Jun 2001
Posts: 11,794
Jack McGregor
OP
Member
|
OP
Member
Joined: Jun 2001
Posts: 11,794 |
To quote a famous statesman: I feel your pain. :rolleyes:
(After hearing one too many glowing reviews about how great the "OneDrive Life" is, I tried to set it up on my W10 laptop, but despite sinking a couple of hours into it, can't get it to run at all. Possibly it's related to a vaguely remembered but all-too-successful scorched-earth campaign on my part to rid myself of it a couple of years ago when I was in your current state of mind. Or... whatever.)
In any case, although it seems you've solved the problem for now, I guess my recommendation in general would be to explicitly define the APEX environment variable to point to something like C:\ATE\APEX. You could do that with an AG_GETENV command to retrieve the current client-side definition of %MIAME%, and then AG_SETENV to define APEX to be a subdirectory of that. (It cold be a dedicated subdirectory like "APEX", or you could reuse the "Cache" directory if you didn't want to keep any files beyond the length of the current session.
You could add those two commands to your startup code and then it would always be set and under your control. The only caveat might be to make sure that your ATE installation directory isn't itself within the OneSphere (or whatever they call it.) I'm not sure there is any easy way to test for that, but there might be a special CSIDL directory id for a known-to-be-local directory. But that would require more muddling than I can muster at this hour.
|
|
|
Re: APEX Folder Problem
#1093
16 Jan 19 08:53 AM
|
Joined: Jun 2001
Posts: 11,794
Jack McGregor
OP
Member
|
OP
Member
Joined: Jun 2001
Posts: 11,794 |
I should clarify that the problem which led me to disable OneDrive was not so much a concern for privacy, since as Jorge points out, that's probably a lost cause. It was a performance issue. That may have been improved in the last few years, but at least when I was first playing with it, it seemed to suck up too much of my Internet bandwidth and CPU capacity with its constant sync'ing. (possibly exacerbated by too much activity on my part in the affected directories).
|
|
|
Re: APEX Folder Problem
#1094
16 Jan 19 09:34 AM
|
Joined: Sep 2002
Posts: 5,471
Frank
Member
|
Member
Joined: Sep 2002
Posts: 5,471 |
Thanks for the replies. My issue is not privacy either, as i wouldn't mind using Onedrive (i like OneSphere better...) for backups. For Jorge, makes perfect sense! New generation of users are foregoing local storage and are mainlined to the cloud 24/7. That's great! However, my concern is when the internet goes down. And to Jack's point, performance. Or even worse, you decide to cancel your MS subscription. I just don't trust having my main files live in the cloud full time. I am fine using the cloud as a backup or shareable medium. Also, perhaps to your point Jack, i didn't like how MS automatically placed mandatory system folders under the OneDrive spec. So that from the beginning documents, pics, desktop and downloads were automatically loaded onto the cloud. Not synced, but loaded. What happens if you didn't realize that, and cut your OneDrive cord?! Or worse, somehow the OneDrive acct was hacked. I don't think i am being paranoid.. (is that a paradox?) but i would prefer my main files load and execute locally. I will choose to back them up as needed. I am not a W10 power user to any extent, so perhaps i should have known better, but what about John q Public that just grabs a laptop, plugs it in and goes there merry way.. they may have no idea where there files are... Or even worse, care... Yeah, add my son to the list!
|
|
|
Re: APEX Folder Problem
#1095
16 Jan 19 01:22 PM
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
Will VUE work on Onedrive? :rolleyes:
|
|
|
Re: APEX Folder Problem
#1096
16 Jan 19 02:27 PM
|
Joined: Sep 2002
Posts: 5,471
Frank
Member
|
Member
Joined: Sep 2002
Posts: 5,471 |
Ha! Will have to give it a try...
|
|
|
|
|