Emerald Editor Discussion
May 24, 2017, 06:59:11 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Crimson Editor SVN263 and Windows 7  (Read 50816 times)
0 Members and 1 Guest are viewing this topic.
Gryffyn
Prospector
*
Posts: 8


« on: November 17, 2009, 03:38:51 pm »

Greetings!  First, I have to thank everyone who's put their time into Crimson Editor and Emerald Editor.  You really take good editors for granted when you have them and miss them when they don't exist.  Thankfully, Crimson Editor is still viable (thanks to you guys) and Emerald Editor is sounding rather interesting as well.

One issue I'm having with CE under Win7 that seems to cause a couple small issues is that CE triggers the Win7 UAC every time I load it.  After doing some Googling, it sounds like this may be fix by changing something in the install manifest (forgive me, but I'm not a Windows programmer, so not totally fluent in the install intricacies).

That part is a minor annoyance, but I believe it's affecting the ability to drag and drop files into CE.  I think they just get blocked and don't bother triggering any UAC authorization request, so I have to use the Open File icon or File -> Open each time I want to open something.

Recently I was working at home via VPN and mapped a network drive to a remove share on my work network and I couldn't drag and drop and CE wouldn't show the mapped network drive (that's probably another issue to look into, but since I couldn't drag and drop.. I couldn't use CE so that ties back into my original point).


Quick bullet list of the what I'm saying here:

* UAC notice on install

* Inability to drag-drop.. may be related to UAC issue

* For that matter, drag and drop doesn't work in the main part of the window (where you do your editing), you need to drop on the tab bar.  Might be nice to drop anywhere

* Inability for CE to see "\\machinename\directory\" and when I map a drive (eg: W:) to the share, the W: drive doesn't show up under "Computer" in CE even though it does in Windows.  This was testing via VPN and with Samba shares on Linux.  Not sure if it applies on a straight Windows network.


I think that's it for now.  Sorry for the incoherence, got some kind of head/chest cold and can't think straight. Smiley

Keep up the great work!  CE is by far the best text editor I've used on Windows.

-TG
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #1 on: November 17, 2009, 08:36:34 pm »

Thanks for the kind comments. Unfortunately, I don't think any of the developers right now have a Windows version newer than XP; so we aren't able to test this. I actually have a legal copy of Vista, but I doubt either of my computers could run it very well due to the higher system requirements.

Thanks for the info though. If you have programming experience and you manage to fix the issue, feel free to submit a patch.
Logged
Gryffyn
Prospector
*
Posts: 8


« Reply #2 on: November 20, 2009, 05:46:05 am »

Hey Phil.  Thanks for the quick response and info.

I have some programming experience (I have an old copy of VS2005 around somewhere, but never did anything big with it.. mostly a PHP guy).  If I get around to dusting off VS2005 and install SVN at home, I might take a crack at it.

Doing some research, it looks like it might just be a setting in the manifest.  My best, semi-informed, guess is if this line is changed:
( http://svn.emeraldeditor.com/viewvc.cgi/CrimsonEditor/trunk/res/manifest.xml?view=markup )
<requestedExecutionLevel level="highestAvailable" />

To possibly "asInvoker"?

I don't know if it makes a difference, but I'm running Win7 64 bit.  I assume 32/64 bit work the same for such things.

Another minor issue is the UAC lists CE as 'unknown publisher'.  I assume this involves proper app signing but I don't know much about that.

Anyway, if it's helpful, here are some links that don't involve just turning off UAC or hacking the registry or using Task Scheduler to circumvent UAC (those three are like 90% of what I found while researching):

Windows Vista manifest info (may relate to Win7 too?):
http://msdn.microsoft.com/en-us/library/bb756929.aspx

Someone with the opposite problem (UAC *not* triggering when it should):
http://social.msdn.microsoft.com/Forums/en-US/windowscompatibility/thread/7a48cbae-2fe8-4452-97f6-6bae75e871c2/

Some more UAC info from MS:
http://technet.microsoft.com/en-us/magazine/2009.07.uac.aspx

Possible issue with manifest being ignored in Win7:
http://social.msdn.microsoft.com/Forums/en-US/windowscompatibility/thread/fcebe7a4-2841-4898-9621-2e638de83fa6


I assume I won't get around to taking a shot at this, but thought I'd pass along what info I have.

Thanks again!
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #3 on: November 20, 2009, 04:51:15 pm »

Thanks for the links. Just so you know in case you decide to work on it, you have to use a version of VS 2005 which includes MFC; so you can't use the Express Edition.
Logged
Gryffyn
Prospector
*
Posts: 8


« Reply #4 on: November 22, 2009, 03:02:55 am »

Alright.. got VS2005 and SVN installed at home, checked out CE and changed the manifest from 'highestAvailable' to 'asInvoker' and, I believe, it works without trying to elevate privs and triggering UAC.

I tried to commit the change, but I don't have a login for SVN.

I'm still kind of a VS noob, but I built it with 'asInvoker' and copied the EXE over my installed copy and things worked fine.  Rebuilt with 'highestAvailable' again and I got the UAC issue again.

Some things this seems to fix:

* CE runs without triggering UAC
* The proper icon shows up on the start menu (previously showed a blank/placeholder icon)
* You can now drag and drop into the main document part of the window and not just the toolbar  (previously disallowed drag/drop in document area [no 'copy' pointer] and silently failed on toolbar)
* "Open with.." works again  (previously silently failed)

-TG
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #5 on: November 22, 2009, 05:21:43 am »

Sounds great. Check Tools->Preferences->Tools. Do the first two settings work? (Use CE in IE and use CE in context menu)
Logged
Gryffyn
Prospector
*
Posts: 8


« Reply #6 on: November 22, 2009, 06:48:30 am »

If I load CE normally, those two options give me an error that they can't write to the registry with the current privs.

If I load CE with 'run as administrator', I can set them.

After they're set, if I don't close CE, it runs like it did before I made the change to the manifest..  attempting to open in any other way besides File -> Open (or the icon) results in a silent fail.

If I close CE, then I can open via explorer context menu (right-click -> open in CE).

View Source in IE8 64 bit opens in IE8's internal source viewer.   View Source in IE8 (32bit) gives me a notice first:  "A website wants to open web content using this program on your computer" and it lists the name as the path to cedit.exe and the publisher as Emerald Editor Community.  If I click 'allow', it opens in CE just fine (non-priv'd execution.. verified by the lack of ability to change the two Tools settings mentioned).

So yeah, those options work, mostly, as long as you run CE as Admin to set or unset them.

There's probably a way to trigger the UAC verification on just setting those two options.  Might even be able to de-elevate after changing the setting.  Not sure if that would require running a separate executable and elevating it's access or if you'd need to do it on the main CE instance.

The only reason I mention the de-elevation is to avoid the issue with not being able to drag/drop or open-with and such while CE's permissions are elevated.

I wonder if you could do something along the lines of having those two Tools settings give you a "requires restart to take effect" then do the elevated permissions thing on startup just to make those changes, then de-elevate and load CE.

Just thinking out loud..  Smiley

-TG
Logged
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #7 on: November 23, 2009, 05:22:11 pm »

If I load CE normally, those two options give me an error that they can't write to the registry with the current privs.

If I load CE with 'run as administrator', I can set them.


That's why I set Highest available. "Users" ie those without the ability to elevate will not be prompted at all.


There's probably a way to trigger the UAC verification on just setting those two options.  Might even be able to de-elevate after changing the setting.  Not sure if that would require running a separate executable and elevating it's access or if you'd need to do it on the main CE instance.

The only reason I mention the de-elevation is to avoid the issue with not being able to drag/drop or open-with and such while CE's permissions are elevated.

No way to do this on an option inside an appliaction, hence my above work around, has to be done on application startup (I believe the "security" is that once a process is running it's privliges are "stuck" and therefore cant be evelvated, though i may be mistaken).
Logged
Phil
Administrator
Master Jeweller
*****
Posts: 427


« Reply #8 on: November 23, 2009, 07:53:12 pm »

I think Gryffyn's idea of a separate program makes sense. A command-line program could be used just to set those settings. CE would just invoke it to change the settings; it would cause a UAC prompt, but CE would not be elevated.
Logged
Gryffyn
Prospector
*
Posts: 8


« Reply #9 on: November 24, 2009, 04:04:49 am »

Thanks for the info, Ryan. I admit to being fairly novice at this (years of app and other experience, but not so much with the intricacies of Windows programming).

My guess is if you used "highestAvailable" and a non-Admin user was running CE, it would run at the same non-elevated level that the user is.  Since I'm bad and run as admin more often than not, the UAC is triggered since "highest" would be "admin" for me.

I'm wondering if using "asInvoker" has the same result as "highestAvailable" for non-Admin users.. since the highest available is whatever the user's default rights are?

At any rate, I was able to do a build for myself that fixes an annoyance I had, so I'm happy even if you guys decide to leave it as "highestAvailable".  Smiley

As for what you said about being 'stuck' once elevated, that seems consistant with the way I've seen some apps behave.  I don't know if it's just because they don't try to de-elevate or can't, but my hunch is that they can't.
Logged
Pvt_Ryan
Master Jeweller
******
Posts: 422



WWW
« Reply #10 on: November 25, 2009, 11:52:35 am »

Thanks for the info, Ryan. I admit to being fairly novice at this (years of app and other experience, but not so much with the intricacies of Windows programming).

My guess is if you used "highestAvailable" and a non-Admin user was running CE, it would run at the same non-elevated level that the user is.  Since I'm bad and run as admin more often than not, the UAC is triggered since "highest" would be "admin" for me.

I'm wondering if using "asInvoker" has the same result as "highestAvailable" for non-Admin users.. since the highest available is whatever the user's default rights are?

Everyone is a USER, just some users have the ability to atain higher privileges. So we hit the same problem here, the application runs at your current privilege level.

At any rate, I was able to do a build for myself that fixes an annoyance I had, so I'm happy even if you guys decide to leave it as "highestAvailable".  Smiley

As for what you said about being 'stuck' once elevated, that seems consistant with the way I've seen some apps behave.  I don't know if it's just because they don't try to de-elevate or can't, but my hunch is that they can't.

Windows does not allow applications to change their privilege level after they are run, what they are invoked with is what they run as, hence the millions of programs that are written to run as admin.

I think Gryffyn's idea of a separate program makes sense. A command-line program could be used just to set those settings. CE would just invoke it to change the settings; it would cause a UAC prompt, but CE would not be elevated.

Yes I think this is possibly the way to go.
I have had a thought though, can the option be set in the HKCU branch of the registry? is this area writeable by the current user (would seem like madness if it wasnt)?
Logged
chubio
Prospector
*
Posts: 1


« Reply #11 on: December 08, 2009, 12:12:20 am »

Alright.. got VS2005 and SVN installed at home, checked out CE and changed the manifest from 'highestAvailable' to 'asInvoker' and, I believe, it works without trying to elevate privs and triggering UAC.


Gryffyn

Could you post your modified binaries on this thread while the development team decides how they'll handle the side effects on the following releases?

Thnx
Logged
jeffjensen
Prospector
*
Posts: 1


« Reply #12 on: December 09, 2009, 01:41:11 am »

For me the most irritating part with CE and Windows 7 is the inability to edit files on network drives.  I hope you are successful at fixing that (and thanks for trying!)!
Logged
Gryffyn
Prospector
*
Posts: 8


« Reply #13 on: December 13, 2009, 11:35:47 pm »

For what it's worth, here's the main EXE that I compiled.  I tried using it on my machine at work and got an error that seems to be related to maybe not having the .NET 3.5 distro or something at work.  I have it on my home PC from the VS install I guess.   Like I believe I mentioned, kind of a VS noob, even if I have other programming experience. Smiley   I didn't do a full install package or anything, just the main build.   If I get time, I'll take another shot at it some day.

Disclaimer: I have no relation with the CE/EE developers, don't blame them if use this binary and something bad happens.  I can promise you that it's clean and works 100% on my computer, but be smart and don't take my word for it.  Do your malware scans, etc...  Smiley

The only thing different about this and the current build (263) should be the one change in the manifest mentioned.  All other support files are the same so you can use the regular install for those and replace the main EXE.

* cedt-win7.zip (406.04 KB - downloaded 756 times.)
Logged
straylight
Prospector
*
Posts: 1


« Reply #14 on: January 11, 2010, 08:54:35 pm »

Hi guys.

I've had the same issue. I downloaded the earlier version (3.6) and all the problems disappeared. Just thought I'd post this for anyone else reaching this thread via Google. Verson 3.6 can be found here:

http://www.crimsoneditor.com/english/download.html
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.134 seconds with 18 queries.