0

I am writing a "Robot" which will generate hundreds of PDF files, using the Acrobat Distiller virtual printer. Its first step should be to designate the folder where all the files should be "printed".

The registry key in question can easily be modified interactively:

enter image description here

I found the following code in Microsoft's web pages:

enter image description here Running it, I discovered some interesting clues:

enter image description here

Yes, I am aware that by trial and error I will probably find the appropriate incantations. However, this is the infamous Register, which I have never touched programmatically and it is better to be safe than sorry.

TIA

Travis Banger
  • 697
  • 1
  • 7
  • 19
  • Possible duplicate of [modifying the registry key value](http://stackoverflow.com/questions/8816178/modifying-the-registry-key-value) – itsme86 Mar 01 '17 at 20:10
  • What are you having trouble with? [Registry.SetValue(string keyName, string valueName, object value, RegistryValueKind valueKind)](https://msdn.microsoft.com/en-us/library/3dwk5axy(v=vs.110).aspx) -- pretty straight forward. Pass in the path to the key, the name/value pair, and object representing the value, and an enum for the type of value (binary, dword, string etc). – sab669 Mar 01 '17 at 20:12
  • "Possible duplicate of modifying the registry key value" - Part of my code is based in that and other posts. My question, however is more specific. – Travis Banger Mar 01 '17 at 20:12
  • 1
    @TravisBanger How is your question 'more specific'? The only difference is the particular key you want to modify. You're aiming to do the exact same task.... Also your title says "modify the 2 value**s**", but your first screenshot says "2nd item" -- so what exactly do you want? – sab669 Mar 01 '17 at 20:15
  • Thanks to everybody, thanks for bearing with me, I was trying to wear belt and suspenders. Did not want to boldly/blindly go into my first Registry modification without any assurance. My code is working: Registry.SetValue(@"HKEY_CURRENT_USER\" + keyPath, "2", @"C:\Users\Banger\Desktop\PDF Catcher", RegistryValueKind.String); – Travis Banger Mar 01 '17 at 20:29

0 Answers0