without escape character

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The string in registry is
"rundll32.exe C:\Program Files\INTERN~1\hmmapi.dll,OpenInboxHandler"
After opensubkey and getregistry, I got
"rundll32.exe \"C:\\Program Files\\INTERN~1\\hmmapi.dll\",OpenInboxHandler"

Is there anyway I can get the string exactly in registry without escape
character?
 
I assume you are looking at this value in the debugger.

you ARE getting the value without the escape characters. The debugger puts
in the escape characters when it shows you the value. It's a display thing
that doesn't affect the value actually stored.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Yes, I saw it from the debugger, my purpose is separate exe file and
parameter.
I used
launch_iexplorer = "\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"
-nohome" (get from the registry)
Regex r = new Regex(".exe"); // Split on .exe
string[] s = r.Split(launch_iexplorer);

I got
s[0]="\"C:\\Program Files\\Internet Explorer\\iexplore"
s[1]="\" -nohome"
what I want is
s[0]="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"
s[1]="-nohome"
 
I'm going to suggest that you get a hold of the Regular Expression Workbench
from GotDotNet. Using Split in the way that you are may not be the most
effective use of regular expressions.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
Steve said:
Yes, I saw it from the debugger, my purpose is separate exe file and
parameter.
I used
launch_iexplorer = "\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"
-nohome" (get from the registry)
Regex r = new Regex(".exe"); // Split on .exe
string[] s = r.Split(launch_iexplorer);

I got
s[0]="\"C:\\Program Files\\Internet Explorer\\iexplore"
s[1]="\" -nohome"
what I want is
s[0]="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"
s[1]="-nohome"



Nick Malik said:
I assume you are looking at this value in the debugger.

you ARE getting the value without the escape characters. The debugger puts
in the escape characters when it shows you the value. It's a display thing
that doesn't affect the value actually stored.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Back
Top