问题描述
我要做一个Windows服务,该服务在用户登录之前启动.这也意味着该服务必须具有自己的用户名/密码.那么如何在不登录的情况下远程打开网络共享?
I've to do a windows service which starts before the user logon. It's also mean that this service has to do have its own username/password. So how can I open a network share remotly without being logged?
我在Windows域中,目标是使用一些配置的凭据来访问我需要的远程文件.
I'm in a windows domain, and the goal is to use some configured credentials to access the remote files I need.
您有个主意吗?我只是找不到任何东西可以轻松访问服务器
Do you have an idea? I just can't find anything to access easily to the server
很抱歉,我犯了一个错误,客户端计算机不在域中,服务器是:(
I'm sorry I made a mistake, the client computer isn't in the domain, the server is :(
推荐答案
如果您不能以有问题的用户身份运行该服务,则可以通过带有P/Invokes的代码来实现.
If you can't run the service as the user in question, you can do it through code with P/Invokes.
这篇关于在会话打开之前,通过UNC路径访问Windows共享的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!