Announcement

Collapse
No announcement yet.

Software install for Newbie to Scripts

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Software install for Newbie to Scripts

    Hi Guys,

    I've got basic bat file skills and looking for some help with my scripts.

    Ive used Psexec to install Google Chrome on remote pc's. This has worked fine but going forward I want to make the scripts better. Here's what I have done so far

    psexec \\PCNAME -h cmd /c "msiexec.exe /i c:\googlechrome.msi /qn"

    What I want to be able to do though is rather than type the pc name for each install I want to call upon a list of pc's from a text file and then also log if the install was successful.

    How on earth do I do that?

    Thanks in advance for any help

  • #2
    Re: Software install for Newbie to Scripts

    How about:
    Code:
    for /f %%a in (list_of_PCs.txt) do psexec \\%%a -h cmd /c "msiexec.exe /i c:\googlechrome.msi /qn"
    Replace "%%" with "%" if you're testing this directly from the command line.

    An even better way if this is a domain environment: The Software Distribution setting in a Group Policy.

    Comment


    • #3
      Re: Software install for Newbie to Scripts

      ok thanks for that .

      Any ideas how I get it to create a log file on my pc to say if its successful?

      Thanks again

      Comment


      • #4
        Re: Software install for Newbie to Scripts

        You can relatively easily check if each psexec command was successful, as that command is run on the local system, but that won't tell you whether the msiexec command on the remote system succeeded or not.

        Are you sure you can't use a Group Policy for this?

        Comment

        Working...
        X