|
|
|||||||
Hi. Due to the problems we've had with the viruses around the company,I'm being asked to create a script that will copy a file from our server to a local machine, and then to run that file from the local machine. Anythoughts? Thanks for your help. Shaggy |
||||||||
|
|
|||||||
I also would like to build an if statement around the entire function. I'd like for the script to look to see if the file is already present in the dir. that would mean the script had already run it once, and would not need to again. Thanks again |
||||||||
|
|
|||||||
You could copy it in your logon script & then poke the name of the exe into the runonce key so it will run right after logon. Reboots might be a problem if this is necessary plus you need to set a flag somewhere so you will not instal the update twice. |
||||||||
|
|
|||||||
not sure what is so hard in this. copy "serverlocation" "locallocation" run "locallocation" |
||||||||
|
|
|||||||
You could copy a txt file or so along with the program file. Do a check if the txt file exists before copying the program file to avoid double copying. If this is a virus canner or so you probably need your users to have admin privileges. If they don’t have this you can use the taskscheduler UDF or (not desirable because of security issues) use su. Do a search on the taskschedular UDF or su and you'll find what you need. |
||||||||
|
|
|||||||
quote:Why? Why not look for a Reg Key or value? Kent |
||||||||
|
|
|||||||
if you want to check file, these will be enough: -filename -filetime same -file size same checking these you can verify, you have already done the job. if you want to be sure, you need to check from registry that the update has done. could I ask what AV you use? |
||||||||
|
|
|||||||
We use Norton Antivirus corporate edition here at our headquarters. Trouble is that we never got the funding to buy the extra licenses for the plants out of town. Anyways, here's where I'm at. Copy "f:\FixVirus.exe" "C:\temp" That, according to my manual, should work. How would I go about coding that check for filename? |
||||||||
|
|
|||||||
Just checking the registry, check if the file exist, check the version or something should be enough indeed. |
||||||||
|
|
|||||||
read the manual about getfiletime() and getfilesize() whit these, being the same as the one on the server, you can be quite sure. |
||||||||
|
|
|||||||
Apparently this is a file that will only run with administrative rights. I tried doing run "C:temp\FixVirus.exe" /user:administrator /password:blahblahblah Doesn't seem to run. |
||||||||
|
|
|||||||
Quoting myself quote: |
||||||||
|
|
|||||||
shaggyboy, sure it runs. it fails to work though like r2d2 said, you need to tweak the thing. |
||||||||
|
|
|||||||
Running applicaitons with admin powers is explained in the FAQ Forum. |