3
I am currently trying to create a context menu item so that you can click on an executable file and select a scan option from the context menu, a command line program will then be launched with the working directory defined as C:\Program Files\Scanner and the input file (file I right-click on) will be the insert in the %1% parameter.
[HKEY_CLASSES_ROOT\exefile\Shell\Scan\command]
@="C:\\Windows\\System32\\cmd.exe /k cd "C:\\Program Files\\Scanner" & "C:\\Program Files\\Scanner\\scanner.exe" "%1%""
I am having a nightmare trying to get this work, any help would be greatly appreciated
@James: One thing I forgot. You must use
cd /d
, notcd
, otherwise the command will fail when the file is on another drive. – user1686 – 2011-06-06T12:13:46.730