如何在Server2go应用程序中动态分配BrowserPath?

时间:2012-07-05 20:46:52

标签: windows server2go

这是我关于堆栈溢出的第一篇文章。我在Pen Drive上使用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=

无论如何我可以通过环境变量来识别驱动器号吗?

提前感谢您的帮助:)。

1 个答案:

答案 0 :(得分:1)

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

您可以省略驱动器号:

BrowserPath=FirefoxPortable/FirefoxPortable.EXE