Hi have a script which looks like it. But some how it does nt take silent switches. Can anybody help me figure out? Thanks '======= Install Script ========================================================================================= '================================================================================================================= DEPLOYNAME = "visual studio 2012 premium" On Error Resume Next Set sh = CreateObject("WScript.Shell") Set fs = CreateObject("Scripting.FileSystemObject") quote = chr(34) SCRIPTDIR = fs.GetAbsolutePathName(".") LOGFILE = sh.expandenvironmentstrings("%TEMP%\visual studio 2012 premium All -I.log") BUILDLOG = LOGFILE & "\" & DEPLOYNAME '======= App Install Section ========================================================================================= '================================================================================================================= MYFILE = SCRIPTDIR & "\dotNetFx45_Full_x86_x64.exe" If fs.fileexists(MYFILE) Then CMDLINE ="/q /norestart=" & quote lret = sh.run(quote & MYFILE & quote & CMDLINE,1,True) End If '=======Visual studio Install Section ========================================================================================= '================================================================================================================= MYFILE1 = SCRIPTDIR & "\vs_premium.exe" If fs.fileexists(MYFILE1) Then CMDLINE ="/passive /norestart /full /noweb=" & quote lret = sh.run(quote & MYFILE1 & quote & CMDLINE,1,True) End If
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

You script is very unclear, But what I understand is that you do not know the silent switch's of installations...correct?

But I would advise to try in dos prompt first, I guess something like:
/s - /silent - /quiet

Answered 04/09/2014 by: dedenker
Third Degree Black Belt

Please log in to comment
0

I think you either have a rogue 'quote' reference or some text missing after the "noweb=" part. I would've posted the corrected line but this idiot text-box doesn't allow pasting!!

It would be much easier to see if you took the trouble to reformat the text. Let's leave aside the issue that this forum *still* doesn't have the ability - except here in the 'Answer' section - to tag text as code.

MYFILE1 = SCRIPTDIR & "\vs_premium.exe" If fs.fileexists(MYFILE1) Then CMDLINE ="/passive /norestart /full /noweb=" & quote lret = sh.run(quote & MYFILE1 & quote & CMDLINE,1,True) End If - See more at: http://www.itninja.com/question/vb-script-help-needed-to-detect-error#sthash.CCzcuHko.dpuf
MYFILE1 = SCRIPTDIR & "\vs_premium.exe" If fs.fileexists(MYFILE1) Then CMDLINE ="/passive /norestart /full /noweb=" & quote lret = sh.run(quote & MYFILE1 & quote & CMDLINE,1,True) End If - See more at: http://www.itninja.com/question/vb-script-help-needed-to-detect-error#sthash.CCzcuHko.dpuf
MYFILE1 = SCRIPTDIR & "\vs_premium.exe" If fs.fileexists(MYFILE1) Then CMDLINE ="/passive /norestart /full /noweb=" & quote lret = sh.run(quote & MYFILE1 & quote & CMDLINE,1,True) End If - See more at: http://www.itninja.com/question/vb-script-help-needed-to-detect-error#sthash.CCzcuHko.dpuf
Answered 04/09/2014 by: VBScab
Red Belt

Please log in to comment
0

You need a space between the path to the executable and the switches

ex.

CMDLINE = " /MyFirstSwitch"

Answered 04/14/2014 by: AngelD
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity