targetServer parameter of TaskService constructor in V1

Oct 28, 2008 at 3:16 AM
I've wrote a simple code to list all tasks on servers of Win2003 & Win2008, at first, they all work perfectly. But when I specify the targetServer parameter to a Win2003 server, the list becomes empty.
The problem is the SetTargetComputer method of ITaskScheduler, according to the MSDN, the server name must be in UNC format, but if I set the targetServer parameter in UNC format, Win2008 fails.

Is it a good idea to add some test code to add the "\\" prefix to targetServer parameter if needed to prevent this problem.
Coordinator
Oct 30, 2008 at 9:35 PM
I changed the constructor per your suggestion and also check for the reverse condition to ensure that V2 machines don't use the "\\". Code and release have been updated.