魔域时装怎么刷:vb问题:为什么用 RegCreateKey 写入注册表的数据是乱码?

来源:百度文库 编辑:高考问答 时间:2024/05/08 04:55:19
如下,其中showTime.exe是我自己写的一个程序
写入注册表后,数据类型是“?”,这是为什么呢,
要怎么写才能实现此程序的开机自动运行呢?

RegCreateKey HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run", hKey
prog = "C:\Documents and Settings\Administrator\桌面\showTime.exe"
RegSetValueEx hKey, "showTime", 0&, REG_SZ, prog, 2 * Len(prog)