【问题标题】:How to assign BrowserPath dynamically in Server2go app?如何在 Server2go 应用程序中动态分配 BrowserPath?
【发布时间】:2012-07-05 20:46:52
【问题描述】:

这是我关于堆栈溢出的第一篇文章。我在笔式驱动器上使用 Server2go 和 Portable Firefox。 Server2go 中有一个名为 pms_config.ini 的配置文件。有一行允许您指定要使用的浏览器的路径。无论如何要获取USB的驱动器号,以便我可以将它动态包含在配置文件中?

[Browser]
;--- The browser that is started after server start (possible values: IEXPLORER,    FIREFOX, PORTABLEFIREFOX, MOZILLA, DEFAULT, EXTERNAL)
;--- Please take a look at the www.server2go-web.de/wiki pages for a documentation how to use PORTABLEFIREFOX!!!!!!!!
BrowserType=PORTABLEFIREFOX
;--- Browser command options like -k (NOT IN USE AT THE MOMENT)
BrowserCommandOptions=
;--- Path to an external browser that is used instead the browser above
BrowserPath=G:\FirefoxPortable\FirefoxPortable.exe 
;--- Specify caption text of Work Offline dialog box. You can use mor than one captions     (seperated with ;)
;--- The captions for german, english, french, dutch and spanish are build in by   default
WorkOfflineTitle=
;--- The size of the started browser. Can be a pixel dimension (1024x768) or the values MAXIMIZE and KIOSK (Internet Explorer only)
BrowserSize=

有没有办法让驱动器号由环境变量识别?

提前感谢您的帮助:)。

【问题讨论】:

    标签: windows server2go


    【解决方案1】:

    来自关于使用 Portable Firefox 的 Server2Go 文档: https://bitbucket.org/thaberkern/server2go/wiki/Using%20FirefoxPortable%20as%20browser%20from%20CD

    您可以省略驱动器号:

    BrowserPath=FirefoxPortable/FirefoxPortable.EXE
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-02
      • 2020-03-09
      • 1970-01-01
      • 2018-03-27
      • 2015-02-06
      • 1970-01-01
      • 1970-01-01
      • 2018-04-13
      相关资源
      最近更新 更多