Jump to content

Recommended Posts

Posted

I'm trying to use a CMD to do things when I right click on a file but how to get the filename of the file that I click on?

eg:

- I put a utility name base64.exe in windows\system32

- I right click on a file name 01.base64 reside in any folder and choose "Base64 Decode" (which is done through registry entry below)

HKLM, "%CLASS%\.Base64\shell\Base64Dec", , , "Base64 Decode"
HKLM, "%CLASS%\.Base64\shell\Base64Dec\command", , , "base64.cmd"

The base64.cmd contains the following code:

@echo off
:BaseDec
Mode 80,12 & Color f1
ECHO Please input the desire new output filename including the extention.
SET NewName=
SET /P NewName=Please input the desire new output filename including the extention.
base64 -d "%1" "%NewName%"
EXIT

:Base64En
base64 -e "%1" "%1.Base62"
EXIT

As you all can see, the %1 does not work here. Please help!


Posted
HKLM, "%CLASS%\.Base64\shell\Base64Dec", , , "Base64 Decode"
HKLM, "%CLASS%\.Base64\shell\Base64Dec\command", , , "base64.cmd"

I may have the syntax off slightly but perhaps you need a %1 in there:

HKLM, "%CLASS%\.Base64\shell\Base64Dec", , , "Base64 Decode"
HKLM, "%CLASS%\.Base64\shell\Base64Dec\command", , , "base64.cmd %1"

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...