Something in here should help you http://www.jdhitsolutions.com/resources/scripts/vbrunas.txt
"Anthony Cano" <ACano[ at ]discussions.microsoft.com> wrote in message news:%23R5CgWSiHHA.4680[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text] > 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 > >
|