Map a drive and then install MSI with transform using a batch file - I know why not use VB
I am trying to build a little script to assit me in the few one offs I cannot hit via SCCM while depolying Java. I have a handfull of boxes that SCCM says are sucessfull but they are not, so I go to the users desk and fix it by hand.. no biggie. I am not a scripting guy, I don'y know VB and am struggling with a simple batch file. It maps the drive but will not go to the mapped drive to execute it wants to revert to my user profile. Moving it to any other network location has it trying to run from there as opposed to the mapped drive called for in the .bat file
:: run java from CMD line for one offs ECHO Begin Mapping Drives
net use G: "\\pgsmsxxxx\share share\JAVA\JAVA 7U55" /PERSISTENT:NO G: MSIEXEC /I "%~dp0jre1.7.0_55.msi" TRANSFORMS="Java7u55.mst" /log "C:\Setup_Java.log"
my output is
H:\>ECHO Begin Mapping Drives
Begin Mapping Drives H:\>net use G: "\\pgsmsxxxx\share share\ source\JAVA\JAVA 7U55" /PERSISTENT:NO
The command completed successfully.
G:\ H:\>G: MSIEXEC /I "H:\jre1.7.0_55.msi" TRANSFORMS="Java7u55.mst" /log "C:\Setu
Press any key to continue . . .