PDA

View Full Version : Error code 2



NewsArchive
11-05-2011, 05:54 AM
First of all I do not think this is a SB problem, in fact it is not. I am
suspecting UAC or something.

Anyway an install has gone horribly wrong. The client download a public
install that works on hundreds of machines. It installs fine and a desktop
icon and menu items are created. They then start the software up.

In one application they get Error Code 2 but will not tell me the exact
message. I am assuming it is a Clarion message (File not found). This is
before the main frame is displayed.

So I got them to download a large application. This time it installed and
ran fine. They saw the main frame and could use it. However when they closed
and re opened it, they got Error Code 2 again.

Assuming this is indeed File Not Found, what may be happening? Could this be
a UAC thing?

They are running Vista. The installer script is perfect and works
everywhere.

Thanks

John Fligg

NewsArchive
11-05-2011, 05:54 AM
Hi John,

Two possible reasons come to mind. Perhaps a typical current folder issue.
For example, your application depends on the current folder (whatever path
that might be) to find the data file and because the current folder is not
what you expect, your application can't find the file. Or the file is
really not there because his anti-virus product removed it.

I don't think that the install went wrong at all (you can check the
uninstall .log to find out if the data file has been installed). Something
seems to be horribly wrong AFTER the installation! And if you follow the
UAC development guidelines then it's also not caused by UAC. IMO, it's a.)
a current folder or b.) an anti-virus/-spyware issue.

Friedrich

NewsArchive
11-06-2011, 03:05 AM
Currently I DO depend on a specific data folder.That is changing but been
like that for years.

My first thought was they changed the install path but regrettably (isn't it
always the case) trying to get the facts from them is like getting blood out
of a stone.

I told them to reinstall using /E so i could review the log file but no
response as yet.

Oh yes - the uninstall log! Thanks

John

NewsArchive
11-06-2011, 03:06 AM
And another idea. Perhaps your application creates a data file in a
specific "per-user" location and when they change the login, that location
is not available any longer (and your app reports "file not found). Or your
app stores the location of the data file in a "per-user" location and the
change of the login results in an invalid data path.

I have seen things like this in a multiple-login environment (multiple login
"accounts" on the same machine) when the app does not store/retrieve the
data folder to/from the correct user profile.

Friedrich

NewsArchive
11-06-2011, 03:06 AM
Hi John,

> In one application they get Error Code 2 but will not tell me the exact
> message. I am assuming it is a Clarion message (File not found). This is
> before the main frame is displayed.

Error code 2 is "file not found" both in Clarion and the OS, see:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx

So it is definitely the error they are getting:)

Best regards,

--
ArnĂ³r Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-06-2011, 03:11 AM
Thanks Arnor - I have tried to get this darned client to send me a
screenshot of the message as if it is Clarion reporting it then it will look
one way or if it is Windows it will look something else. That could be
significant.

I suspect it is Windows reporting the error and not Clarion.

Thanks

John

NewsArchive
11-07-2011, 03:30 AM
By way of an update Friedrich has very kindly help me resolve this.

In my script, I had not realised but I was copying a value from HKCU to HKLM
which of course is not permitted. Furthermore, at this point I would not
guarantee to know who the current user was. Consequently the data path was
not guaranteed to be correct in multi user environments.

Sadly the client in questions is not giving me the feedback to confirm this
but as Friedrich has quite rightly pointed out this needs attending to.

Strangely, this line in the script is actually redundant and has never
caused any issues which is why it never even occurred to me this was there.

So thank you Friedrich for pointing this out and explaining it. I I am sure
it is the answer and hopefully the client can confirm that.

I think that so far I have been lucky that only people logged in as Admin
have installed the software.

John Fligg