Run command from context menu without showing console

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"

Big McLargeHuge

Posted 2018-04-10T18:44:05.200

Reputation: 449

What does the cmd window show as it's contents? – DavidPostill – 2018-04-10T19:57:25.300

@DavidPostill it shows the command. – Big McLargeHuge – 2018-04-10T20:17:19.010

Answers

-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!

user893060

Posted 2018-04-10T18:44:05.200

Reputation: