Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to run the below command on the listed server from server.txt file, The batch file must be running in the loop sequence

Steps

  1. Uninstall Java from remote computer
  2. Map the network drive
  3. run the installation exe file

Commands are here

MSIEXEC.EXE /X{26A24AE4-039D-4CA4-87B4-2F83216018FF} /quiet /norestart  
* It must wait for 10 sec to complete the above command

net use x: \\PSever\Soft\Java /user:mum\dadmin abc@123
cd X:
JAVA.EXE

It must wait for 15 Min to complete the installation

Note : After running the above script it must give me a report

Thanks in advance

If you have any other solution, pls also share with me

My purpose is to run the multiple commands on the multiple servers. (I wana go for automation )

share|improve this question

migrated from stackoverflow.com Oct 1 '10 at 7:45

This question came from our site for professional and enthusiast programmers.

2  
Perhaps this would get more feedback on server fault instead? –  Jon Sep 28 '10 at 16:23
    
Now that you've told us what you want to do perhaps you can post a question, because there isn't one in what you've written. –  John Gardeniers Oct 1 '10 at 10:12

2 Answers 2

There is no reason to install Java like this. You should extract the jre[version].msi and data1.cab from the exe installer. Then you can use something like Orca to make a transforms that sets the MODIFYREMOVE parameter equal to REMOVE. This will remove all previous version of Java from the system.

Then just use Group Policy Software Deployment to push out the .msi and .mst.

share|improve this answer

Why do you want to uninstall Java, and then reinstall it using the .exe? Everything mentioned here can be done via Group Policy (though I'm not sure on the 'create a report' side of things).

Just as MDMarra noted, run the Java executable, which will extract the .msi file into AppData\LocalLow\Sun\Java (for Windows 7), or Local Setttings\Application Data\Sun\Java (for XP). That .msi file is what you'll use to deploy Java through Group Policy (Software Deployment section under Computer Configuration so it uses the SYSTEM account to do the install instead of the User).

As for mapping network drives, there's one key piece of info you seem to be missing from your description: What server OS are you using?

In Server 2008, under Group Policy, go to User Configuration, Preferences, and then Windows Settings. You'll be able to select drive maps and add shared drives.

In Server 2003, you'll want to create a batch file with the line you noted above; 'net use x: \server\drive' --where 'x' is the drive letter, and '\server\drive' is the location of the shared drive/folder. Save this .bat file into the sysvol folder (C:\Windows\SYSVOL\sysvol\your-domain\scripts) and it'll run during profile creation. The other option is to set the script to run on the user's logon via Group Policy.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.