none
VB equivalent of "reg load" and "reg unload" command lines RRS feed

  • Question

  • What is the VB method of doing "reg load" and "reg unload"

    Basically mounting a Windows image, and want to load the software hive from file into my registry, make changes and then unload it again

    Can do it fine from command line, but prefer to do it using a VB method rather than have to use command line in my app using process.startinfo.filename / arguments etc

    Any ideas?

    Thanks


    Darren Rose

    Friday, December 22, 2017 11:39 PM

All replies

  • reg load/unload calls

    NtLoadKey()/NtUnloadKey()

    Saturday, December 23, 2017 12:53 AM
  • ...prefer to do it using a VB method rather than have to use command line in my app using process.startinfo.filename / arguments etc
     There is not a .Net method implemented for doing this.  It would require using native methods.  To be honest,  it would be less code and easier to just use the Process class.

    If you say it can`t be done then i`ll try it

    Saturday, December 23, 2017 1:26 PM
  • sorry for delay in replying

    Thank you both for your replies, much appreciated, will look at NtLoadKey/UnloadKey, but suspect probably easier sticking with reg load via process class as per IR response


    Darren Rose

    Wednesday, December 27, 2017 3:49 PM