didba
asked on
Deploy a Folder to multipal PCs and Startup Script
I have a situation where I need to deploy a folder of 30MB in size to 400 computers. For say, under c:\app1. This is a file based program and doesnt have any installtion package.
2nd part of this project is, there is 2 exe under this folder which I need to put as startup when user login.
What is the best way to approach this? Thank you!
2nd part of this project is, there is 2 exe under this folder which I need to put as startup when user login.
What is the best way to approach this? Thank you!
ASKER
Mapping the drive would be a nice and easy fix but in our case that is not an option. We need those files on local machine because of couple reason. Laptop user will use this program when they are on road and not connected to VPN and some times mapped drive behave where it doesnt map it self some times during logon. And ofcourse if it is on local drive then program will run faster.
1 )create a file called hostname.ini with the list of computer names (one per line)
2) save it in a folder
3) put the same batch file in the same folder of hostnam.ini and then launch it
rem *****multicopy.bat*****
@echo off
rem ****** source files position ******
set filesource=c:\app1\
rem ****** destination folder ******
rem ****** esempio: \c$\program files\monitoring\
set folderdest=\c$\app1\
del failedhosts.txt
for /F "tokens=*" %%i in (hostname.ini) do (
echo %%i
xcopy /e "%filesource%" "\\%%i%folderdest%" /Y || (
echo %%i >> failedhosts.txt
)
)
echo Done
2) save it in a folder
3) put the same batch file in the same folder of hostnam.ini and then launch it
rem *****multicopy.bat*****
@echo off
rem ****** source files position ******
set filesource=c:\app1\
rem ****** destination folder ******
rem ****** esempio: \c$\program files\monitoring\
set folderdest=\c$\app1\
del failedhosts.txt
for /F "tokens=*" %%i in (hostname.ini) do (
echo %%i
xcopy /e "%filesource%" "\\%%i%folderdest%" /Y || (
echo %%i >> failedhosts.txt
)
)
echo Done
ASKER
Thanks, boing40001. I not that good with the scripts. Can you please explain more how to use and modify this script?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! This worked!!!!
Now 2nd part of questiom - how should go about putting 2 exe files in login from this folder? GPO?
Now 2nd part of questiom - how should go about putting 2 exe files in login from this folder? GPO?
(1) Export the list of all the PCs you want to deploy the folder, from AD Users and Computers console, to a text file.
(2) then manipulate that text file to copy the folder. e.g if the file is showing PCs like:
\\aaa
\\bbb
then in excel or any other text editor, make it to look like :
copy /y c:\app1 \\aaa\c$\app1
copy /y c:\app1 \\bbb\c$\app1
Now rename this file as a batch file like xyz.bat
(3) Login as domain admin in any of the PC your AD and run that batch file.
This will copy folder in all the listed PCs of domain.
(4) For second part you create a login script to copy the shortcut of the exe files to startup.
(2) then manipulate that text file to copy the folder. e.g if the file is showing PCs like:
\\aaa
\\bbb
then in excel or any other text editor, make it to look like :
copy /y c:\app1 \\aaa\c$\app1
copy /y c:\app1 \\bbb\c$\app1
Now rename this file as a batch file like xyz.bat
(3) Login as domain admin in any of the PC your AD and run that batch file.
This will copy folder in all the listed PCs of domain.
(4) For second part you create a login script to copy the shortcut of the exe files to startup.
ASKER
I think with boing4000's help - I am all set with transfering folders. Now I need how to configure login script to run .exe files on startup.
Hi Didba,
do you have a domain? in such case you can use policies to run programs on startup but you should first tell us which domain kind you are running.
If you don't have a domain you can use the same script i provided earlier and copy the two links in the folder "documents and settings\All Users\Start Menu\Programs\Startup"
let me know
do you have a domain? in such case you can use policies to run programs on startup but you should first tell us which domain kind you are running.
If you don't have a domain you can use the same script i provided earlier and copy the two links in the folder "documents and settings\All Users\Start Menu\Programs\Startup"
let me know
ASKER
Yes, we do have AD domain. Is there any policy which can do this or do I need a logon script? IfI need script - what should be th contex? thanks in advance!
ASKER
Anyone has an idea for login script?
then run logon script in each user profile
Elex