从注册表vb.net连接字符串 [英] Concatenate string from registry vb.net

查看:98
本文介绍了从注册表vb.net连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法将可执行文件的名称连接到注册表中返回的AppPath值。



我可以成功地使用一个具有返回值的应用程序C:\Program Files(x86)\ AppOne \

但另一个应用程序返回值C:\Program Files(x86)\ AppTwo \\ \\ ...

有三个尾随点我无法连接任何东西。



我试过的:



修剪字符串

mystring = mystring.Trim(Chr(46))

但是没有用。

I've been unable to concatenate the name of the executable file to the returned "AppPath" value from the registry.

I can successfully do so with one application that has the returned value "C:\Program Files (x86)\AppOne\"
but another application returns the value "C:\Program Files (x86)\AppTwo\..."
with three trailing dots and I can't concatenate anything to this.

What I have tried:

Trimming the string with
mystring=mystring.Trim(Chr(46))
but that doesn't work.

推荐答案

为了从未回答的问题中删除,OP找到了解决方案:

Just to remove from unanswered questions, OP found a solution:
引用:

它发现注册表值中的三个尾随点表示字符串比显示的更长,在这种情况下字符串有209个额外的空格人物。

现在我知道了,我已经能够将可执行文件的名称连接到路径。

感谢您的输入。

It transpires that the three trailing dots in the registry value indicate that the string is longer than what is displayed, in this case the string has 209 extra white space characters.
Now I know that, I have been able to concatenate the name of the executable file to the path.
Thanks for your input.


这篇关于从注册表vb.net连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆