Solved Add %1 to data in REG ADD

October 22, 2013 at 02:57:16
Specs: Windows 7
Im trying to add a new registry key and i was able to do it whereas when i tried the modify the data im not able to add %1 to the data .
For eg:- i need the following value to be present in the data "D:\\computing.bat %1" whereas only "D:\\computing.bat" is present in the data field.

My Snippet:-
REG ADD HKEY_CLASSES_ROOT\VSTA.disco.8.0\shell\Build\Command /d D:\\computing.bat %1


See More: Add %1 to data in REG ADD

Report •

#1
October 22, 2013 at 11:35:59
✔ Best Answer
try using %%1 see if its an escape issue. Not sure what you are attempting to do with this, as it seems that you would have to define the parameter.

::mike

message edited by mikelinus


Report •

#2
October 22, 2013 at 13:57:48
Not quite sure what you are doing but try this:

"D:\\computing.bat" "%1"

That is the usual format in the registry itself - note the one space.

Always pop back and let us know the outcome - thanks

message edited by Derek


Report •

#3
October 22, 2013 at 20:12:11
You might be missing a level in the reg hierarchy, judging from the absence of /V parameter. A key needs to have valuenames, and each valuename references the data. If you add a key, and you want to store data in it, then you need to add a valuename before you can add data, like: REG ADD HKLM\sam\test /V valuename /D firstvaluedfata.
Or, maybe, I'm way off orbit as usual. This whole post is confusing me...

Report •

Related Solutions

#4
October 23, 2013 at 06:32:23
I am still not sure what the point would be, It seems like if the registry uses a file and then a parameter, but the parameter is not being used that the file would fail...

::mike


Report •

Ask Question