1

I'm trying to add a context menu entry that will open a file for edit in Perforce. It works, but I'm wondering if there's a way to execute the command without briefly showing the command window. Here's what I have:

HKCU
    Software
        Classes
            *
                shell
                    p4
                        (Default) = Open file for edit in Perforce
                        command
                            (Default) = C:\Program Files\Perforce\p4.exe edit "%1"
  • What does the cmd window show as it's contents? – DavidPostill Apr 10 '18 at 19:57
  • @DavidPostill it shows the command. – David Kennedy Apr 10 '18 at 20:17
-1

How about running a batch file silently through your context menu using one of the following methods: https://www.raymond.cc/blog/hidden-start-runs-batch-files-silently-without-flickering-console/

such as Hidden Start, as there is an option to hide console window:

Hidden Start

download Hidden Start here

Another free option would be NirCMD. The exec and hide commands are used to run the script or batch file and hide any console from opening.

One just use elevatecmd if you require administrator privileges for the batch file.

enter image description here

http://www.nirsoft.net/utils/nircmd.html (website)

http://www.nirsoft.net/utils/nircmd.zip (download x32)

http://www.nirsoft.net/utils/nircmd-x64.zip (download x64)

http://www.nirsoft.net/utils/nircmd2.html#using (helpfile)

Otherwise please read more options here: https://www.raymond.cc/blog/hidden-start-runs-batch-files-silently-without-flickering-console/

Hope this help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.