• =?UTF-8?B?RmluZGluZyAuLlxpbmdyZXNcbGliIGZvciBhIHNjcmlwdA==?=

    From Roy Hann@21:1/5 to All on Sun Jan 23 20:30:16 2022
    In the *nix world I would look for $II_SYSTEM and navigate from there.
    But there is no II_SYSTEM in Windows. Is there anything that makes it
    look like I know what I'm doing other than searching %LIB% for an entry
    ending with "ingres\lib"?

    Roy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul White@21:1/5 to Roy Hann on Mon Jan 24 10:06:52 2022
    Hi Roy,

    If the sysop has decided not install II_SYSTEM in in the System
    environment (or there may be multiple installations) then you have an
    number of options to search for installations:

    If you have access to an Ingres Command window.

    set | find "II"
    set | find /i "lib"


    Right click on an Ingres utility icon to see the wrapper which sets the environment based on the location.  In that shell you can query
    environment and ingprenv:

    eg
    Actian Administrator Command Prompt
    C:\IngresII\ingres\bin\ingadminwrap.exe "C:\Windows\system32\CMD.EXE" /K "C:\IngresII\ingres\bin\setingenvs.bat"

    Actian Visual DBA
    C:\IngresII\ingres\bin\ingwrap.exe "C:\IngresII\ingres\bin\vdba.exe"


    For DB servers I always use the 8 character name  to simplify admin scripting.  eg C:\IngresII, D:\IngresII or similar.  Default windows directories are usually:

    C:\ProgramData\Actian\
    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Actian>
    C:\Program Files\Actian\
    C:\Program Files (x86) \Actian\


    If you have admin access to the server the reg command can be used directly:

    reg query HKLM\Software\classes | find /i "\ingres"

    HKEY_LOCAL_MACHINE\Software\classes\Ingres.IIA.II HKEY_LOCAL_MACHINE\Software\classes\Ingres.VDBA.II HKEY_LOCAL_MACHINE\Software\classes\IngresImportExport HKEY_LOCAL_MACHINE\Software\classes\IngresImportExport.1 HKEY_LOCAL_MACHINE\Software\classes\Ingres_Database_II


    reg query hklm\software\classes\ingres_database_ii /s HKEY_LOCAL_MACHINE\software\classes\ingres_database_ii\shell
        II_SYSTEM    REG_SZ    C:\IngresII
        II_INSTALLATION    REG_SZ    II
        II_TEMPORARY    REG_SZ    C:\ProgramData\Actian\IngresII\temp


    The output of commands can be captured to a variable if you are trying
    to automate:

    for /f "tokens=*" %%a in ( 'reg query hklm\software\classes\ingres_database_ii /s ^| find "II_SYSTEM"') do set MYLOC=%%a
    set MYLOC=II_SYSTEM    REG_SZ C:\IngresII
    echo %MYLOC%
    II_SYSTEM    REG_SZ    C:\IngresII

    for /f "tokens=3" %%a in ( 'reg query hklm\software\classes\ingres_database_ii /s ^| find "II_SYSTEM"') do set MYLOC=%%a
    set MYLOC=C:\IngresII
    echo %MYLOC%
    C:\IngresII

    (ps use %a instead of %%a if running directly from command window)


    You can use Powershell to retrieve registry items without admin access. 
    I'm not a fan of powershell.  All my scripts are traditional windows BAT files.

    PS W:\> Get-ChildItem -Path HKLM:\software\classes\ingres* |
    Select-Object Name
    Name
    ----
    HKEY_LOCAL_MACHINE\software\classes\Ingres.IIA.II HKEY_LOCAL_MACHINE\software\classes\Ingres.VDBA.II HKEY_LOCAL_MACHINE\software\classes\IngresImportExport HKEY_LOCAL_MACHINE\software\classes\IngresImportExport.1 HKEY_LOCAL_MACHINE\software\classes\Ingres_Database_II


    PS W:\> Get-Item -Path HKLM:\software\classes\ingres_database_II\shell
        Hive: HKEY_LOCAL_MACHINE\software\classes\ingres_database_II\ Name                           Property ----                           -------- shell                          II_SYSTEM       : C:\IngresII
                                   II_INSTALLATION : II
                                   II_TEMPORARY    :
    C:\ProgramData\Actian\IngresII\temp


    PS W:\> Get-ItemProperty -Path
    HKLM:\software\classes\ingres_database_II\shell
    II_SYSTEM       : C:\IngresII
    II_INSTALLATION : II
    II_TEMPORARY    : C:\ProgramData\Actian\IngresII\temp PSPath          : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software\classes\ingr
                      es_database_II\shell
    PSParentPath    : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software\classes\ingr
                      es_database_II
    PSChildName     : shell
    PSDrive         : HKLM
    PSProvider      : Microsoft.PowerShell.Core\Registry


    PS W:\> Get-ItemPropertyValue -Path HKLM:\software\classes\ingres_database_II\shell -name II_SYSTEM
    C:\IngresII


    On 24/01/2022 6:30 am, Roy Hann wrote:
    In the *nix world I would look for $II_SYSTEM and navigate from there.
    But there is no II_SYSTEM in Windows. Is there anything that makes it
    look like I know what I'm doing other than searching %LIB% for an entry ending with "ingres\lib"?

    Roy
    _______________________________________________
    Info-ingres mailing list
    Info-ingres@lists.planetingres.org https://lists.planetingres.org/mailman/listinfo/info-ingres

    --
    Paul White<br>
    Shift Seven Solutions<br>
    <b>m: 0414681799</b><br>
    p: 0754482137<br>
    e: paul.white@shift7solutions.com.au<br>
    w: https://www.shift7solutions.com.au<br>
    International: +61414681799<br>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roy Hann@21:1/5 to Paul White on Mon Jan 24 09:16:00 2022
    Thanks for that very comprehensive response Paul. That's a great public service.

    Not to take anything away from the rest of what you wrote, your first
    sentence points out something I didn't know. As it happens almost all
    my Windows machines running Ingres have multiple installations. So
    that explains why I don't see II_SYSTEM.

    Sure enough, I just hopped onto the one machine with only a single
    installation and II_SYSTEM is set, ripe for use.

    I am still puzzling over why it wouldn't be set on my other machines
    when it is implied in settings in PATH, LIB, etc.

    Since I would need to do an ingprenv to get the installation identifier
    I think parsing %LIB% for the "ingres\lib" entry remains the most
    concise solution. But bleh.

    Thanks again for putting my mind at rest.

    Roy

    Paul White wrote:

    Hi Roy,

    If the sysop has decided not install II_SYSTEM in in the System
    environment (or there may be multiple installations) then you have an
    number of options to search for installations:

    If you have access to an Ingres Command window.

    set | find "II"
    set | find /i "lib"


    Right click on an Ingres utility icon to see the wrapper which sets the environment based on the location.  In that shell you can query
    environment and ingprenv:

    eg
    Actian Administrator Command Prompt
    C:\IngresII\ingres\bin\ingadminwrap.exe "C:\Windows\system32\CMD.EXE" /K "C:\IngresII\ingres\bin\setingenvs.bat"

    Actian Visual DBA
    C:\IngresII\ingres\bin\ingwrap.exe "C:\IngresII\ingres\bin\vdba.exe"


    For DB servers I always use the 8 character name  to simplify admin scripting.  eg C:\IngresII, D:\IngresII or similar.  Default windows directories are usually:

    C:\ProgramData\Actian\
    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Actian>
    C:\Program Files\Actian\
    C:\Program Files (x86) \Actian\


    If you have admin access to the server the reg command can be used directly:

    reg query HKLM\Software\classes | find /i "\ingres"

    HKEY_LOCAL_MACHINE\Software\classes\Ingres.IIA.II HKEY_LOCAL_MACHINE\Software\classes\Ingres.VDBA.II HKEY_LOCAL_MACHINE\Software\classes\IngresImportExport HKEY_LOCAL_MACHINE\Software\classes\IngresImportExport.1 HKEY_LOCAL_MACHINE\Software\classes\Ingres_Database_II


    reg query hklm\software\classes\ingres_database_ii /s HKEY_LOCAL_MACHINE\software\classes\ingres_database_ii\shell
        II_SYSTEM    REG_SZ    C:\IngresII
        II_INSTALLATION    REG_SZ    II
        II_TEMPORARY    REG_SZ    C:\ProgramData\Actian\IngresII\temp


    The output of commands can be captured to a variable if you are trying
    to automate:

    for /f "tokens=*" %%a in ( 'reg query hklm\software\classes\ingres_database_ii /s ^| find "II_SYSTEM"') do set MYLOC=%%a
    set MYLOC=II_SYSTEM    REG_SZ C:\IngresII
    echo %MYLOC%
    II_SYSTEM    REG_SZ    C:\IngresII

    for /f "tokens=3" %%a in ( 'reg query hklm\software\classes\ingres_database_ii /s ^| find "II_SYSTEM"') do set MYLOC=%%a
    set MYLOC=C:\IngresII
    echo %MYLOC%
    C:\IngresII

    (ps use %a instead of %%a if running directly from command window)


    You can use Powershell to retrieve registry items without admin access. 
    I'm not a fan of powershell.  All my scripts are traditional windows BAT files.

    PS W:\> Get-ChildItem -Path HKLM:\software\classes\ingres* |
    Select-Object Name
    Name
    ----
    HKEY_LOCAL_MACHINE\software\classes\Ingres.IIA.II HKEY_LOCAL_MACHINE\software\classes\Ingres.VDBA.II HKEY_LOCAL_MACHINE\software\classes\IngresImportExport HKEY_LOCAL_MACHINE\software\classes\IngresImportExport.1 HKEY_LOCAL_MACHINE\software\classes\Ingres_Database_II


    PS W:\> Get-Item -Path HKLM:\software\classes\ingres_database_II\shell
        Hive: HKEY_LOCAL_MACHINE\software\classes\ingres_database_II\ Name                           Property
    ----                           --------
    shell                          II_SYSTEM       : C:\IngresII
                                   II_INSTALLATION : II
                                   II_TEMPORARY    : C:\ProgramData\Actian\IngresII\temp


    PS W:\> Get-ItemProperty -Path HKLM:\software\classes\ingres_database_II\shell
    II_SYSTEM       : C:\IngresII
    II_INSTALLATION : II
    II_TEMPORARY    : C:\ProgramData\Actian\IngresII\temp
    PSPath          : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software\classes\ingr
                      es_database_II\shell
    PSParentPath    : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software\classes\ingr
                      es_database_II
    PSChildName     : shell
    PSDrive         : HKLM
    PSProvider      : Microsoft.PowerShell.Core\Registry


    PS W:\> Get-ItemPropertyValue -Path HKLM:\software\classes\ingres_database_II\shell -name II_SYSTEM
    C:\IngresII


    On 24/01/2022 6:30 am, Roy Hann wrote:
    In the *nix world I would look for $II_SYSTEM and navigate from there.
    But there is no II_SYSTEM in Windows. Is there anything that makes it
    look like I know what I'm doing other than searching %LIB% for an entry
    ending with "ingres\lib"?

    Roy
    _______________________________________________
    Info-ingres mailing list
    Info-ingres@lists.planetingres.org
    https://lists.planetingres.org/mailman/listinfo/info-ingres


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)