• Setup Factory 9制作包含ArcGIS Engine的安装包的脚本


    使用Setup Factory 9制作包含ArcGIS Engine的安装包的脚本
    【屏幕】->【安装之后】->【编辑】->【操作】->【On Next】

    -- These actions are performed when the Next button is clicked.
    -- 询问用户是否安装ArcGIS Engine Runtime 和 ArcGIS license manager
    result = Dialog.Message("注意", "是否继续安装 ArcGIS Engine ?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);

    if (result == IDYES) then
    -- 如果ArcGIS runtime 自解压文件不存在,则退出安装程序
    if not File.DoesExist("%TempLaunchFolder%\arcgis runtime.exe") then
    rs = Dialog.Message("注意", "ArcGIS Engine Runtime 自解压文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- ****************************************************************************************
    -- *********************step 01.安装 ArcGIS Engine Runtime*********************************

    -- 如果选择安装,则执行arcgis runtime.exe自解压文件到C:\temp\临时目录
    Shell.Execute(SessionVar.Expand("%TempLaunchFolder%\arcgis runtime.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断该程序是否执行完毕,才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("%TempLaunchFolder%\arcgis runtime.exe"));
    until not setupend

    -- 如果安装文件不存在则退出安装程序
    if not File.DoesExist("C:\temp\arcgis runtime\setup.exe") then
    rs = Dialog.Message("注意", "ArcGIS Engine Runtime 安装文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 继续执行arcgis runtime目录中的Setup.exe
    Shell.Execute(SessionVar.Expand("C:\temp\arcgis runtime\setup.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断setup.exe程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\arcgis runtime\setup.exe"));
    until not setupend

    -- 判断setup.msi程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\arcgis runtime\setup.msi"));
    until not setupend

    -- ****************************************************************************************
    -- *********************step 02.安装 ArcGIS_Engine_Runtime_中文补丁************************

    -- 如果ArcGIS_Engine_Runtime_中文补丁文件不存在,则退出安装程序
    if not File.DoesExist("%TempLaunchFolder%\ArcGIS_Engine_Runtime_中文补丁.msi") then
    rs = Dialog.Message("注意", "ArcGIS Engine Runtime 中文补丁文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 执行ArcGIS_Engine_Runtime_中文补丁.msi
    Shell.Execute(SessionVar.Expand("%TempLaunchFolder%\ArcGIS_Engine_Runtime_中文补丁.msi"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断该程序是否执行完毕,才能

    继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("%TempLaunchFolder%\ArcGIS_Engine_Runtime_中文补丁.msi"));
    until not setupend

    -- ****************************************************************************************
    -- *********************step 03.安装 ArcGIS Engine 10 SP4(简体中文)**********************

    -- 如果ArcGIS Engine 10 SP4(简体中文)自解压文件不存在,则退出安装程序
    if not File.DoesExist("%TempLaunchFolder%\ArcGISEngine10SP4_SimplifiedChinese.exe") then
    rs = Dialog.Message("注意", "ArcGIS Engine 10 SP4(简体中文)自解压文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 执行ArcGISEngine10SP4_SimplifiedChinese.exe自解压文件到C:\temp\临时目录
    Shell.Execute(SessionVar.Expand("%TempLaunchFolder%\ArcGISEngine10SP4_SimplifiedChinese.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断该程序是否执行完毕,才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("%TempLaunchFolder%\ArcGISEngine10SP4_SimplifiedChinese.exe"));
    until not setupend

    -- 如果安装文件不存在则退出安装程序
    if not File.DoesExist("C:\temp\ArcGISEngine10SP4_SimplifiedChinese\Setup.exe") then
    rs = Dialog.Message("注意", "ArcGIS Engine 10 SP4(简体中文)安装文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 继续执行ArcGISEngine10SP4_SimplifiedChinese目录中的Setup.exe
    Shell.Execute(SessionVar.Expand("C:\temp\ArcGISEngine10SP4_SimplifiedChinese\Setup.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断Setup.exe程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\ArcGISEngine10SP4_SimplifiedChinese\Setup.exe"));
    until not setupend

    -- ****************************************************************************************
    -- *********************step 04.安装 ArcGIS license manager********************************

    -- 如果ArcGIS license manager 自解压文件不存在,则退出安装程序
    if not File.DoesExist("%TempLaunchFolder%\arcgis license manager.exe") then
    rs = Dialog.Message("注意", "ArcGIS license manager 自解压文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 执行arcgis license manager.exe自解压文件到C:\temp\临时目录
    Shell.Execute(SessionVar.Expand("%TempLaunchFolder%\arcgis license manager.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断该程序是否执行完毕,才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("%TempLaunchFolder%\arcgis license manager.exe"));
    until not setupend

    -- 如果安装文件不存在则退出安装程序
    if not File.DoesExist("C:\temp\arcgis license manager\Setup.exe") then

    rs = Dialog.Message("注意", "ArcGIS license manager 安装文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 继续执行arcgis license manager目录中的Setup.exe
    Shell.Execute(SessionVar.Expand("C:\temp\arcgis license manager\Setup.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断Setup.exe程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\arcgis license manager\Setup.exe"));
    until not setupend

    -- 判断setup.msi程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\arcgis license manager\setup.msi"));
    until not setupend

    -- ****************************************************************************************
    -- *********************step 05.删除临时文件********************************
    -- 安装完毕后删除临时文件
    Folder.DeleteTree("C:\temp\arcgis runtime\", nil);
    Folder.DeleteTree("C:\temp\arcgis license manager\", nil);
    Folder.DeleteTree("C:\temp\ArcGISEngine10SP4_SimplifiedChinese\", nil);

    end

    -- advance to the next screen
    Screen.Next();

  • 相关阅读:
    模块二
    lambda map() filter() zip()练习
    装饰器
    函数模块回顾
    连接不同数据OleDb(不完整)
    连接不同的数据库
    连接数据库ORACLE(不完整)
    多数据之间的连接操作ODBC(不完整)
    ora0131
    ORACLE linux 下 sqlplus命令
  • 原文地址:https://www.cnblogs.com/lihaijia/p/14581402.html
Copyright © 2020-2023  润新知