Re: .Net executable shows fine for some, as DOS .exe for others

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



No, your fix sounds accurate and makes sense, however I don't understand why
a .NET application would require write access to the dir? I have seen the
same issue when I deployed web apps (.NET based) -- even precompiled ones.
Since I don't like to provide public write access to anything I located the
..NET account (don't recall the account name right now) and gave that account
write access to the dir.

Yeah, don't waste your time on re-installs of .NET framework (I use that as
my last resort).

Rob.

"nylyst" <nylyst@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7DE03F1F-839B-41DD-B610-5944C98709F8@xxxxxxxxxxxxxxxx
Almost forgot to answer your questions Rob!!

I didn't try the install/uninstall, but having found a fix, I'm not sure
that would have any effect. As I said in my intial response, although
this
works, I'm still not sure that I have the scenario nailed down, or just
got
lucky.

As for the versions, both 1.1 and 2.0 are installed on this particular
server and are up-to-date with any patches from MS.

Let me know if this works for you, and if not, we can keep plugging and
maybe find a more definitive answer to this problem.

Eric

"nylyst" wrote:

Ok, after some digging and further testing, I think I've figured this
out.

If any of the below is incorrect, someone please feel free to correct me.

Apparently, to run an executable, you need write access to the directory
you're launching the executable from. In this instance, the .exe itself
lived in C:\Documents and Settings\All Users\Desktop. The 2 new users,
while
they need access to this app via the Terminal Server, are not IT folks,
and
so were not given write access to All Users subtree.

Once I moved the .exe to a new folder where the users DID have write
access,
they were able to see and run it fine. So to restore things to the way
they
were, I deleted the .exe in the All Users\Desktop folder, and created a
shortcut to the new copy in another folder where the users had write
access.
Double-clicking the shortcut, now does everything one would expect, as
well
as fixing the properties problem.

My theory is this, you need write access to a folder from which you want
to
launch an executable, as well as for reading the PE header (what explorer
does to display the file icons) to display the appropriate properties and
icon. I can neither confirm nor deny this, only state that in my case,
once
the conditions listed above were met (.exe launched from or viewed in a
folder that the user has write access to) everything returned to normal.

HTH,

Eric

"Rob R. Ainscough" wrote:

I've noticed the EXACT same problem with some of my .NET exe, the
appear to
registry as DOS apps rather than .NET windows apps, but not in all
causes,
seems to vary from PC to PC.

If you find a solution, please let me know.

Just curious, did you try to install and then uninstall .NET framework?
How
many versions of .NET framework are loaded on the client PC?

Rob.


"nylyst" <nylyst@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C0F09C60-6630-49E2-9B92-BC07A56269E0@xxxxxxxxxxxxxxxx
I've run into a rather strange situation, and can't seem to find any
details
on why this would even be happening, so here goes:

I've created an app to force users to update their pcAnywhere
passwords.
This is a VB.Net project compiled against .Net 1.1. This executable
is
placed on a terminal server in \Documents and Settings\All
Users\Desktop
and
up until recently worked just fine, with about 10 people utilizing it
on a
recurring basis.

Recently, 2 new employees joined our team, and need access to this as
well,
but we're encountering some strange things. First, when they try and
run
the
.exe, they get a boilerplate windows error (not the JIT type) stating
they
don't have rights to access something (going through code now, just
to
make
sure that .exe is touching only what it needs) and the application
will be
terminated. I've verified myself that both for this machine, and the
domain
in general, these 2 users have the EXACT same rights as the people
already
using this app, but still we get that message.

So I started looking to see if perhaps they were somehow pointing to
a
different copy of the .exe, and I did so by right clicking on the
.exe and
selecting properties. When looking at the properties, there's a
stark
contrast between what these 2 new users see, and what everyone else
sees.
For the new users, the properties tabs are those of a DOS executable.
For
anyone else, they see the normal 3 or 4 tabs one would expect from a
.Net
executable!!

As a last ditch before searching/posting here, I rebuilt the .exe
from
source and placed the new copy in the same location as the original,
with
no
change in the results. Works fine for everyone but these 2 users,
with
the
above mentioned quirks still intact.

Thanks in advance for taking the time to read all this,

Eric





.



Relevant Pages

  • RE: Running Fox Exes from a local network, VFP5.0 vs VFP6 - 8
    ... in the same folder on the network as the EXE and start the EXE with a ... Place the EXE and data on the network, ... Microsoft FoxPro Technical Support ... >responsibilties this is easy to connect new workstations to these apps. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Are strong names the answer?
    ... > example, you can develop an EXE and a DLL, the DLL can ... so can the EXE. ... > and obfuscator, ... > make the apps ...
    (microsoft.public.dotnet.general)
  • Can a DBC containing RVs exclusively be included in an EXE?
    ... Two days ago, a client called. ... apps suddenly gave an error message and couldn't save any transaction at ... I had an idea to exclude the database from the exe. ... and I included that dbc in the exe. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Are strong names the answer?
    ... example, you can develop an EXE and a DLL, the DLL can ... have a strong name, so can the EXE. ... and obfuscator, ... make the apps ...
    (microsoft.public.dotnet.general)
  • Re: Single Instance Limit
    ... In my case there are several small Apps which start a large App; ... for a captioned form in L, by looking for its handle, when L terminates the ... if the user copied the EXE into a different ... folder, it won't work. ...
    (microsoft.public.vb.general.discussion)