Radish Posted May 18, 2015 Share Posted May 18, 2015 HI,I'm working on script (compiled to executable) that will be launched by a right-click Context Menu item in Windows Explorer. Basically the exe looks for highlighted/selected folders and files in Explorer and then writes to a text file the full paths of the folders/files that were selected when the exe is launched. If I launch the exe manually then it works fine - does what it is meant to do. However, if I launch the exe from the Context Menu it messes up big-time. For example let's say I have two folders and one file selected in Explorer then use the Context Menu to launch the exe then instead of launching the exe once the exe is launched three times (once for each of the number of items that have been selected in the Explorer window). And, of course, I have three duplicate enteries in the output text file for each of the Folders\Files selected. It can't be the exe that is doing this - it must be something that Windows OS is doing.The entries that I made in the registry to give the right-click Context Menu (and subsequently exported from the registry are as follows): Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\*\shell\Checksums][HKEY_CLASSES_ROOT\*\shell\Checksums\command]@="\"E:\\AutoIT Scripts\\Testing\\Checksums_x64.exe\""[HKEY_CLASSES_ROOT\Directory\shell\Checksums][HKEY_CLASSES_ROOT\Directory\shell\Checksums\command]@="\"E:\\AutoIT Scripts\\Testing\\Checksums_x64.exe\"" Does anyone know why this multiple launching of the exe file is happening and how to prevent it? (If it only launched the exe file once then everything would be fine.) Link to comment Share on other sites More sharing options...
Tripredacus Posted May 18, 2015 Share Posted May 18, 2015 It sounds exactly like an error in the script. At least, I can say I had something similar happen before, but opened multiple CMDs instead. Link to comment Share on other sites More sharing options...
Radish Posted May 18, 2015 Author Share Posted May 18, 2015 No, I don't think it is an error in the script/exe. I've checked it very carefully, it's a short script so that is easy to do. If it was an error in the script then that error would show up when the script/exe was launched manual. However, when the exe is launched manually no errors occur. I really do think this is something Windows operating system is doing. Link to comment Share on other sites More sharing options...
bphlpt Posted May 18, 2015 Share Posted May 18, 2015 List the script. Explain exactly where the script is placed, including permissions, and how you launch it, both manually and via the Context Menu. Then maybe someone else can try it and see if they can replicate your issue, or point out your misunderstanding of the situation. Cheers and Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now