c# - How do I handle the whitespaces of a registry path? -
i'm creating process in application makes possible run commands in command prompt.
when want export registry key, use reg export path file access registry key , export information file. if use path contains no whitespaces @ all, works fine. use path whitespaces, e.g. hkey_current_user\software\nvidia corporation, not work.
i'm appending path string stringbuilder command, string looks this: string path = "hkey_current_user\\software\\nvidia corporation".
do have change string contained in path? or there special static method can use format string?
you need surround path quotes. might help:
string path = "\"hkey_current_user\\software\\nvidia corporation\"";
Comments
Post a Comment