Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: copy .bat from one computer to many computer

23 Jan 2015   #1
adiariyanto

Windows 7 Embedded
 
 
copy .bat from one computer to many computer

Hi..
i would like to know if somebody ever done before
I need to replace login.bat file that locate in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp in 96 computer with new login.bat that I have.

I already use xcopy and copy command but it need administrator access / password.
is there any script / bat file / a way to do this ?
all administrator password account is same and I have it.


My System SpecsSystem Spec
.
23 Jan 2015   #2
RolandJS

Windows 7 Professional 64-bit
 
 

I have to rush off to work, however, you can get from here Take Ownership REG script and/or Run As Administrator REG script. I mean the folks here can tell you where to find, how to activate, how to use those two scripts.
My System SpecsSystem Spec
24 Jan 2015   #3
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Hi Adiariyanto,

I'm not entirely knowledgeable about networks, but it shouldn't be hard to whip up a file replace batch script.

Something like...
Code:
@echo off
for /f "usebackq delims=" %%I in ("C:\networkcomputers.txt") do (
xcopy "\\%COMPUTERNAME%\C$\some\path\to\logon.bat" "\\%%~I\C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" /y
)
Should get the job done. With "C:\networkcomputers.txt" being a newline-separated list of all 96 network computers.
My System SpecsSystem Spec
.

26 Jan 2015   #4
adiariyanto

Windows 7 Embedded
 
 

Quote   Quote: Originally Posted by Pyprohly View Post
Hi Adiariyanto,

I'm not entirely knowledgeable about networks, but it shouldn't be hard to whip up a file replace batch script.

Something like...
Code:
@echo off
for /f "usebackq delims=" %%I in ("C:\networkcomputers.txt") do (
xcopy "\\%COMPUTERNAME%\C$\some\path\to\logon.bat" "\\%%~I\C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" /y
)
Should get the job done. With "C:\networkcomputers.txt" being a newline-separated list of all 96 network computers.
Hi Pyprohly

I try copy your script into notepad and make it .bat file , but it doesnt work ? do I miss something ? I try run your script as administrator, but in target computer the .bat file does not copied..
then I try remove /y
and got an error %%I was unexpected at this time..
My System SpecsSystem Spec
26 Jan 2015   #5
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

I would like to reiterate, I'm no network guru. But if you'd like to stick around I'd be happy to work with you in finding a solution.


Do you have a remote computer you can test with? Get it ready.

Verify that you have access to this computer's Startup directory by listing it's contents.
Code:
dir "\\ComputerName\C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
Substituting "ComputerName" with the name of the computer you decide to perform testing on.


If you accomplished the above with success, take matters to the next step and make an attempt to Xcopy some arbitrary file on your local computer to the remote computer's Startup folder with the following,
Code:
xcopy "C:\Some\random\file\on\your\machine.txt" "\\ComputerName\C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
Again, substituting "ComputerName" accordingly.



Post back with your findings.
My System SpecsSystem Spec
Reply

 copy .bat from one computer to many computer




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
copy DVD to my computer
Hi, I have a laptop with OS Windows 7 Home Premium 64 bit. How do I copy DVD disks to my computer? Thanks
Music, Pictures & Video
Activating a retail copy of Windows 7 on a second computer.
The computer it is currently installed on doesn't work anymore. (I couldn't fit that in the title. I know that retail licenses only permit for the copy of Windows 7 to be activated/genuine on one computer.) I have a retail copy of Windows 7. It was used to upgrade a laptop from Windows XP to...
Windows Updates & Activation
Why can't I copy and paste anything on my computer???
I can't copy and paste anything by right clicking or CTRL C CTRL V. I have looked everywhere for a solution and I don't know what to do. Please HELP!!!
Software
copy of xp on computer.. can I install under virtual pc
Ok so I have the current situation I bought a windows xp machine about 2 years ago. Happy user all is good. I still have the disc that came with it. Microsoft Windows XP Media Center Edition 2005 Description: This bootable recovery DVD will enable to restore the operating system. so I was...
Virtualization
How to copy an obsolete program from an old computer?
I have Microsoft Digital Image 2006 on my old laptop, running Windows Vista. I don't remember how I got it on there initially. However, the program is now obsolete and I desperately need it on my new laptop, which is running Windows 7. Is there any way to transfer the program to my new laptop, or...
Software


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 14:51.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App