Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Sat, 8 Mar 2008 12:28:00 -0800,    group: microsoft.public.inetsdk.programming.scripting.vbscript        back       


Script to copy files to locked down systems   
I'm not a programmer and usually successful in using scripts already created, 
with slight adjustments of course, to perform small tasks on my network.  I 
would like to use my SMS to run a vbs script which will copy a file from a 
server to a location on the workstation where the security is locked down (or 
so I believe this is problem).  I've tried simply copy, added runas script to 
run before (as I read from others) and still no luck.  All I need to do is 
copy a couple of files from our new AV server to local workstations/servers 
in order to get the clients to start communicating again.

Scripts I tried:
'copy script called AVcopy.vbs
on error resume next

set wshShell=wscript.CreateObject("wscript.shell")
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")

objFSO.CopyFile "\\server\share\certicifcate.ca , "C:\Program Files\Symantec 
AntiVirus Corporate Edition\pki\root\",OverWriteExisting

'runas script
' runas.vbs 
Option explicit 
dim oShell 
oShell.Run "runas /noprofile /user:admin@domain " & Chr(34) _ 
   & "cscript.exe \\server\share\AVcopy.vbs" & Chr(34) 
WScript.Sleep 1000 
oShell.Sendkeys "passwordhere~" 
'Wscript.Quit 

For some reason, SMS runs the script and completes it successfully but file 
is not copied and the script won't run with the "run with administrative 
rights" setting.  Any suggestions?
date: Sat, 8 Mar 2008 12:28:00 -0800   author:   Carol Deavy

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us