/build/static/layout/Breadcrumb_cap_w.png

vb script help needed to detect error

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

Answers (3)

Posted by: dedenker 10 years ago
3rd Degree Black Belt
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

Posted by: anonymous_9363 10 years ago
Red Belt
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
Posted by: AngelD 10 years ago
Red Belt
0

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

ex.

CMDLINE = " /MyFirstSwitch"

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ