PDA

View Full Version : CodeJock SetupBuilder script - how I do all this dynamicaly



NewsArchive
10-24-2013, 09:07 AM
For those interested here is the SB script I use to install and
register

at top of script in "defines"
(as you see here you can change the version number required (TWO vars)
!
////////////////////////////////////////////////////////////////////////////////
! CodeJock Installs
Set Variable %IS_64X_OS% to FUNCTION:Get System Info(WOW64 Status)
Set Variable %IS_INSTALL_CJ_VERSION% to "15.3.1"
#set compiler variable [CJ_VERSION_VAR] = "v15.3.1"
Set Variable %IS_INSTALL_CJ_FULL_NAME% to "Software\Codejock
Software\Xtreme SuitePro ActiveX v"
Set Variable %IS_INSTALL_CJ_FULL_NAME% to "%IS_INSTALL_CJ_VERSION%"
[Append Value]
Set Variable %IS_CJINSTALL_PATH% to FUNCTION:Get Registry Key
Value("Default") from "HKEY_CURRENT_USER\%IS_INSTALL_CJ_FULL_NAME%"
Set Variable %IS_INSTALL_COMMANDBAR% to "0"
Set Variable %IS_INSTALL_DOCKINGPANE% to "0"
Set Variable %IS_INSTALL_REPORTCONTROL% to "0"
Set Variable %IS_INSTALL_FLOWGRAPH% to "0"
Set Variable %IS_INSTALL_PROPERTYGRID% to "0"
Set Variable %IS_INSTALL_SYNTAXEDIT% to "0"
Set Variable %IS_INSTALL_CJ_COMMANDBAR_NAME% to
"Codejock.CommandBars.v"
Set Variable %IS_INSTALL_CJ_COMMANDBAR_NAME% to
"%IS_INSTALL_CJ_VERSION%" [Append Value]
Set Variable %IS_INSTALL_CJ_COMMANDBAR_OCX% to
"%IS_INSTALL_CJ_COMMANDBAR_NAME%.ocx"
Set Variable %IS_INSTALL_CJ_DOCKINGPANE_NAME% to
"Codejock.DockingPane.v"
Set Variable %IS_INSTALL_CJ_DOCKINGPANE_NAME% to
"%IS_INSTALL_CJ_VERSION%" [Append Value]
Set Variable %IS_INSTALL_CJ_DOCKINGPANE_OCX% to
"%IS_INSTALL_CJ_DOCKINGPANE_NAME%.ocx"
Set Variable %IS_INSTALL_CJ_REPORTCONTROL_NAME% to
"Codejock.ReportControl.v"
Set Variable %IS_INSTALL_CJ_REPORTCONTROL_NAME% to
"%IS_INSTALL_CJ_VERSION%" [Append Value]
Set Variable %IS_INSTALL_CJ_REPORTCONTROL_OCX% to
"%IS_INSTALL_CJ_REPORTCONTROL_NAME%.ocx"
Set Variable %IS_INSTALL_CJ_FLOWGRAPH_NAME% to "Codejock.FlowGraph.v"
Set Variable %IS_INSTALL_CJ_FLOWGRAPH_NAME% to
"%IS_INSTALL_CJ_VERSION%" [Append Value]
Set Variable %IS_INSTALL_CJ_FLOWGRAPH_OCX% to
"%IS_INSTALL_CJ_FLOWGRAPH_NAME%.ocx"
Set Variable %IS_INSTALL_CJ_PROPERTYGRID_NAME% to
"Codejock.PropertyGrid.v"
Set Variable %IS_INSTALL_CJ_PROPERTYGRID_NAME% to
"%IS_INSTALL_CJ_VERSION%" [Append Value]
Set Variable %IS_INSTALL_CJ_PROPERTYGRID_OCX% to
"%IS_INSTALL_CJ_PROPERTYGRID_NAME%.ocx"
Set Variable %IS_INSTALL_CJ_SYNTAXEDIT_NAME% to "Codejock.SyntaxEdit.v"
Set Variable %IS_INSTALL_CJ_SYNTAXEDIT_NAME% to
"%IS_INSTALL_CJ_VERSION%" [Append Value]
Set Variable %IS_INSTALL_CJ_SYNTAXEDIT_OCX% to
"%IS_INSTALL_CJ_SYNTAXEDIT_NAME%.ocx"
If %IS_CJINSTALL_PATH% Does Not Equal "" Then
Set Variable %IS_CJINSTALL_PATH% to "\Bin" [Append Value]

Set Variable %IS_INSTALL_COMMANDBAR_CLSID% to FUNCTION:Get Registry
Key Value("CLSID") from
"HKEY_CLASSES_ROOT\%IS_INSTALL_CJ_COMMANDBAR_NAME%"
If %IS_INSTALL_COMMANDBAR_CLSID% Does Not Equal "" Then
Set Variable %IS_INSTALL_COMMANDBAR% to "1"
End
Set Variable %IS_INSTALL_DOCKINGPANE_CLSID% to FUNCTION:Get Registry
Key Value("CLSID") from
"HKEY_CLASSES_ROOT\%IS_INSTALL_CJ_DOCKINGPANE_NAME%"
If %IS_INSTALL_DOCKINGPANE_CLSID% Does Not Equal "" Then
Set Variable %IS_INSTALL_DOCKINGPANE% to "1"
End
Set Variable %IS_INSTALL_REPORTCONTROL_CLSID% to FUNCTION:Get
Registry Key Value("CLSID") from
"HKEY_CLASSES_ROOT\%IS_INSTALL_CJ_REPORTCONTROL_NAM E%"
If %IS_INSTALL_REPORTCONTROL_CLSID% Does Not Equal "" Then
Set Variable %IS_INSTALL_REPORTCONTROL% to "1"
End
Set Variable %IS_INSTALL_FLOWGRAPH_CLSID% to FUNCTION:Get Registry
Key Value("CLSID") from
"HKEY_CLASSES_ROOT\%IS_INSTALL_CJ_FLOWGRAPH_NAME%"
If %IS_INSTALL_FLOWGRAPH_CLSID% Does Not Equal "" Then
Set Variable %IS_INSTALL_FLOWGRAPH% to "1"
End
Set Variable %IS_INSTALL_PROPERTYGRID_CLSID% to FUNCTION:Get
Registry Key Value("CLSID") from
"HKEY_CLASSES_ROOT\%IS_INSTALL_CJ_PROPERTYGRID_NAME %"
If %IS_INSTALL_PROPERTYGRID_CLSID% Does Not Equal "" Then
Set Variable %IS_INSTALL_PROPERTYGRID% to "1"
End
Set Variable %IS_INSTALL_SYNTAXEDIT_CLSID% to FUNCTION:Get Registry
Key Value("CLSID") from
"HKEY_CLASSES_ROOT\%IS_INSTALL_CJ_SYNTAXEDIT_NAME%"
If %IS_INSTALL_SYNTAXEDIT_CLSID% Does Not Equal "" Then
Set Variable %IS_INSTALL_SYNTAXEDIT% to "1"
End
Else
If %IS_64X_OS% Equals "1" Then
Set Variable %IS_CJINSTALL_PATH% to "C:\Program Files
(x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX
v%IS_INSTALL_CJ_VERSION%\Bin"
Else
Set Variable %IS_CJINSTALL_PATH% to "C:\Program Files\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX v%IS_INSTALL_CJ_VERSION%\Bin"
End
End
!
////////////////////////////////////////////////////////////////////////////////

In 'install and register all OCX's :
!
////////////////////////////////////////////////////////////////////////////////
If %IS_INSTALL_COMMANDBAR% Equals "0" Then
Install File "C:\Program Files (x86)\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX
[CJ_VERSION_VAR]\Bin\Codejock.CommandBars.[CJ_VERSION_VAR].ocx" to
"%IS_CJINSTALL_PATH%\Codejock.CommandBars.[CJ_VERSION_VAR].ocx"
[Feat:Always Install]
Queue existing OCXs/DLLs/EXEs/TLBs file for self-registration
"%IS_CJINSTALL_PATH%\%IS_INSTALL_CJ_COMMANDBAR_OCX%"
End
If %IS_INSTALL_DOCKINGPANE% Equals "0" Then
Install File "C:\Program Files (x86)\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX
[CJ_VERSION_VAR]\Bin\Codejock.DockingPane.[CJ_VERSION_VAR].ocx" to
"%IS_CJINSTALL_PATH%\Codejock.DockingPane.[CJ_VERSION_VAR].ocx"
[Feat:Always Install]
Queue existing OCXs/DLLs/EXEs/TLBs file for self-registration
"%IS_CJINSTALL_PATH%\%IS_INSTALL_CJ_DOCKINGPANE_OCX %"
End
If %IS_INSTALL_FLOWGRAPH% Equals "0" Then
Install File "C:\Program Files (x86)\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX
[CJ_VERSION_VAR]\Bin\Codejock.FlowGraph.[CJ_VERSION_VAR].ocx" to
"%IS_CJINSTALL_PATH%\Codejock.FlowGraph.[CJ_VERSION_VAR].ocx"
[Feat:Always Install]
Queue existing OCXs/DLLs/EXEs/TLBs file for self-registration
"%IS_CJINSTALL_PATH%\%IS_INSTALL_CJ_FLOWGRAPH_OCX%"
End
If %IS_INSTALL_PROPERTYGRID% Equals "0" Then
Install File "C:\Program Files (x86)\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX
[CJ_VERSION_VAR]\Bin\Codejock.PropertyGrid.[CJ_VERSION_VAR].ocx" to
"%IS_CJINSTALL_PATH%\Codejock.PropertyGrid.[CJ_VERSION_VAR].ocx"
[Feat:Always Install]
Queue existing OCXs/DLLs/EXEs/TLBs file for self-registration
"%IS_CJINSTALL_PATH%\%IS_INSTALL_CJ_PROPERTYGRID_OC X%"
End
If %IS_INSTALL_REPORTCONTROL% Equals "0" Then
Install File "C:\Program Files (x86)\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX
[CJ_VERSION_VAR]\Bin\Codejock.ReportControl.[CJ_VERSION_VAR].ocx" to
"%IS_CJINSTALL_PATH%\Codejock.ReportControl.[CJ_VERSION_VAR].ocx"
[Feat:Always Install]
Queue existing OCXs/DLLs/EXEs/TLBs file for self-registration
"%IS_CJINSTALL_PATH%\%IS_INSTALL_CJ_REPORTCONTROL_O CX%"
End
If %IS_INSTALL_SYNTAXEDIT% Equals "0" Then
Install File "C:\Program Files (x86)\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX
[CJ_VERSION_VAR]\Bin\Codejock.SyntaxEdit.[CJ_VERSION_VAR].ocx" to
"%IS_CJINSTALL_PATH%\Codejock.SyntaxEdit.[CJ_VERSION_VAR].ocx"
[Feat:Always Install]
Queue existing OCXs/DLLs/EXEs/TLBs file for self-registration
"%IS_CJINSTALL_PATH%\%IS_INSTALL_CJ_SYNTAXEDIT_OCX%"
End
!
////////////////////////////////////////////////////////////////////////////////

et voila <g>

Hoping this helps others ....

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-24-2013, 09:07 AM
Hi JP,

Just a quick suggestion. Never hard-code "C:\Program Files (x86)" or
"C:\Program Files". Use the built-in %PROGRAMFILESDIR% runtime variable
instead. This variable will always point to the correct 'Program Files'
program folder tree on x86 and x64. For example, on a Spanish Windows
version the user might see "C:\Archivos de programa (x86)" and not
"C:\Program Files (x86)" <g>

Friedrich

NewsArchive
10-24-2013, 11:53 AM
Muchos Gracias Senor Fredrich :)
Noted and changed in my installers

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-24-2013, 11:53 AM
errr - re thinking of this :

codejock is always installed under (x86) (maybe till they release a
64bit version and change _their_ installer) so if I use the built in
var I will get the 'x84' in a 64 bit os and that will not be "good"
.....

do you have a built in for (x86) program files ?

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-24-2013, 11:54 AM
Friedrich's got your back on that.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
10-24-2013, 11:54 AM
?????
sorry did not understand what you meant

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-24-2013, 11:55 AM
His %PROGRAMFILESDIR% will (should) always contain the correct folder.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
10-24-2013, 11:55 AM
When you write yes correct but here I need to READ from always x86
see my answer to Fredrich

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-24-2013, 11:56 AM
oic

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
10-24-2013, 11:57 AM
Hi JP,

> errr - re thinking of this :
>
> codejock is always installed under (x86) (maybe till they release a 64bit
> version and change _their_ installer) so if I use the built in var I will
> get the 'x84' in a 64 bit os and that will not be "good" .....
>
> do you have a built in for (x86) program files ?

It is *not* allowed to copy 32-bit components into the 64-bit "Program
Files" folder tree on x64 machines! All 32-bit components have to go into
the 32-bit "Program Files (x86)". Only native 64-bit applications are
allowed in the 64-bit "Program Files" on Windows x64 operating systems.

It is expected (and by Windows design) that 32-bit applications get the
"Program Files (x86)" folder as the standard Program Files folder.

Friedrich

NewsArchive
10-24-2013, 11:57 AM
Fredrich,

my hard coded only READS from there .... as I WRITE to a read reg key
value ....

I would need to replace my hard coded program files (x86) by a var to
match languages as you pointed out

or did I miss read my work ? <g>

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-24-2013, 11:58 AM
Hi JP,

> my hard coded only READS from there .... as I WRITE to a read reg key
> value ....
>
> I would need to replace my hard coded program files (x86) by a var to
> match languages as you pointed out
>
> or did I miss read my work ? <g>

You said: 'so if I use the built in var I will get the 'x84' in a 64 bit os
and that will not be "good"'

The 32-bit folder identifier ("x86") 'is good' and is the expected result.
You should never ever hard code the "Program Files" folder name because the
"real" folder name might not be what you expect. You should always retrieve
the name of "Program Files" from the system and never hard-code it.

For example:

1. %PROGRAMFILESDIR% returns "C:\Program Files (x86)" from a 32-bit
application running on a x64 Windows version (U.S.).

2. %PROGRAMFILESDIR% returns "C:\Program Files" from a 64-bit (mode)
application running on a x64 Windows version (U.S.).

3. %PROGRAMFILESDIR% returns "C:\Program Files" from a 32-bit application
running on a x86 Windows version (U.S.).

Friedrich

NewsArchive
10-24-2013, 11:59 AM
BTW, what I was trying to say was that you should always use the "dynamic"
built-in %PROGRAMFILESDIR% runtime variable because the value always points
to the correct 'Program Files' folder tree on x86 and x64 systems.

Friedrich

NewsArchive
10-24-2013, 12:01 PM
Fredrich,

I understand all this but (I must not understand what you are saying or
you what I am trying to convey <g>)

The hard coded program files(x86) is to READ ON MY MACHINE a folder and
file to then install it (reg key read value)

This is NOT RELATED to MY application but to codejock (which MY
installer knows nothing about)

If in MY script I use the builtin var %PROGRAMFILESDIR% will I not get
on a 64 bit machine (like I have here) 'program files' ?

I need the x86 one in this CASE ....

As I am READING on LOCAL machine I DO need (for internalization of this
script) the LANGUAGE proper x86 as you pointed out.

errr - see what I mean or am I not reading what you say prperly <g> ?
you say 'correct program files' folder but I DO want the x86 one as CJ
installs THERE (even on my 64 bit machine and even as they do have a 64
bit version (if I understood well)

Now, maybe THEIR installation is not '100% correct' but I have to READ
from where THEY put their files ...

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-24-2013, 12:02 PM
JP,

That seems a bit complex. This is what I do to install CJ controls with
my app (this is one line):

Install File "C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro
ActiveX v15.3.1\Bin\Codejock.CommandBars.v15.3.1.ocx" to
"%_SB_INSTALLDIR%\Codejock.CommandBars.v15.3.1.ocx" [Feat:Always
Install] [SelfReg]

I have 3 other controls done exactly the same. That's it. Very simple
and it always works.

--

Russ Eggen
RADFusion International, LLC

NewsArchive
10-24-2013, 12:03 PM
It always works for ONE version and requires you to change everywhere
for all controls
It installs in app folder sub which is NOT where it "ought" to go and
can create pbs (sometimes)
It always installs without checking if already there
etc ....

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-25-2013, 01:24 AM
Hi JP,

See Friedrichs example posted above

Quote...
For example:

1. %PROGRAMFILESDIR% returns "C:\Program Files (x86)" from a 32-bit
application running on a x64 Windows version (U.S.).
EndQuote

So as your install program is 32Bit %PROGRAMFILESDIR% will return
'Program Files (x86)' on a 64Bit system - which is what you want.
It will return 'Program Files' on a 32Bit system - which is again what
you want.

Graham

NewsArchive
10-25-2013, 01:24 AM
We weren't listening right.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
10-25-2013, 01:26 AM
Hi Graham,

Correct BUT (sorry to be splitting hairs) : if the app I install is a
64bit one then I am BAD....

Maybe Fredrich can tell us tomorrow if there is a builtin variable to
extract the x86 program files which could be used (till CJ changes
their install)

NOTE : this is only required for (as Fredrich mentioned) different
languages OS DEV machines where program files becomes xxxx

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-25-2013, 01:27 AM
JP:
<<It always works for ONE version and requires you to change everywhere for
all controls>>
Please explain...
You can many versions of all of the controls istalled at the same time. I
continue to use both the 15 and 16 versions of the ChartPro as the v 15
supports 3D charts and the 16 series does not.


>>> It always installs without checking if already there
Yes, this will alter the RegProcServer entry in the Registry and should this
app have the OCX remove itself on a uninstall it will break all other apps
that use the control.

The safe way is to check to see if the control (by version) is installed; if
it is then don't install it again.

David Bratovich

NewsArchive
10-25-2013, 01:28 AM
Thanks for confirming what we all know by now ;)
(thanks to your feedback and experience)

>>>> It always installs without checking if already there
> Yes, this will alter the RegProcServer entry in the Registry and should this
> app have the OCX remove itself on a uninstall it will break all other apps
> that use the control.
>
> The safe way is to check to see if the control (by version) is installed; if
> it is then don't install it again.

as I do with my registry checks.

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-25-2013, 01:29 AM
It installs in the destination folder and has not resulted in any
problems. And I do want it overwriting any existing - I always do this
for binaries. And since it self registers, location is not an issue
since the installer is run elevated.

Even your DMC program is still a program and if a certain version of CJ
is required to run it, your license permits this. You are more likely
to get in trouble than I would due to our different publics. You sell
to developers, who may have a different version of CJ. No problem
installing a new version, CJ takes care of that. Your new version and
any unknown program using an older version presents no problem.

Now if you take upon yourself to remove an older version... tsk-tsk! ;-)

But that since line of code is really all you need if your only
requirement is to ensure the correct version installs safely.

--

Russ Eggen
RADFusion International, LLC

NewsArchive
10-25-2013, 01:29 AM
See Dave's answer and you have all answer on your unsecured one line
install Russ ....

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-25-2013, 01:31 AM
Thanks JP!
Very helpfull!

Is it possible to attach some demo SB script?

Best regards,
Jeffrey

NewsArchive
10-25-2013, 01:32 AM
Here is mine (one line of SB code):

Install File "C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro
ActiveX v15.3.1\Bin\Codejock.CommandBars.v15.3.1.ocx" to
"%_SB_INSTALLDIR%\Codejock.CommandBars.v15.3.1.ocx" [Feat:Always
Install] [SelfReg]

--

Russ Eggen
RADFusion International, LLC

NewsArchive
10-25-2013, 01:33 AM
see my answer in SB NG on ths one line installer Russ <g>

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-25-2013, 01:33 AM
And my reply to it <g>

--

Russ Eggen
RADFusion International, LLC

NewsArchive
10-25-2013, 01:33 AM
and Dave explained all dangers to us there regarding installing
anywhere else than in original CJ folders without checking ....<g>

but it is your app and your installer so you do what ever feels comfy
for you .

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-25-2013, 01:34 AM
I will try to copy paste into an SB script and paste here

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com

NewsArchive
10-25-2013, 01:35 AM
FWIW, a text file attachment would be easier to use.

Newsgroup messages word-wrap stuff.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
10-25-2013, 01:38 AM
Here is an SB script as requested
extension is sb8

yes Jeff you are correct ( did not think of that word wrapping) <g>

http://www.lindersoft.com/publicdownloads/codejock_jp.zip

JP

NewsArchive
10-25-2013, 01:38 AM
Thanks JP! :-)

Best regards,
Jeffrey

NewsArchive
10-25-2013, 03:48 AM
Hi JP,

> Correct BUT (sorry to be splitting hairs) : if the app I install is a
> 64bit one then I am BAD....
>
> Maybe Fredrich can tell us tomorrow if there is a builtin variable to
> extract the x86 program files which could be used (till CJ changes their
> install)
>
> NOTE : this is only required for (as Fredrich mentioned) different
> languages OS DEV machines where program files becomes xxxx

Hmmm, so you are saying that CJ is installing into wrong folders? I do not
have CJ, so I can't comment on this one. But as far as I can see, you grab
the original files from the 'correct' 32-bit "C:\Program Files
(x86)\Codejock Software\ActiveX" folder on your x64 machine.

Perhaps I am completely missing the problem here. I read, re-read and read
this thread again <g>.

The %PROGRAMFILESDIR% variable ALWAYS returns the correct "Program Files"
folder name.

For 32-bit applications, the %PROGRAMFILESDIR% variable returns:

1. "C:\Program Files (x86)" when running on a x64 Windows version (U.S.).

2. "C:\Program Files" when running on a x86 Windows version (U.S.).

If you switch the installer into 64-bit mode ("Set x64 Mode..." script
function) to install native 64-bit applications then the %PROGRAMFILESDIR%
variable returns:

1. "C:\Program Files" when running on a x64 Windows version (U.S.).

That means, if you have to install a native 64-bit app using 64-bit CJ
controls then you have to create a 64-bit enabled SetupBuilder install and
%PROGRAMFILESDIR% returns the correct 64-bit 'Program Files' folder name.

Does the above help or does it create more confusion?

Friedrich

NewsArchive
10-25-2013, 03:49 AM
This is what I wrote in my first reply:

'Just a quick suggestion. Never hard-code "C:\Program Files (x86)" or
"C:\Program Files". Use the built-in %PROGRAMFILESDIR% runtime variable
instead. This variable will always point to the correct 'Program Files'
program folder tree on x86 and x64.'

The above suggestion translates into the following change in your script
(see attached screenshots). Nothing more or less <g>. %PROGRAMFILESDIR%
will handle it automatically behind-the-scenes for you.

Friedrich

NewsArchive
10-25-2013, 06:26 AM
OH!!!!!!!

I had over read that line and had "concentrated" only on the last lines
where I READ from....

JP change your glasses and read more attentively!

OK!

1. Codejock always installs in 'program files (x86)'

Those lines are NOW replaced with this one :

/* If %IS_64X_OS% Equals "1" Then */
Set Variable %IS_CJINSTALL_PATH% to "%PROGRAMFILESDIR%\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX v%IS_INSTALL_CJ_VERSION%\Bin"
/* Else */
/* Set Variable %IS_CJINSTALL_PATH% to "C:\Program Files\Codejock
Software\ActiveX\Xtreme SuitePro ActiveX v%IS_INSTALL_CJ_VERSION%\Bin"
*/
/* End */
PLUS I had 'inverted' my hard coded vals !!!!

2. Regarding the second hard coded values used to READ at compile time
on MY machine
I could (as I am compiling a 32bit app) use again the %PROGRAMFILESDIR%
But in case I changed and CJ did not change their folder then i'd be in
trouble and the compiler would NOT find my OCX files

See how sometimes we need to display images to show what we are talking
about!!

Imagine Vettel or Alonso doing the same 'confusions' while trying to
open-close their DRS :oÞ

THANK YOU again for your explanation patience and time!

--
JP
__________________________________________________ _____

For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____

DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com