UNC Path and the local System Account 
Author Message
 UNC Path and the local System Account

I have the following situation:

OS = NT4, SP6
Machine = SRV
Share = Share

When I run a client side script from the scheduler on SRV that contain:
    FSO.GetFolder("\\SRV\Share")
I get a runtime error, something like folder doesn't exists, even if the
share is on the same machine.

SAME script, SAME Machine under a user account, it runs properly.

I think this indicates that the Local System Account doesn't have access to
Network resources,
even if the resource IS LOCAL !

Then I tried the following.
On SRV I started a CMD from the scheduler. When the new shell pop up, I
started the script
manually as I did under the normal user account:
    FSO.GetFolder("\\SRV\Share") give no access.
    FSO.GetFolder("drive:\path") works correctly.
To double check that the System account has no net access, I run a simple
command (in the new CMD shell):
    NET USE * \\SRV\Share
and IT WORKED !!!!!!!!!!!!!!!!!!!!!!!!!!!

So something is defintely wrong.

Can someone explain me what's wrong ?
I'll appreciate any help.

Andy Mantegazzi



Mon, 09 Jun 2003 03:07:15 GMT  
 UNC Path and the local System Account

This syntax currently works for me:
\\[Computer NETBIOS Name]\F$\[Path]

Are you designating the share with '$'?  The other quirk I've encountered is
that if the path (UNC or local) has spaces I have to surround it in triple
quotes.

hth

Quote:
> I have the following situation:

> OS = NT4, SP6
> Machine = SRV
> Share = Share

> When I run a client side script from the scheduler on SRV that contain:
>     FSO.GetFolder("\\SRV\Share")
> I get a runtime error, something like folder doesn't exists, even if the
> share is on the same machine.

> SAME script, SAME Machine under a user account, it runs properly.

> I think this indicates that the Local System Account doesn't have access
to
> Network resources,
> even if the resource IS LOCAL !

> Then I tried the following.
> On SRV I started a CMD from the scheduler. When the new shell pop up, I
> started the script
> manually as I did under the normal user account:
>     FSO.GetFolder("\\SRV\Share") give no access.
>     FSO.GetFolder("drive:\path") works correctly.
> To double check that the System account has no net access, I run a simple
> command (in the new CMD shell):
>     NET USE * \\SRV\Share
> and IT WORKED !!!!!!!!!!!!!!!!!!!!!!!!!!!

> So something is defintely wrong.

> Can someone explain me what's wrong ?
> I'll appreciate any help.

> Andy Mantegazzi



Mon, 09 Jun 2003 05:41:25 GMT  
 UNC Path and the local System Account

Every local machine account (SYSTEM or otherwise) lacks network access
rights.  Any UNC path is considered a network resource even if it's local
the machine executing the script.  That's just that way UNC path references
work - without network access rights you can't access network resources.

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--


Quote:
> I have the following situation:

> OS = NT4, SP6
> Machine = SRV
> Share = Share

> When I run a client side script from the scheduler on SRV that contain:
>     FSO.GetFolder("\\SRV\Share")
> I get a runtime error, something like folder doesn't exists, even if the
> share is on the same machine.

> SAME script, SAME Machine under a user account, it runs properly.

> I think this indicates that the Local System Account doesn't have access
to
> Network resources,
> even if the resource IS LOCAL !

> Then I tried the following.
> On SRV I started a CMD from the scheduler. When the new shell pop up, I
> started the script
> manually as I did under the normal user account:
>     FSO.GetFolder("\\SRV\Share") give no access.
>     FSO.GetFolder("drive:\path") works correctly.
> To double check that the System account has no net access, I run a simple
> command (in the new CMD shell):
>     NET USE * \\SRV\Share
> and IT WORKED !!!!!!!!!!!!!!!!!!!!!!!!!!!

> So something is defintely wrong.

> Can someone explain me what's wrong ?
> I'll appreciate any help.

> Andy Mantegazzi



Mon, 09 Jun 2003 12:47:38 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Converting local path to UNC path?

2. Local path vs UNC Path

3. How to convert local path to UNC-path?

4. How to convert local path to UNC-path?

5. turning a local path into a UNC path

6. Translating local path to a UNC ?

7. how to use UNC to local path (MAPI)

8. convert unc to a local path

9. API to convert local path to UNC?

10. convert unc to a local path

11. Converting logical paths to UNC paths

12. Converting logical paths to UNC paths

 

 
Powered by phpBB® Forum Software