|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have never scripted in my life but i need to start because of my job. I am now the network administrator and one of my first tasks is to copy a template for all users to use for the company email signature. The file was easy to create and i created the file but now the hard part is i can either manually install it in each users machine.\\ to each users machine and place it their and with about 80 users that will take a while. Not to mention if i loose track it could be a problem. I know the path i want the file to be in, i need to create a script that will run once per user per machine and i have no idea the variables to us or how to use them. can you guys point me in the right direction.
What i mean by run once per use per machine is that the file will only run once if the user connections on machine A but if the user connections on machine B for the first time i want it to run once. If the user connects to machine B again the file should already be their. A perfect solution but i think might be more difficult is if the script can check for the presents of the file and only copy the file (from a network share of course) to the user machine if it isnt present. Any help you can render would be greatly appriciated. |
|
#2
|
||||
|
||||
|
just run batch command line application (.bat file) with such code
from the main server: Code:
copy [file path here] \\user_machine_1 copy [file path here] \\user_machine_2 copy [file path here] \\user_machine_3 ... |
|
#3
|
|||
|
|||
|
Quote:
can i use a wild card say something like copy [file path here] \\*\C$\Documents and Settings\%USER%\Application Data\Microsoft\Signatures instead of having a separate machine per user. The only downside of this is i would then have to have to manually place this file on each new machine per user that uses that machine when a user moves around. Thanks for the imput its bring me a step closer. If anyone else have other ideas please let me know |
|
#4
|
||||
|
||||
|
no, as far as I know you can't use wild card instead of computer name.
maybe there's more advanced batch commands that won't overwrite file if it already exists, but I'm not familiar with such command. it's worth searching though, try searching in google for batch command that are used for copy and see for yourself. ![]() |
|
#5
|
||||
|
||||
|
The copy command will not overwrite by default. You have to force overwriting with command line switches.
As for the wild card idea...you would be better off taking a different approach. Lastly, as I always say...this is better done in WSH rather than in batch. You could easily make this a network logon script that checks for the existence of a file and copies it if it's not found. Environmental variable and WMI are both capable of pulling local directories and machine names.
__________________
Click the image if at any point you don't like my decision.Scripting problems? Windows questions? Ask the Windows Guru! |
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > Signature login script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|