2

I would like to create a volatile registry key (https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms891450(v=msdn.10)) in a Powershell script? I'm not sure if it's possible from the reading I've done. Does anyone have any code if it is possible?

2

2 Answers 2

0

Not sure if this is what you looking for but you can use this command in CMD or powershell:

reg add "HKCU\Volatile Environment" /v MyVolatilVariable /d MyVolatilVariabledata /t reg_sz
2
  • Good thinking! This would certainly do. I guess it's only user specific rather than machine but for my purposes it should be OK. Thanks. Commented Apr 23, 2018 at 12:54
  • 1
    this is a permanent registry key, not a volatile one.
    – Chris
    Commented Sep 9, 2023 at 0:36
1

you could use this commandline tool (with or without Powershell) to create volatile registry keys: https://github.com/christian-korneck/mkmemkey

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .