Cascading Context Menu Explorer CommandStore Missing - contextmenu

I'm trying to create a new cascading menu for the windows context menu but in my registry on Windows Vista I do not have a CommandStore Key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\ and if I add one it does not work.
For instance if I was to say do this:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\Shell\Menu]
"MUIVerb"="ZIP"
"SubCommands"="SFX"
"icon"="c:\Program Files\7-Zip\7z.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SFX]
#="Compress To Exe"
"icon"="c:\Program Files\7-Zip\7z.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SFX\command]
#=""c:\Program Files\7-Zip\7z" u -mx9 -sfx -r -t7z "%1.exe" "%~f1""
All I get is a menu item called ZIP but no sub menus and an error when clicked.
This will not work, am I doing something wrong, or is there a better way to do this?

As far as I know this can be done only with Windows 7 (and potentially later versions)

Related

TSaveDialog Options ofAllowMultiSelect doesn't work properly on a W10 system

I have an old application, untouched for a long time, built with C++ Builder 2009, that still works fine.
That is to say ..
Today I noticed some of the TSaveDialog->Options don't work as intended on my Windows 10 system. To make sure I'm not dreaming I tested the same application on an older Windows version (I tried XP) and there it worked perfectly fine as intended.
The TSaveDialog instance is setup at design time with Options: [ofHideReadOnly,ofAllowMultiSelect,ofEnableSizing]
I noticed today (on Windows 10) that ofAllowMultiSelect doesn't work anymore ?
Instead ofOverwritePrompt is (incorrectly) used !
In other words I cannot select two ore more files anymore and when I select a file that already exists I first get a 'Confirm Save As' dialog.
When I compile again on my Windows 10 system, using C++ Builder 2009, in debug mode and inspect Options, the debugger seems to (still) properly see ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing, yet the problem persists. So it's not as if the values changed somehow ?
When I try at runtime:
SaveDialog->Options.Clear() ;
SaveDialog->Options << ofHideReadOnly << ofEnableSizing << ofAllowMultiSelect ;
the problem also persists !
When I remove ofAllowMultiSelect (at run time or at design time) 'Confirm Save As' is not shown anymore on an existing file (but I obviously also still can't select multiple files).
I'm flabbergasted by this to be honest ? Not sure what to do next ?
I have no option to test a more recent c++ version but I'm also having difficulties comprehending how the compiler could be responsible here.
Any guidance appreciated.
Delphi tag added because of VCL overlap between c++ Builder and Delphi
On Windows Vista and later, IF AND ONLY IF all of these conditions are met:
the global Dialogs::UseLatestCommonDialogs variable is true
and the TSaveDialog::Template property is NULL
and the TSaveDialog::OnIncludeItem, TSaveDialog::OnClose, and TSaveDialog::OnShow events have no handlers assigned
Then TSaveDialog will internally use the Win32 IFileSaveDialog interface, where the ofAllowMultiSelect option will be mapped to that dialog's FOS_ALLOWMULTISELECT option, which is NOT SUPPORTED by IFileSaveDialog, only by IFileOpenDialog, per the documentation:
FOS_ALLOWMULTISELECT
Enables the user to select multiple items in the open dialog. Note that when this flag is set, the IFileOpenDialog interface must be used to retrieve those items.
If the above 3 conditions are not satisfied, then TSaveDialog will internally use the Win32 GetSaveFileName() function instead, where the ofAllowMultiSelect option will be mapped to that dialog's OFN_ALLOWMULTISELECT option, which IS SUPPORTED by GetSaveFileName() 1.
That is why you are seeing behavioral differences when running your app on Windows XP vs Windows 10.
So, if you want the old TSaveDialog behavior on newer Windows versions, you need to make sure at least 1 of those 3 conditions is not satisfied. For instance, by setting UseLatestCommonDialogs=false before calling SaveDialog->Execute(), or by assigning an (empty) event handler to one of the OnIncludeItem/OnClose/OnShow events.
Or, you could simply call GetSaveFileName() directly, instead of using TSaveDialog at all.
1: However, just note that on Vista+, GetSaveFileName() is just a wrapper for IFileSaveDialog, and is provided only for backwards compatibility. So, you still might not get the exact behavior you want even if you did use GetSaveFileName() on Windows 10.
On a side note: this code does not work the way you think it does:
SaveDialog->Options.Clear();
SaveDialog->Options << ofHideReadOnly << ofEnableSizing << ofAllowMultiSelect;
The Options property is not actually updated! In both statements, the Options property is read from, returning a temporary TOpenOptions, which you are then modifying, but not assigning back to the Options property. IOW, the code is effectively doing the following:
TOpenOptions temp1 = SaveDialog->Options;
temp1.Clear();
TOpenOptions temp2 = SaveDialog->Options;
temp2 << ofHideReadOnly << ofEnableSizing << ofAllowMultiSelect;
So, to update the Options property correctly, use this instead:
SaveDialog->Options = TOpenOptions() << ofHideReadOnly << ofEnableSizing << ofAllowMultiSelect;

How to remap "Go to definition" and "Rename all instances" on ZeroBrane Studio?

I'm using ZeroBrane Studio 1.30
Is there any way to remap the Ctrl/Cmd-DoubleClick shortcut to something on the keyboard, like Ctrl-R? (Without the mouse click) on the user preferences?
At the same time, is there a way to remap the "Go to definition" shortcut to something else than Ctrl/Cmd+Alt+Click.
I already tried these with no luck:
keymap[ID.RENAMEALLINSTANCES] = "Ctrl-R"
editor.keymap[#editor.keymap + 1] = {('R'):byte(), wxstc.wxSTC_SCMOD_CTRL, ID.RENAMEALLINSTANCES}
Also instead of ID.RENAMEALLINSTANCES I've tried ID_RENAMEALLINSTANCES with no luck.
Not in 1.30 (which is the currently released version). This functionality has already been added and will be available in the next release (or you can use the current master branch).

Is there a backdoor to AX? AX 2012 R2 Class Application startupPost method customized code error abort AX client

AX 2012 R2 Class Application startupPost method customized code error abort AX client.
How to enter AX again? i can't login again to correct the wrong coding because of this fatal error.
"Microsoft Dynamics AX client has stopped working.
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."
I cannot enter my AX anymore! Why?
because i put a wrong code in Class Application StartupPost method
// No SYS code must exist in this method
// If you need the startup command, look in the class SysStartupCmd
void startupPost()
{
// <GTH>
Args args = new Args();
#isoCountryRegionCodes
if (hasGUI()
&& isRunningMode()
&& !SysModelStore::isInstallMode()
&& SysCountryRegionCode::isLegalEntityInCountryRegion([#ISOTH])
&& isConfigurationkeyEnabled(configurationKeyNum(TaxThailandGovCertification)))
{
TaxThaiGovCertificationHelper::promptSysAboutForm(false);
}
// </GTH>
new MenuFunction(MenuItemDisplayStr(RBMT_Main),MenuItemType::Display).run(Args);
}
my problem code is
*new MenuFunction(MenuItemDisplayStr(RBMT_Main),MenuItemType::Display).run(Args);*
yeah i should have put it in an 'if (curUserId() == "me")'
yeah i should have ...
it should have never been there.
i modified in the USR layer. Tried to login again but the AX client can't enter into AX so i can't modify anything. Tried to login in lower layer but still i can't come in.
tried to use Visual Studio 2010 Application Explorer to save class to XPP and open notepad to modify and reload to application explorer, but still can't login.
I am unwelcome.
Is there a way in to AX without going through Class Application startupPost method?
it's like i can't enter my home even if i got my keys.
more problem is i have 2 other developer mates who can't login so they're really pissed, they need their codes too.
Please anybody knows how to overpass Class Application startupPost method?
I can't get in my AX!
Thanks very much.
ElanG.
its solved by using a Configuration command to run at kernal startup: -NOAUTO
1.) Open Microsoft Dynamics AX Configuration Utility.
2.) in Tab [General], the entry field "Configuration command to run at kernel startup"
3.) type the command -noauto
4.) run MS Dynacmics AX
Thanks.
:)
In case you do not need the usr layer anymore you can just delete/uninstall the usr model. Provided you left it on the standard model. Then try again. Anyway I hope you have daily backups so if deleting the usr layer is not an option for you or if it did not solve your problem you can just restore a backup right?

Keyboard shortcuts for Compare with Latest Version / Compare with Workspace version in Visual Studio 2012

This was easy in VS 2010, but I can't find the right items in VS 2012.
I'd like to set keyboard shortcuts for the Compare With Latest/Workspace Version context menu items in the TFS Pending Changes view. What's the item I should select in the Keyboard section of the Tools dialog?
(This was tested with Visual Studio 2012 Update 1)
Tools > Options > Environment > Keyboard >
Under Show commands containing search and assign key combinations to:
TeamFoundationContextMenus.PendingChangesPageChangestoInclude.TfsContextPendingChangesPageCompareWithPreviousVersion - compares pending item in context to previous version.
TeamFoundationContextMenus.PendingChangesPageChangestoInclude.TfsContextPendingChangesPageCompareWithLatestVersion - compares pending item in context to latest version.
TeamFoundationContextMenus.PendingChangesPageChangestoInclude.TfsContextPendingChangesPageCompareWithWorkspaceVersion - compares pending item in context to workspace version.
File.TfsCompare - open the compare dialog.
For me, this worked:
VS > Tools > Options > Environment > Keyboard > Show Commands Containing: Team.Git.CompareWithUnmodified
By assigning a shortcut key Ctrl+\, Ctrl+\ to this command ( Team.Git.CompareWithUnmodified) I can now compare my current file (the file that is open in the editor) to the previous version of the file by pressing the shortcut key Ctrl+\, Ctrl+\; no need to find the file in solution explorer, then right-click the file then select Compare.
(you can choose your own shortcut key of course)
Just a note on different behaviour:
Team.Git.CompareWithUnmodified works for me because I am using TeamExplorer in VisualStudio but I use GIT as the underlying source code repository.
Tfs.FileCompare could also work in other scenarios (i.e. if you don't use Git, but use VSTS or TFS as your source control provider).
Other: the command will be different if you use another source control provider.
While you have the file open use this combo to compare with Workspace version:
Menu, O, C, Enter
(This performs Right Click > Source Control > Compare > Workspace Version)
If your keyboard doesn't have a Menu key, do this:
Set the hotkey for File.TfsCompare to Ctrl+\ Ctrl+\
Use the combo: Ctrl+[ Ctrl+S Ctrl+\ Ctrl+\ Enter

Toggle show/hide system files from Delphi

Is there any built-in Delphi function to toggle between show and hide system files (protected operating system files) under Windows? Or maybe a registry entry in HKCU? Or maybe an API function able to do this?
I don't ask for a trick to show/hide this kind of files in my application, I need something to work even for Windows Explorer.
Operating systems : Win XP SP1+, Vista, 7
I don't mind even if I have to pass over an UAC notification.
This is a gross hack use it on your own risk
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
Value Name: ShowSuperHidden
Data Type: REG_DWORD (DWORD Value)
Value Data: (1 = show hidden, 2 = do not show)
This registry value enables you to show or hide the system files.Thus those files with the attribute hidden

Resources