Home All Groups Group Topic Archive Search About
Author
27 Apr 2007 11:41 PM
Anthony Cano
How can I hardcode credentials into this portion of my script so that I can
access the remote drives?  The users that will run this script will not have
their credentials on the server.

'ServerName and HostSitePath variables are assumed.
Const OverwriteExisting = TRUE

Set objFSO = CreateObject("Scripting.FileSystemObject")

objFSO.CopyFile "\\"& ServerName
&"\C$\WINDOWS\system32\inetsrv\MetaBase.xml", "\\" & ServerName &
HostSitePath & "metabackup\", OverwriteExisting

Set objFSO = NOTHING



Thanks,

Anthony

Author
28 Apr 2007 1:04 AM
Jeremy
Something in here should help you
http://www.jdhitsolutions.com/resources/scripts/vbrunas.txt

Show quoteHide quote
"Anthony Cano" <AC***@discussions.microsoft.com> wrote in message
news:%23R5CgWSiHHA.4680@TK2MSFTNGP06.phx.gbl...
> How can I hardcode credentials into this portion of my script so that I
> can access the remote drives?  The users that will run this script will
> not have their credentials on the server.
>
> 'ServerName and HostSitePath variables are assumed.
> Const OverwriteExisting = TRUE
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
>
> objFSO.CopyFile "\\"& ServerName
> &"\C$\WINDOWS\system32\inetsrv\MetaBase.xml", "\\" & ServerName &
> HostSitePath & "metabackup\", OverwriteExisting
>
> Set objFSO = NOTHING
>
>
>
> Thanks,
>
> Anthony
>
>