Hi Chuck,
Thank you for the feedback.
This question goes a step further in complexity. The answer depends on what
account your mapping drive Windows Service runs and how do you use the Task
Scheduler(what account does it run). Actually, the key point is determining
whether these two processes(windows service and the process stared by Task
Scheduler) reside in the same logon session.
If your Windows Service runs under Local System, Network Service or Local
System account, there will be one to one mapping between the account and
logon session. So once the process is started by Task Scheduler as the same
account, it will see the drive mapping. Below test confirms my statement:
1. I configure my Windows Service runs under Local System and run it to
setup the drive mapping
2. I am using the command below to run "cmd.exe" one minute
later(substitute 15:51 with your time):
"at 15:51 /interactive /every:friday cmd.exe"
3. The cmd.exe will run under Local System account one minute later. Just
type "H:" in the cmd.exe, you can see the cmd.exe can jump into "H:" drive
without any problem. This confirms that the cmd.exe can see the drive
mapping.
If the Windows Service and the process started by Task Scheduler run under
different accounts, they definitely can not drive mapping each other.
But note: if the Windows Service runs under interactive user account, even
the process started by Task Scheduler run this interactive user account
also, they can not see each other. This is because Windows Service has a
special logon session allocation policy for normal user account. Windows
Service with interactive user account will still be assigned a different
logon session as interactive logon session.
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.