Passing parameters to c++ (windows registry)

Aug 14, 2014 at 8:57pm
Hi everyone,

I want to run my c++ program with a context menu, so I created the pertinent key in the windows registry:

1
2
SOFTWARE\Classes\*\shell\Runmyprogram\command
    value = "C:\Users\ntran\project\stpc.exe\" \"%1\" 


In my c++ program I'll read the parameters with the argv[] variable.
Now it works fine, but now I want to add another perameter: "ncolor"

How do i modify the value in the registry to pass that parameter into my program?

Thanks
Last edited on Aug 14, 2014 at 9:01pm
Aug 14, 2014 at 10:27pm
value = "C:/Users/ntran/project/stpc.exe\" \"%1\" ncolor"
Aug 15, 2014 at 11:54am
Thanks for the simple concise answer, it worked.
Topic archived. No new replies allowed.