user1924244
user1924244

Reputation: 135

Process %1 to registry in batch script

I need to add this value %~dp0scss-formatter.bat %1 (%~dp0 is folder path) and that part %1 should saved to this value too (not as file name, but string). My whole .bat file looks like this:

@echo off
reg add "HKEY_CLASSES_ROOT\scss_auto_file\shell\SCSS Format\command" /ve /t REG_SZ /d "%~dp0scss-formatter.bat %1" /f

It works well, except that %1. In default value I need that %1, so, is here any way how to do it? I mean, in registry that key will have default value, for example: D:\Applications\scss-formatter.bat %1.

Upvotes: 1

Views: 579

Answers (1)

user1924244
user1924244

Reputation: 135

I found it. Instead of %1 use %%1.

Upvotes: 3

Related Questions