2 Replies Latest reply on Jun 21, 2013 11:48 AM by mark.postema

    configurator -skiplicense during a batch installation

    Jim_Cosenzo

      Hi

      When installing Expedition from a batchinstall.bat file is it possible at the end of the process when the configurator is run, to run it with the -skiplicense option?

       

      I've looked at using the -inifile <path2ininfile> but it does not behave in the same way the -skiplicense acommand line argument does.

       

      thanks

      Jim

        • 1. Re: configurator -skiplicense during a batch installation
          clint.cote

          Here is a visual basic script I use to streamline switching between versions.  This is after the installation so it's not quite what your asking for.  Notice the switch uses a "/".

           

          'Script to set environment variables and run Configurator
          Dim WSHShell
          Set WSHShell = WScript.CreateObject("WScript.Shell")

          WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\WDIR", "<USER_WDIR>;<CORPORATE_WDIR>;C:\MentorGraphics\2005EXP\SDD_HOME\standard"

          WSHShell.Run "C:\MentorGraphics\win32\configurator.exe /skiplicense /version=2005EXP"
          Set WSHShell = Nothing

           

          The WDIR entries are generic you would need to fill in the appropriate paths.

          • 2. Re: configurator -skiplicense during a batch installation
            mark.postema

            Here is my script... it also has some workarounds to some annoying Mentor install requirements:

             

            @ECHO OFF

            CLS

            SETLOCAL

            REM ***************************************************************************************

            REM *** This file is provided as-is.  Modifications to this file are at your own risk.  ***

            REM *** The End User License Agreement was accepted during the creation of this script. ***

            REM ***************************************************************************************

            REM Generated by MIP v4.1-027

            SET PROMPT_TARG=F

            SET MIPPATH=\\Znas1\cae_mentor$\mentor_soft\EE7.9.4\setup.exe

            SET MG_INSTALL_PID=%COMPUTERNAME%-%Time::=.%

            SET MG_INSTALL_PID=%MG_INSTALL_PID:,=.%

            SET NEWTARG=

            SET NEWSRC=

            SET NEWMIPLOC=

            SET MIP_PATH_ERRORS=0

            SET Self=%~f0

            SET TEMP=%TEMP:/=\%

            rem CD /D %~dp0

            :LOOP

            IF [%1]==[] GOTO DoneArgs

            IF /I [%1]==[-tgt] GOTO TARG

            IF /I [%1]==[-src] GOTO SRC

            IF /I [%1]==[-msiloc] GOTO MSILOC

            echo "USAGE: %~nx0 [-tgt <target>] [-src <source>] [-msiloc <path>]"

            GOTO :EOF

            :TARG

            SHIFT

            SET NEWTARG=-tgt "%~1"

            SET PROMPT_TARG=F

            GOTO NEXT

            :SRC

            SHIFT

            SET NEWSRC=-src "%~1"

            GOTO NEXT

            :MSILOC

            SHIFT

            SET NEWMIPLOC=-msiloc "%~1"

            GOTO NEXT

            :NEXT

            SHIFT

            GOTO LOOP

            :DoneArgs

            FOR %%A IN ("%MIPPATH%") DO SET MIPFILE=%%~nxA

            DIR /A-D /B "%MIPPATH%" 2>NUL | FINDSTR /I /X "%MIPFILE%" >NUL 2>&1

            IF ERRORLEVEL 1 echo MIPPATH of "%MIPPATH%" must exist and not be a directory.

            IF NOT ERRORLEVEL 1 GOTO CheckTarg

            SET /A MIP_PATH_ERRORS+=1

            IF NOT %MIP_PATH_ERRORS% lss 10 GOTO :EOF

            SET /P MIPPATH=Enter path to SETUP.EXE (or 'x' to quit):

            IF [%MIPPATH%]==[x] GOTO :EOF

            GOTO DoneArgs

            :CheckTarg

            IF NOT ["%PROMPT_TARG%"]==["T"] GOTO MakeTarg

            SET /P ENTERED_TARG=Enter a Target Directory:

            SET NEWTARG=-tgt "%ENTERED_TARG%"

            :MakeTarg

            SET ansfile="%TEMP%.\~ans.tmp"

            echo d> %ansfile%

            echo yes>> %ansfile%

             

             

            REM *** ADD YOUR OWN PRE INSTALL COMMANDS BELOW HERE ***

             

             

            REM Date/Time Routine

            ::Get the date

            For /f "tokens=1-4 delims=/-. " %%G in ('Date /t') Do (Call :s_fixdate %%G %%H %%I %%J)

            Goto :s_time

            :s_fixdate

            if "%1:~0,1%" GTR "9" Shift

            For /f "skip=1 tokens=2-4 delims=(-)" %%G in ('Echo.^|Date') Do (

              Set %%G=%1&Set %%H=%2&Set %%I=%3)

            goto :eof

            :s_time

            :: Get the time

            For /f "tokens=1-3 delims=1234567890 " %%a in ("%time%") Do Set "delims=%%a%%b%%c"

            For /f "tokens=1-4 delims=%delims%" %%G in ("%time%") Do (

              Set _hh=%%G

              Set _min=%%H

              Set _ss=%%I

              Set _ms=%%J

            )

            Set _hh=%_hh: =%

            if 1%_hh% LSS 20 Set _hh=0%_hh%

             

             

            REM Set Log file

            set logfile=C:\MentorGraphics_Logs\%yy%-%mm%-%dd%@%_hh%-%_min%-%_ss%_MG_794_Install.log

            REM open/start log file

            IF NOT EXIST C:\MentorGraphics_Logs MKDIR C:\MentorGraphics_Logs

            ECHO Start %DATE% %TIME% >> "%logfile%"

            ECHO Installing Mentor Graphics Expedition Enterprise Flow...

            ECHO+

            ECHO+

            REM Stop and Remove the iCDBNetLauncher service >> %logfile%

            IF EXIST "C:\MentorGraphics\7.9EE\SDD_HOME\iCDB\win32\bin\iCDBNetLauncher.exe" call "C:\MentorGraphics\7.9EE\SDD_HOME\iCDB\win32\bin\iCDBNetLauncher.exe" -stop >> %logfile%

            IF EXIST "C:\MentorGraphics\7.9EE\SDD_HOME\iCDB\win32\bin\iCDBNetLauncher.exe" call "C:\MentorGraphics\7.9EE\SDD_HOME\iCDB\win32\bin\iCDBNetLauncher.exe" -remove >> %logfile%

            IF EXIST "%SDD_HOME%\iCDB\win32\bin\iCDBServerMonitor.exe" call "%SDD_HOME%\iCDB\win32\bin\iCDBServerMonitor.exe" -close  >> %logfile%

             

             

            @PING 127.0.0.1 -n 6 > NUL

             

             

            REM Rename local WDIR

            ECHO Checking WDIR folder >> %logfile%

            IF EXIST C:\WDIR (REN "C:\WDIR" "WDIR_%yy%-%mm%-%dd%@%_hh%-%_min%-%_ss%") >> %logfile%

            MKDIR C:\WDIR >> %logfile%

             

             

            set SDD_NOCONFIG=1

            set SYSENVKEY="HKLM\SYSTEM\CurrentControlSet\Control\SessionManager\Environment"

            set CFGR_INI=%TEMP%\configurator.ini

            ECHO Setting CFGR_INI file >> %logfile%

            REG ADD %SYSENVKEY% /v CFGR_INI /d "%CFGR_INI%" /f >> %logfile%

             

             

            echo [defaults] > "%CFGR_INI%"

            echo mgls_license_file=1717@zvm112-ecae >> "%CFGR_INI%"

            echo wdir=C:\WDIR;M:\WDIR;C:\MentorGraphics\7.9.4EE\SDD_HOME\standard >> "%CFGR_INI%"

             

             

            ECHO Setting Mentor Graphics System Variables >> %logfile%

            ECHO+

            IF EXIST C:\ProgramData (

              \\Znas1\cae_mentor$\mentor_soft\setx MGLS_LICENSE_FILE "C:\ProgramData\mgc\license.dat;1717@zvm112-ecae" -m

              copy /y "\\Znas1\cae_mentor$\mentor_soft\Scripts\Login_ScriptED.lnk" "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Startup" > NUL

              ECHO+

            ) ELSE (

              \\Znas1\cae_mentor$\mentor_soft\setx MGLS_LICENSE_FILE "C:\Documents and Settings\All Users\Application Data\mgc\license.dat;1717@zvm112-ecae" -m

              copy /y "\\Znas1\cae_mentor$\mentor_soft\Scripts\Login_ScriptED.lnk" "%ALLUSERSPROFILE%\Start Menu\Programs\Startup" > NUL

              ECHO+

            )

             

             

            REM set DXDatabook config

            IF EXIST C:\Windows\SysWOW64 (

            C:\Windows\SysWOW64\odbcconf.exe configsysdsn "Microsoft Access Driver (*.mdb)" "DSN=DxDatabook|Description=GentexLib DxDatabook Database|DBQ=M:\libraries\GentexLib\Gentexdxdb.mdb"

            ) ELSE (

            C:\windows\system32\odbcconf.exe configsysdsn "Microsoft Access Driver (*.mdb)" "DSN=DxDatabook|Description=GentexLib DxDatabook Database|DBQ=M:\libraries\GentexLib\Gentexdxdb.mdb"

            )

             

             

            REM set proper system variables

            \\Znas1\cae_mentor$\mentor_soft\setx MGC_REMAP_RSCM zs40-cae2:9004 -m

            \\Znas1\cae_mentor$\mentor_soft\setx WDIR "C:\WDIR;M:\WDIR;C:\MentorGraphics\7.9.4EE\SDD_HOME\standard" -m

             

             

            ECHO+

             

             

            REM *** ADD YOUR OWN PRE INSTALL COMMANDS ABOVE HERE ***

             

             

            START "" /WAIT "%MIPPATH%" -noexecute %NEWMIPLOC%

            IF NOT ["%ProgramFiles(x86)%"]==[""] %WINDIR%\SysWOW64\REGEDIT /E %TEMP%.\~reg.ucs "HKEY_LOCAL_MACHINE\SOFTWARE\MentorGraphics\MentorGraphicsJI"

            IF ["%ProgramFiles(x86)%"]==[""] REGEDIT /E %TEMP%.\~reg.ucs "HKEY_LOCAL_MACHINE\SOFTWARE\MentorGraphics\MentorGraphicsJI"

            TYPE %TEMP%.\~reg.ucs > %TEMP%.\~reg.txt

            FOR /F "skip=3 tokens=1,2 delims==" %%a IN (%TEMP%.\~reg.txt) do if [%%a] == ["InstPath"] SET INST_PATH=%%~b

            "%INST_PATH%\Install.exe" -silent -batch "%Self%" %NEWTARG% %NEWSRC% < %ansfile% >> %logfile%

             

             

            REM *** ADD YOUR OWN POST INSTALL COMMANDS BELOW HERE ***

             

             

            set "SDD_NOCONFIG="

            C:\MentorGraphics\win32\configurator.exe /version=7.9.4EE -inifile=%CFGR_INI% /skiplicense

            ECHO Unsetting CFGR_INI file >> %logfile%

            REG DELETE %SYSENVKEY% /v CFGR_INI /f >> %logfile%

             

             

            ECHO+

            ECHO+

            ECHO END %DATE% %TIME% >> "%logfile%"

            rem pause

             

             

            REM write check file

            ECHO "%SDD_HOME%" > "C:\MG_794.txt"

             

             

            REM *** ADD YOUR OWN POST INSTALL COMMANDS ABOVE HERE ***

            GOTO :EOF

             

             

            REM ##### BELOW HERE IS XML DATA #####

             

             

            <batchFile>

            <source value="\\Znas1\cae_mentor$\mentor_soft\EE7.9.4"/>

            <target value="C:\MentorGraphics"/>

            <accessPath value="\\znas1\cae_mentor$\mentor_soft\EE794docs\7.9.4EE\docs"/>

            <installType value="software"/>

            <platform value="Windows"/>

            <release name="Expedition Enterprise Flow">

            <product name="AutoActive PCB Browser" productroot="7.9.4EE"/>

            <product name="CES" productroot="7.9.4EE"/>

            <product name="DxDataBook" productroot="7.9.4EE"/>

            <product name="DxDesigner" productroot="7.9.4EE"/>

            <product name="Expedition PCB" productroot="7.9.4EE"/>

            <product name="FabLink XE" productroot="7.9.4EE"/>

            <product name="Library Manager DxDesigner-Expedition" productroot="7.9.4EE"/>

            <product name="Report Writer" productroot="7.9.4EE"/>

            <product name="Smart Utilities" productroot="7.9.4EE"/>

            <product name="Spice Integration" productroot="7.9.4EE"/>

            <product name="Variant Manager" productroot="7.9.4EE"/>

            <product name="iCDB Server Manager" productroot="7.9.4EE"/>

            <product name="iCDB Server Monitor" productroot="7.9.4EE"/>

            </release>

            </batchFile>