1.

Solve : How to use filename without extension in registry editor??

Answer»

Hi!

I have simple problem...

As everybody knows in cmdline we can use parameter %~n1% to get filename from %1%

I tried it with registry editor, never succesfull...

My key has value:
CMD /K java -jar "I:\Program Files\Java\jre7\bin\kickass.jar" "%1%" -o "%~n1%.bin"

result of file e.g. file.asm is always %~n1%.bin

when I use:

cmd /k java -jar "I:\Program Files\Java\jre7\bin\kickass.jar" "%1%" -o "%1%.bin"

result of input file.asm is file.asm.bin

How to use %1% parameter without extension in regedit?

'Cause in cmdline it works - but I don't want to create batch...

Many thanks for EVERY help, reply or comments.

MiroThe values in the registry are read by different programs. In this case, the shell reads the values.

The shell, unsurprisingly, does not use any NT Command extensions. it's list of possible substitutions are (taken from here

Quote

// %* - replace with all parameters
// %~ - replace with all parmaters starting with and following the second parameter
// %0 or %1 the first file parameter. For example “C:\Users\Eric\Destop\New Text Document.txt”. Generally this should be in quotes and the applications command line parsing should accept quotes to disambiguate files with spaces in the name and different command line parameters (this is a security best practice and I believe mentioned in MSDN).
// %<n> (where N is 2 - 9), replace with the nth parameter
// %s – show command
// %h – hotkey value
// %i – IDList stored in a shared memory handle is passed here.
// %l – long file name form of the first parameter. Note win32 applications will be passed the long file name, win16 applications get the short file name. Specifying %L is preferred as it avoids the need to probe for the application type.
// %d – desktop absolute parsing name of the first parameter (for items that don’t have file system paths)
// %v – for verbs that are NONE implies all, if there is no parameter passed this is the working directory
// %w – the working directory
Hi!

Many many thanks for this link! I have seen references to many possibilities how to edit registry BETTER than I know...

But main thing was not found....

Quoted parameters tested (maybe incorrectly), but no one give filename only... always is there extension...

So, if I can please again: How to modify %1% parameter to filename only in regedit?

Many thanks for all.

MiroQuote from: MIRKOSOFT on December 04, 2012, 10:05:14 AM
So, if I can please again: How to modify %1% parameter to filename only in regedit?

You can't.OK, simple direct answer.

No more.However, you could make the regedit command point at a batch file, instead. Then the batch file could invoke the assembler.My last entry in this forum:

Everytime I found here anybody who can help...

Today evening is not only this reply, this evening is in my life full of hate.

As last: I'm Visual Basic programmer, Assembly programming I know, but it's without friends too hard.

Goddbye everybody, I'm fading away...


Discussion

No Comment Found