开发者

Getting a path to Public Documents on Server in vb.net app when run from a workstation

In our VB.Net application, we need to get the path to our data folder in Public Documents. In our standalone application this is straighforward using the SHGetFolderPath function. However, for our net开发者_Python百科work application, we run into a problem when we load the application on a Win 7 server and run it from a Win XP workstation. From the workstations, SHGetFolderPath returns the workstation's public documents folder instead of the what we want, which is the server's public documents path.

Is there any way within the application to query the public documents path on the server?

Thanks Sally S


While the application is stored on the server, it is executed on the workstation, therefore all environment variables are taken from the workstation. You'll likely have to hard- or softcode a path to the server's data files. This will, of course, require the server's Public Documents folder to be shared on the network.

Alternateively, use a terminal server configuration so that the application executes on the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜