Page 1 of 1

What does this batch do?

Posted: 05 Nov 2009 04:57
by denmyos
I'm a noob, so u have more or less no clue of what im talking about.

I need this batch fil, to move and install (silence install) file/files to a remote computer/computers.

@echo off
for /f %%a in (computerlist.txt) do (
net use \\%%a\c$ /user:administrator
copy c:\programmer\chrome.msi \\%%a\c$\programmer
psexec \\%%a -i -u administrator -p pword msiexec.exe /i c:\programmer\chrom.msi
)

It will move the files, but not install them.

I can't figure out if its the bath file or the .msi file that is screwing up.

The .msi file will install when i double click it, but it will no install when i use the batch, i get no error.


any idears? thx :D

Posted: 05 Nov 2009 06:10
by isacmahad
I dont know it looks like hieroglyphics to me :)
Perhaps the Jews would know...hmmm

Re: What does this batch do?

Posted: 05 Nov 2009 12:54
by X-Zat
[quote="denmyos"]
@echo off
for /f %%a in (computerlist.txt) do (
net use \\%%a\c$ /user:administrator
copy c:\programmer\chrome.msi \\%%a\c$\programmer
psexec \\%%a -i -u administrator -p pword msiexec.exe /i c:\programmer\chrom.msi
)
/quote]

Easy:

It copies the files to the specified folder (it's nooblike because the creator does not use any variables on the path...). After this it "psexecutes" the chrom.msi (Microsoft-Installler).

To install, doubleklick or

Code: Select all

start c:\programmer\chrom.msi 


Any questions left?

Posted: 06 Nov 2009 05:14
by denmyos
Thx for your reply.

But the code installs the msi file on the "push" computer, i want the msi to install on the target computer/computers.

The new code looks like this:

@echo off
for /f %%a in (computerlist.txt) do (
net use \\%%a\c$ /user:administrator
copy c:\programmer\chrome.msi \\%%a\c$\programmer
psexec \\%%a -i -u administrator -p pword msiexec.exe /i c:\programmer\chrom.msi
start c:programmer\chrom.msi
)


Maybe i put the new code line in the wrong place?

How would you make a batch, that copy and installed msi files to around 100 machines. ?

Its for updating computers very time there is a update like flash, msn, Quicktime etc.

Posted: 07 Nov 2009 09:46
by !k
denmyos
why chrome.msi but chrom.msi

Posted: 09 Nov 2009 02:17
by denmyos
Sorry! I change the typoo, still didn't install on the target computer, only on the push computer, twice.!!
I also tryed a new .msi file, same story.

I must be doing something else wrong.

Posted: 09 Nov 2009 07:47
by !k
Maybe

Code: Select all

copy c:\programmer\chrome.msi \\%%a\c$\programmer
psexec \\%%a -i -u administrator -p pword msiexec.exe /i \\%%a\c$\programmer\chrome.msi
)