PDA

View Full Version : Detect Clarion outside of the Wizard



NewsArchive
05-09-2011, 01:41 AM
Friedrich,

With the arrival of Clarion 8, running our C7 installs with the /S no longer
runs automatically, because the wizard presents the option of whether to
install into C8 or C7.3. In addition to the /S switch, I'd like to pass the
desired version on the command line (Which I can do no prob). The problem is
that I'd like not to present the wizard to the user (in order to detect the
Clarion install path).

So I have 2 questions:
1) How do I detect if the install is running in silent mode (in order to
hide that particular "Clarion detection" wizard tab to enforce a completely
automatic installation)?
2) How do I auto-detect the clarion path without present the wizard to the
user (i.e. is there a function I can use instead of the wizard dialog
window)?

I could not seem to find this in any of the clarion detection examples. If
there is one that does this kind of thing, I'm all ears.

Thanks a ton

Geoff

NewsArchive
05-09-2011, 01:41 AM
Hi Geoff,

I think I already answered your question in the C8 newsgroup some days ago.

You can use the following to check if the installer is running in silent
mode:

If %_SB_INSTALLERFLAG% Equals "1" on Position "$SB_SILENTMODEFLAG$" Then
Display Message Box "Silent Mode Active" -- "" [non-silent]
End

The %_SB_TMP% variable in the "If Clarion..." Statement returns the full
path and exe name of the (detected) Clarion IDE.

BTW, the new "Handle String Operation (Extract Root Folder)" should extract
the correct root folder for you.

For example:

Set Variable %TEST% to "C:\Clarion8\bin\clarion.exe"
Set Variable %MY_ROOT% to FUNCTION:Extract Root Folder(%TEST%)

MY_ROOT should hold C:\Clarion8 here.

Does this help?

Friedrich

NewsArchive
05-11-2011, 01:43 AM
Friedrich,

Thanks a ton for the info. This will come in most useful. I apologize for
re-asking, it seems my original post got deleted on the c8 ng (I thought it
failed sending when I couldn't find on the NGs).

Geoff

NewsArchive
05-27-2011, 12:40 AM
Friedrich,

Here's what I did so you can use it for reference:

Basically the only thing I needed to tweak was the following

BTW, the new "Handle String Operation (Extract Root Folder)" should extract
the correct root folder for you.

Here's what I did:

Set Variable %CLARIONDIRECTORY% to FUNCTION:Extract Full Folder(%_SB_TMP%)
Set Variable %CLARIONDIRECTORYLEN% to FUNCTION:Len(%CLARIONDIRECTORY%)
Set Variable %CLARIONDIRECTORYLEN% to "%CLARIONDIRECTORYLEN%-4"
Set Variable %CLARIONDIRECTORY% to FUNCTION:Left(%CLARIONDIRECTORY%,
%CLARIONDIRECTORYLEN%)

Not everyone installs into the root folder, so I just got the full folder,
and lopped off the \bin at the end.

HTH

Geoff