V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
crazytudou
V2EX  ›  Windows

开发远程应用, RemoteApp 服务器使用 Win10, ServerStartProgram 启动应用时怎么传参

  •  
  •   crazytudou · Jun 6, 2024 · 1237 views
    This topic created in 700 days ago, the information mentioned may be changed or developed.

    想在本地打开服务器上的应用,在服务器注册表注册了别名为 test ,未传参数时,可以在本地正常运行打开,但是想给启动应用时传个参数,死活传不进去

    rdp.RemoteProgram2.ServerStartProgram(@"||test", "", "", true, "param", false);

    百度和 google 翻来翻去试过了,都没有找到答案,微软官方也是一句话带去,没说格式和条件

    包括尝试在.rdp 文件中加入参数,也是传不进去

    remoteapplicationprogram:s:||test
    remoteapplicationcmdline:s:/p1:222 /p2:333

    pckillers
        1
    pckillers  
       Jun 6, 2024
    RemoteApp 服务器不应该选 Windows Server 么?

    Server 版安装远程桌面服务后会有一整套工具出现在服务器面板的

    然后有个发布向导功能,可以自动生成好启动某个应用的 RDP 。 把这个 RDP 复制到其他电脑就能用了。
    crazytudou
        2
    crazytudou  
    OP
       Jun 6, 2024
    @pckillers 你说的这种也是,我这个做得比较简单,不限制在 server 服务器,win10 都可以,在注册表里注册 TSAppAllowList 就行
    y77FXoxF970725SJ
        3
    y77FXoxF970725SJ  
       Jun 27, 2024   ❤️ 1
    检查注册表项
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList\Applications\***App

    名称:CommandLineSetting
    类型:DWORD (32 位) 值
    数据:1
    基数:十六进制

    可以使用 RemoteAPP Tool 管理 RemoteApps
    crazytudou
        4
    crazytudou  
    OP
       Jun 27, 2024
    @500 谢谢,之前就是用你这样的方法解决的,
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3409 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 12:25 · PVG 20:25 · LAX 05:25 · JFK 08:25
    ♥ Do have faith in what you're doing.