Mar*_*jes 10 windows windows-registry environment-variables context-menu
我正在制作一个需要上下文菜单中的参数的程序(单击一个文件并使用文件名作为参数调用我的程序)。
我正在尝试向 ...\shell\myThing\command 添加一个注册表项。我想要的是以下内容:
C:\Program Files (x86)\Feliratozo\Feliratozo.exe %1
Run Code Online (Sandbox Code Playgroud)
我想使用 %ProgramFiles(x86)% 环境变量,因为我在某处读到它也适用于 x86 和 x64 Windows。(在 x86 上更改为“正常”程序文件。)当我尝试设置时出现问题:
%ProgramFiles(x86)%\Feliratozo\Feliratozo.exe %1
Run Code Online (Sandbox Code Playgroud)
这样,当我尝试使用上述上下文菜单项时,会出现以下错误:
Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.
Run Code Online (Sandbox Code Playgroud)
权限问题似乎不正确,因为在使用绝对路径时它可以工作。
我现在能做什么?
Wer*_*nze 15
您应该记住将注册表值设为 REG_EXPAND_SZ 而不是 REG_SZ。通常,仅扩展 REG_EXPAND_SZ 值。
| 归档时间: |
|
| 查看次数: |
21430 次 |
| 最近记录: |