What does this batch do?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
denmyos
Posts: 3
Joined: 05 Nov 2009 04:44

What does this batch do?

#1 Post by denmyos » 05 Nov 2009 04:57

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

isacmahad
Posts: 44
Joined: 29 Oct 2009 23:08

#2 Post by isacmahad » 05 Nov 2009 06:10

I dont know it looks like hieroglyphics to me :)
Perhaps the Jews would know...hmmm

X-Zat
Posts: 8
Joined: 31 Oct 2009 07:58
Contact:

Re: What does this batch do?

#3 Post by X-Zat » 05 Nov 2009 12:54

[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?

denmyos
Posts: 3
Joined: 05 Nov 2009 04:44

#4 Post by denmyos » 06 Nov 2009 05:14

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.

!k
Expert
Posts: 378
Joined: 17 Oct 2009 08:30
Location: Russia

#5 Post by !k » 07 Nov 2009 09:46

denmyos
why chrome.msi but chrom.msi

denmyos
Posts: 3
Joined: 05 Nov 2009 04:44

#6 Post by denmyos » 09 Nov 2009 02:17

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.

!k
Expert
Posts: 378
Joined: 17 Oct 2009 08:30
Location: Russia

#7 Post by !k » 09 Nov 2009 07:47

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
)

Post Reply