Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

batch script to install software over network

Posted on 2012-04-04
5
528 Views
Last Modified: 2012-04-05
I am trying to install java over the network using psexec.  The below batch works if executed from the local machine, however from psexec gives a "exiting with error code 1".

I am not sure what is caausing it, i read a couple places that it has to do with permissions, but since I am using psexec that should not matter.  My other batches work with admin permissions using psexec.  

@ECHO OFF
SET MyDIR=%~dp0 

echo. installing java 6 update 31...
start /wait /low \\server\share\jre6.exe /s

Open in new window

0
Comment
Question by:icecom4
  • 2
  • 2
5 Comments
 
LVL 16

Assisted Solution

by:l33tf0b
l33tf0b earned 250 total points
ID: 37808504
You need to run psexec -u username -p password

username/password needs to be a login with access to the share.  You need to explicitly tell psexec
0
 
LVL 4

Accepted Solution

by:
danielmarko earned 250 total points
ID: 37808525
I have used psexec but I always copy the install files to a local temp folder and then run it from there.
try

@ECHO OFF
SET MyDIR=%~dp0
echo. installing java 6 update 31...
copy \\server\share\jre6.exe c:\temp\jre6.exe

start /wait /low c:\temp\jre6.exe  /s
                                  1:
0
 

Author Comment

by:icecom4
ID: 37808598
@ dan...hmmm i will try that.  but whats that 1: for under the script??


@133
I forgot to mention that I am using the ezexecute utility for psexec...so the username and password get entered in before the batch,  The folder on the share is set to allow everyone all permissions, but not administrator.
0
 

Author Comment

by:icecom4
ID: 37808832
I did both of your recommendations.  I had to remove the c:\temp because that does not exist...and so the batch could not find it but other than that it is now copying and executing.

Thanks
0
 
LVL 4

Expert Comment

by:danielmarko
ID: 37812662
great
the 1 was me fat fingering it. ignore.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access Control Entries lost in Windows folders 3 57
Carriage Return in Batch File 5 66
Check folder every for files and print them 5 39
BATCH to EXE Converter 2 35
The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question