Forum: SuRun English speaking RSS
Desktop context menu
Page:  1  2  next 
Frank1 #1
Member since Jan 2009 · 19 posts · Location: Australia
Group memberships: Mitglieder
Show profile · Link to this post
Subject: Desktop context menu
I have used SuRun for a little while now on 2 machines. It appears to work fine.
I do, however, have a little problem:
The context menu on the desktop does not have "Control panel as administrator". I have the checkbox in General Settings Shell Integration ticked.
This is on both my machins. I am running V1.2.0.5 on Windows XP Pro SP3.
Is there any other setting that I am missing?
Thanks
Kay (Administrator) #2
User title: Weltverbesserer
Member since Nov 2007 · 1507 posts · Location: Magdeburg
Group memberships: Administratoren, Mitglieder
Show profile · Link to this post
There's no other setting.

I've had an eMail contact saying the same with a German Windows.
But I just could not figure out why he did not see SuRuns shell extension in the Desktop's context menu.

Maybe another shell extension blocks SuRun... but I can't say anything for sure.
Frank1 #3
Member since Jan 2009 · 19 posts · Location: Australia
Group memberships: Mitglieder
Show profile · Link to this post
SuRun obviously places entries into the registry for the Desktop Context Menu Control Panel entry.
Can you please let me know what these entries are so I can check to see if this is done?
Thanks
Kay (Administrator) #4
User title: Weltverbesserer
Member since Nov 2007 · 1507 posts · Location: Magdeburg
Group memberships: Administratoren, Mitglieder
Show profile · Link to this post
SuRun installs it's context menu extension into "HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuRun". Windows calls this extension in SuRunExt.dll when the context menu is about to be displayed.
I atached a slightly more verbose SuRun 1.2.0.6 Beta 13 to this post.

If you use this SuRun and right click the desktop, you should see something in the Windows Debug output (that you can visualize with DebugView running as Administrator) like this:
F:\SuRun\SuRunExt\SuRunext.cpp(390): CShellExt::Initialize(<your desktop folder>,,)
If you don't see this, the SuRun shell extension is not called by Windows.
What do You see?
The author has attached one file to this post:
SuRun1206b13a.zip | Save   622.4 kBytes, downloaded 111 times
Frank1 #5
Member since Jan 2009 · 19 posts · Location: Australia
Group memberships: Mitglieder
Show profile · Link to this post
Kay, I downloaded your special SuRun and installed o/k.
At this stage there is no special message.

To launch: F:\SuRun\SuRunExt\SuRunext.cpp(390): CShellExt::Initialize(<your desktop folder>,,)
I tried to make a shortcut but does not allow it because it does not understand:
F:\SuRun\SuRunExt\SuRunext.cpp(390):

I must admit I don't understand how windows can launch it either.
At this stage I am stuck.
Thanks

PS. The registry entry you specified exists on my system.
This post was edited on 2009-01-26, 09:32 by Frank1.
Kay (Administrator) #6
User title: Weltverbesserer
Member since Nov 2007 · 1507 posts · Location: Magdeburg
Group memberships: Administratoren, Mitglieder
Show profile · Link to this post
There's a misunderstanding:

  • Just use the SuRun as usual
  • install and run "As Admin" Sysinternals DebugView
  • right click on you desktop
  • DebugView should show the message above (or at least something else related to SuRun)
Frank1 #7
Member since Jan 2009 · 19 posts · Location: Australia
Group memberships: Mitglieder
Show profile · Link to this post
Sorry about the misunderstanding.
Now that it's working, this is the output:
[1460] F:\SuRun\SuRunExt\SuRunext.cpp(390): CShellExt::Initialize(D:\System_Data\Desktop,,)
Of course still no Control Panel on the context menu.
Hope this helps.
Thank you
Kay (Administrator) #8
User title: Weltverbesserer
Member since Nov 2007 · 1507 posts · Location: Magdeburg
Group memberships: Administratoren, Mitglieder
Show profile · Link to this post
Quote by Frank1:
CShellExt::Initialize(D:\System_Data\Desktop,,)

This is it! I guess your Desktop is not stored in that folder.
(Usually the desktop is in "C:\Documents and Settings\<user name>\Desktop")
SuRun asks Windows for the Desktop folder of the current user and if that folder is the same as in "CShellExt::Initialize(<folder>,,)", SuRun shows "control panel as administrator" in the context menu.

I want to create that scenario here to see if I can change SuRun to handle that.

What is the "D:\System_Data\Desktop" folder used for on your system?
Frank1 #9
Member since Jan 2009 · 19 posts · Location: Australia
Group memberships: Mitglieder
Show profile · Link to this post
I have changed, some years ago the location of my Desktop files to:
D:\System_Date\Desktop by entering it in:
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common Desktop"
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "Common Desktop"

The reason for doing this is that I wanted the desktop files to be in a common folder, with Favorites, mail files etc. for backup purposes. Also I wanted the desktop to be the same for the limited user and the admin user, since I am both.

It sounds like you have hard coded the desktop location in the SuRun software where it is usually found.
I don't really want to put it back to C:\Documents and Settings\User\Desktop if I don't have to since my system is working great the way it is (except for SuRun at the moment).
Thanks Kay.
Kay (Administrator) #10
User title: Weltverbesserer
Member since Nov 2007 · 1507 posts · Location: Magdeburg
Group memberships: Administratoren, Mitglieder
Show profile · Link to this post
Quote by Frank1:
It sounds like you have hard coded the desktop location in the SuRun software where it is usually found.

No. SuRun calls SHGetFolderPath(0,CSIDL_DESKTOP,0,SHGFP_TYPE_CURRENT,s); to get the location of your Desktop, then it compares this to the currently clicked folder name. If the names are the same, the menu ist displayed.

In your case SuRun indeed should display the Menu.

I've put even more verbosity into SuRun 1.2.0.6 Beta 13 and attached it to that message.

On my work system the debug output looks like that:
F:\SuRun\SuRunExt\SuRunext.cpp(390): CShellExt::Initialize(C:\Dokumente und Einstellungen\Kay\Desktop,,)
F:\SuRun\SuRunExt\SuRunext.cpp(408): Compare Desktop folder (C:\Dokumente und Einstellungen\Kay\Desktop) to clicked folder(C:\Dokumente und Einstellungen\Kay\Desktop) == 1
F:\SuRun\SuRunExt\SuRunext.cpp(445): CShellExt::QueryContextMenu Desktop clicked == 1
F:\SuRun\SuRunExt\SuRunext.cpp(450): CShellExt::QueryContextMenu Inserting CplAsAdmin context Menu!
F:\SuRun\SuRunExt\SuRunext.cpp(495): CShellExt::GetCommandString

Could you post yours here?

Thanks

Kay
The author has attached one file to this post:
SuRun1206b13b.zip | Save   622.8 kBytes, downloaded 113 times
Frank1 #11
Member since Jan 2009 · 19 posts · Location: Australia
Group memberships: Mitglieder
Show profile · Link to this post
Kay, I think you found the problem now. Here is the output:

[2296] F:\SuRun\SuRunExt\SuRunext.cpp(390): CShellExt::Initialize(D:\System_Data\Desktop,,)
[2296] F:\SuRun\SuRunExt\SuRunext.cpp(408): Compare Desktop folder (C:\Documents and Settings\Frank\Desktop) to clicked folder(D:\System_Data\Desktop) == 0
[2296] F:\SuRun\SuRunExt\SuRunext.cpp(445): CShellExt::QueryContextMenu Desktop clicked == 0
[2296] F:\SuRun\SuRunExt\SuRunext.cpp(469): CShellExt::QueryContextMenu Inserting CmdAsAdmin context Menu!
[2296] F:\SuRun\SuRunExt\SuRunext.cpp(475): CShellExt::QueryContextMenu Inserting ExplorerAsAdmin context Menu!
[2296] F:\SuRun\SuRunExt\SuRunext.cpp(495): CShellExt::GetCommandString
[2296] F:\SuRun\SuRunExt\SuRunext.cpp(495): CShellExt::GetCommandString

I don't know where the "C:\Documents and Settings\Frank\Desktop" comes from since I changed all those references in the registry to "D:\System_Data\Desktop".
Hope you can find a way to overcome it.
Thanks
Kay (Administrator) #12
User title: Weltverbesserer
Member since Nov 2007 · 1507 posts · Location: Magdeburg
Group memberships: Administratoren, Mitglieder
Show profile · Link to this post
Ok, I changed the Desktop folder detection so that it checks for the "current users" and for the "all users" folder.
It should work now... at least I hope so ;-)
The author has attached one file to this post:
SuRun1206b13c.zip | Save   622.8 kBytes, downloaded 115 times
Cosmo #13
Member since Mar 2008 · 451 posts
Group memberships: Mitglieder
Show profile · Link to this post
@Frank1:

You can use TweakUI to change the place of the Desktop folder. Perhaps it helps, if you redo this with this tool. To be found here: http://www.microsoft.com/windowsxp/downloads/powertoys/xpp…
Thomas
Frank1 #14
Member since Jan 2009 · 19 posts · Location: Australia
Group memberships: Mitglieder
Show profile · Link to this post
Cosmo, I have TweekUI V2.1, which is the latest. I can't find the setting where the desktop location can be changed.

Kay, your latest modification works. I had some problems getting it to work. My fault. There are 2 issues:
1) Character case in the different parts of the registry causes a comparison failure:
[2252] F:\SuRun\SuRunExt\SuRunext.cpp(390): CShellExt::Initialize(D:\System_Data\Desktop,,)
[2252] F:\SuRun\SuRunExt\SuRunext.cpp(408): Compare Desktop folder (C:\Documents and Settings\Frank\Desktop) to clicked folder(D:\System_Data\Desktop) == 0
[2252] F:\SuRun\SuRunExt\SuRunext.cpp(413): Compare common Desktop folder (d:\System_Data\Desktop\) to clicked folder(D:\System_Data\Desktop) == 0
[2252] F:\SuRun\SuRunExt\SuRunext.cpp(451): CShellExt::QueryContextMenu Desktop clicked == 0
[2252] F:\SuRun\SuRunExt\SuRunext.cpp(475): CShellExt::QueryContextMenu Inserting CmdAsAdmin context Menu!
[2252] F:\SuRun\SuRunExt\SuRunext.cpp(481): CShellExt::QueryContextMenu Inserting ExplorerAsAdmin context Menu!
[2252] F:\SuRun\SuRunExt\SuRunext.cpp(501): CShellExt::GetCommandString

Notice on the 3rd line d: and D:

2) A trailing back slash in one location and no back slash in the other location also causes the comparison to fail.

Now, with all registry locations having the same case and trailing (no training) back slashes it works:
[3672] F:\SuRun\SuRunExt\SuRunext.cpp(390): CShellExt::Initialize(D:\System_Data\Desktop,,)
[3672] F:\SuRun\SuRunExt\SuRunext.cpp(408): Compare Desktop folder (C:\Documents and Settings\Frank\Desktop) to clicked folder(D:\System_Data\Desktop) == 0
[3672] F:\SuRun\SuRunExt\SuRunext.cpp(413): Compare common Desktop folder (D:\System_Data\Desktop) to clicked folder(D:\System_Data\Desktop) == 1
[3672] F:\SuRun\SuRunExt\SuRunext.cpp(451): CShellExt::QueryContextMenu Desktop clicked == 1
[3672] F:\SuRun\SuRunExt\SuRunext.cpp(456): CShellExt::QueryContextMenu Inserting CplAsAdmin context Menu!
[3672] F:\SuRun\SuRunExt\SuRunext.cpp(501): CShellExt::GetCommandString

The Control Panel as Administrator now shows on the context menu. However, there is a major problem. When I hover the mouse over the Control Panel entry on the context menu, it gets highlighted, and then promptly crashes explorer. The system tray, start menu etc and all desktop icons disappear. I recover by launching Task manager with CRTL-ALT-DEL and then on the menu Shutdown\Log off Frank. Then log in again.
Turning out to be more complicated.
Cosmo #15
Member since Mar 2008 · 451 posts
Group memberships: Mitglieder
Show profile · Link to this post
Quote by Frank1:
Cosmo, I have TweekUI V2.1, which is the latest. I can't find the setting where the desktop location can be changed.
In TweakUI:
My Computer -> Special Folders, select Desktop (obviously).
Thomas
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next 
Go to forum
Not logged in. · Lost password · Register
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 155.2 ms (115.1 ms) · 134 database queries in 24.1 ms
Current time: 2019-05-24, 20:04:10 (UTC +02:00)