Hugh,

According to some Lawrence Livermore Lab webpage that came up on a google
search, Microsoft introduced these "shadow directories" for software
installation directories in Windows Vista, and they are continued in Windows
7.  I agree that the diagnostics in icont should be improved. I doubt that
the additional information that the ANSI C fopen() function gives us (in an
integer errno code) will be all that helpful or clear to end users, so we
may end up special-casing this diagnostic on Windows (yuck).

It was not a "different user" issue. It was not a "hidden files" issue.
 Microsoft actually runs the program in a "shadow directory" somewhere under
AppData that looks like your installation directory, but isn't.  Not being
able to open and write to a .exe file there is presumably a
security/permissions policy issue. I was running from a Win7 user account
which had Administrator privileges and icont still could not fopen() an
executable file in an installed software
directory, but it could open text (and presumably ordinary data) files.  We
might get away with writing bytecode-only text .cmd files that invoke
iconx/wiconx, but if I were implementing security I'd rule out .cmd's if
.exe's are not allowed.  In any case, writing .exe's to normal directories
that you create works as usual.

Clint

On Wed, Feb 2, 2011 at 3:21 AM, Hugh Sasse <h...@dmu.ac.uk> wrote:

> On Wed, 2 Feb 2011, Clinton Jeffery wrote:
>
> > Steve,
> >
> > An update: the situation is weirder than I thought. :-)
> >
>         [...]
> >
> > Then I tried building exe's directly in the install under \Program Files\
> > that I was testing. And I got the same message you reported below.
> Windows
> > seems to allow ui to write text files, but not executables, to a
> directory
> > under \Program Files\, or maybe under any directory that was created by a
> > software installer tool. This may be new to Win7 or may have been
> introduced
>
> Due to this?
>
> > > icont: cannot create farb.exe
>
> The diagnostics could probably be improved on that, perhaps.  Several
> reasons
> exist for not being able to write to a directory: Permissions, disk full,
> nonexistent directory, off the top of my head.
>
> > earlier.  Another observation which is much, much weirder, is that on my
> > machine at least, the text files that I wrote in \Program
> Files\Unicon\bin
> > show up under the "file open" dialog which says it is at \Program
> > Files\Unicon\bin; I can save, close "ui", rerun "ui", open them and the
> > contents are there... but the same source file does not appear under the
> > explorer or on the command prompt "dir" listing.  So it is like there are
> > two different "C:\Program Files\Unicon\bin", one that shows to the
> program
> > installed there, and one that the rest of the world sees. I presume this
> is
> > a valuable security upgrade.
>
> I'm wondering if you are doing this as the same user, or whether one of
> this is set to display hidden files and one not.  But those are just
> guesses.
> Is one of them set to "run as administrator"?
>
> >
> > Writing to a separate directory c:\foo, my saved .icn and resulting .exe
> > seem normal and OK.
> >
>         [...]
> >
> > Cheers,
> > Clint
>
>        Hugh
> >
> > On Tue, Feb 1, 2011 at 6:23 PM, Steve Graham
> > <solitary.wandere...@gmail.com>wrote:
> >
> > > Clint,
> > >
> > >    What am I doing wrong here?
> > >
> > > C:\Program Files (x86)\Unicon\ipl\progs>icont farb.icn
> > > Translating:
> > > farb.icn:
> > >   main
> > > No errors
> > > Linking:
> > > icont: cannot create farb.exe
> > >
> > > C:\Program Files (x86)\Unicon\ipl\progs>
> > >
> >
>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to