PDA

View Full Version : C6 "GETREG" Bug or ???



NewsArchive
10-15-2007, 02:44 AM
Hi all,

While seting up a new app installer and webupdate I realised that :

Under Server 2008 64 bits or Vista 64 Bits when in any SB script there is
any reg function used on
LOCAL_MACHINE/SOFTWARE/LINDERSOFT/xxxx
then it automatically writes in Wow6432Node/LINDERSOFT/xxxx and all is fine
for SB scripts (installer - updater etc)

Now when from withinn Clarion 6 9056 I use a GETREG on the same keys I get a
0 in return as it does not knwo how to translate from SOFTWARE to
SOFTWARE/Wow6432Node/

BUT when I use a PUTREG from Clarion then all is fine again
????????????????????????????????????

This is the code I now have to use from my app to set things properly (small
code before running updater as I want to give users with the latest version
the possibility to run it again in case of pbs on their machines)

RUN('dmccheck.exe',1) ! this is a SB script compiled just to retreive
the latest update version from site
Vista# = 0 ! I had to add this check as otherwise ....
returns 0

LOC:VersionLocal =
GETREG(REG_LOCAL_MACHINE,'SOFTWARE\Lindersoft\WebU pdate\Apps\{{500CCD05-81A0-11D9-390C-009F3F177E87}','LOCAL_VERSION')
! Vista or 2008
IF LOC:VersionLocal = 0
Vista# = 1
LOC:VersionLocal =
GETREG(REG_LOCAL_MACHINE,'SOFTWARE\Wow6432Node\Lin dersoft\WebUpdate\Apps\{{500CCD05-81A0-11D9-390C-009F3F177E87}','LOCAL_VERSION')
END
LOC:VersionSite = GETREG(REG_CURRENT_USER,'SOFTWARE\CGF\Data
Management Center','Version en Ligne')

IF LOC:VersionLocal = LOC:VersionSite
GLO:MessageCGFButton = 0
GLO:MessageCGFIcon = 'QUESTION' ! INFO - QUESTION et par defaut
STOP
GLO:MessageCGFButOKIcon = '' ! 1= cacher
GLO:MessageCGFButOKTip = Translator.TranslateString('Oui')
GLO:MessageCGFButOKText = Translator.TranslateString('Oui')
GLO:MessageCGFButKOIcon = '' ! 1= cacher
GLO:MessageCGFButKOTip = Translator.TranslateString('Non')
GLO:MessageCGFButKOText = Translator.TranslateString('Non')
GLO:MessageCGFL1Text = Translator.TranslateString('Mise Ã* Jour du
Logiciel')
GLO:MessageCGFL2Text = ''
GLO:MessageCGFL3Text = Translator.TranslateString('Voulez-vous
forcer la réinstallation du logiciel ?')
GLO:MessageCGFL4Text = Translator.TranslateString('(Cliquez sur
Oui)')
GLO:MessageCGFL5Text = ''
GLO:MessageCGFL6Text = ''
GLO:MessageCGFEntry = 0 ! 1 = afficher
GLO:MessageCGFEntryText = ''
GLO:MessageCGFEntryValue = ''
GLO:MessageCGFL1Pos = 'CENTER'
GLO:MessageCGFL2Pos = ''
GLO:MessageCGFL3Pos = 'CENTER'
GLO:MessageCGFL4Pos = 'CENTER'
GLO:MessageCGFL5Pos = 'CENTER'
GLO:MessageCGFL6Pos = 'CENTER'
GLO:MessageCGFL1Style = '700' ! 700 = gras | 400 = normal | 4496 =
italique
GLO:MessageCGFL2Style = ''
GLO:MessageCGFL3Style = ''
GLO:MessageCGFL4Style = ''
GLO:MessageCGFL5Style = ''
GLO:MessageCGFL6Style = ''
GLO:MessageCGFL1Color = '16711680' ! 255 = Rouge | 65535 = jaune |
16711680 = bleu | 8388608 = bleu foncé | 32768 = vert
GLO:MessageCGFL2Color = '8388608'
GLO:MessageCGFL3Color = '8388608'
GLO:MessageCGFL4Color = '8388608'
GLO:MessageCGFL5Color = '8388608'
GLO:MessageCGFL6Color = '8388608'

MessageCGF

IF GLO:MessageCGFButton = 1
IF Vista# = 0
PUTREG(REG_LOCAL_MACHINE,'SOFTWARE\Lindersoft\WebU pdate\Apps\{{500CCD05-81A0-11D9-390C-009F3F177E87}','LOCAL_VERSION','1.0.0.0')
ELSE
PUTREG(REG_LOCAL_MACHINE,'SOFTWARE\Wow6432Node\Lin dersoft\WebUpdate\Apps\{{500CCD05-81A0-11D9-390C-009F3F177E87}','LOCAL_VERSION','1.0.0.0')
END

RUN('dmcupdate.exe')
END
ELSE
RUN('dmcupdate.exe')
END

(I renamed wupdate to dmcupdate as I needed to have two update files in the
same dir for 2 different apps)

The PUTREG part is no use - I left it to be sure ....
The GETREG returns 0 and the PUTREG knows where to go ??????

Clarion GETREG BUG ????

Merci for your ideas and tests

JP

--
Merci - Thank you

JP

NewsArchive
10-16-2007, 02:23 AM
Jean-Pierre,

From what I have read on the MSDN web site, there are separate 32 and 64 bit
keys and on 64 bit operating systems they even have two RegEdit programs.
RegEdit is 64 bit and RegEdt32 is 32 bit so apparently, it is not
straightforward to be able to read and write to both 64 and 32 bit keys. When
you write from a program it writes to the key it understands, 32 or 64 bit.

This has now exhausted my understanding of the differences. 8-)

Peter Gysegem
Beaver Creek Software

NewsArchive
10-16-2007, 02:23 AM
Peter,

SB reads and writes properly on all OS's

Clarion PUTREG also does translate properly even on Windows 2008
Clarion GETREG under Windows Server 2008 DOES NOT translate

So obviously there is a problem somewhere

I opened a PTSS ticket for SV to check

Merci

JP

--
Merci - Thank you

JP