How can I write a registry key from VS post build event?

One of the projects I'm working on is to read a registry key to determine a value. Typically, the value will be recorded during installation.

Since I want to run the project locally (without installation), I want to write this value after the build is complete.

Is there an easy way to do this?

+3
source share
2 answers

Searching the Internet I found this cool tool that comes with REG.EXE windows

Using it from VS is simple - REG ADD HKLM \ SOFTWARE \\ / v NUnitDir / t REG_SZ / d / f

+5
source

, post build.


, post build:
regedit /s $(ProjectDir)test.reg

/s .

+1

Source: https://habr.com/ru/post/1742775/


All Articles