Jump to content

Trying to install Matlab from server no luck


rmusick
 Share

Recommended Posts

Hi Can anyone tell me what is wrong here,  I am trying to install Matlab 2015b from our server using  mapped drive.  this is a difficult application as it starts the setup.exe closes it to run another app and then starts it up again.  In our original file, we kicked it off and then immedialy ran a vbscript that would delay for about 10 seconds and then start waiting for the process to end once it started up again.  I thought I could do the same below but it isnt working. Ideas?

 

; Map Network drive for installing Matlab r2015b
RunWait(@ComSpec & ' /c  ' & "net use X: \\Server\Share\MATLAB_R2015b /user:BOB p@$$w3rd", @TempDir, @SW_HIDE)

;Install Matlab

RunWait("x:\setup.exe -inputfile x:\installer_input.txt")
Sleep(60000)
ProcessWaitClose("setup.exe")

; Disconnect Mapped Drive

RunWait(@ComSpec & ' /c  ' & "Net use /del x: /yes", @TempDir, @SW_HIDE)

Link to comment
Share on other sites

From what you described, this may work for you.  

Global $sMapDrive = "X:"
Global $sMATLABPath = $sMapDrive & "\MATLAB_R2015b"
Global $sSetupEXE = "setup.exe"

;Map network drive.
DriveMapAdd($sMapDrive, "\\Server\Share", 0, "BOB", "p@$$w3rd")

;Run installer
Run('"' & $sMATLABPath & '\' & $sSetupEXE & '" -inputfile "' & $sMATLABPath & '\installer_input.txt"', $sMATLABPath, @SW_HIDE)

;Wait for setup process to exist.
ProcessWait($sSetupEXE)

;Wait for the process to close.
ProcessWaitClose($sSetupEXE)

;Wait for the process to exist again.
ProcessWait($sSetupEXE)

;Wait for the process to close again.
ProcessWaitClose($sSetupEXE)

;Unmap the drive.
DriveMapDel($sMapDrive)

 

Adam

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...