Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows InnoSetup-HKEY_LOCAL_机器如何增加价值?_Windows_Windows Installer_Environment Variables_Inno Setup_Regedit - Fatal编程技术网

Windows InnoSetup-HKEY_LOCAL_机器如何增加价值?

Windows InnoSetup-HKEY_LOCAL_机器如何增加价值?,windows,windows-installer,environment-variables,inno-setup,regedit,Windows,Windows Installer,Environment Variables,Inno Setup,Regedit,我的innosetup脚本中有这个,但它根本没有在注册表中添加任何内容 [Registry] Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Test"; ValueData: "{app}\test.vbs"; 你知道为什么不加吗 编辑: test.vbs: Set oShell = CreateObject("Wscript.She

我的innosetup脚本中有这个,但它根本没有在注册表中添加任何内容

[Registry]    
Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Test"; ValueData: "{app}\test.vbs";
你知道为什么不加吗

编辑:

test.vbs:

Set oShell = CreateObject("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c runpython.bat"
oShell.Run strArgs, 0, false
C:\Python27\python.exe "C:\Program Files (x86)\Google\dev_appserver.py" --host 0.0.0.0 --port 8080
runpython.bat:

Set oShell = CreateObject("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c runpython.bat"
oShell.Run strArgs, 0, false
C:\Python27\python.exe "C:\Program Files (x86)\Google\dev_appserver.py" --host 0.0.0.0 --port 8080

好的-解决了,它是32位/64位的,就像评论中提到的那样

InnoSetup问题:

[Registry]    
Root: HKLM64; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Test"; ValueData: "{app}\test.vbs"; Check: IsWin64;
  • 在Windows 64位PC上,此处需要HKLM64而不是HKLM
test.vbs问题:

Set oShell = CreateObject("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c runpython.bat"
oShell.Run strArgs, 0, false
  • 由于以下原因,VBS没有执行:
    strArgs=“cmd/c”c:\program files\blablabla.bat”“”

也许您有64位窗口。如果是,则条目将添加到
Wow6432Node
。您不是正在使用64位regedit查看64位注册表视图节点吗?如果你有64位的regedit,你会在
WoW
节点下找到32位的视图。真奇怪。它确实插入了WOW6432节点。我不明白为什么要在那里添加它?它是一个64位的Windows。重新启动后,未启动my test.exe。您运行了64位regedit,它具有64位密钥视图。您可以在
WoW
节点下找到32位密钥。还有32位的regedit,它显示此视图,反之亦然。这就是regedit表示注册表视图的方式。这是我的看法。