O$- RegAdmin on 64bit Windows - kRegAdminKeyLocalMachine
Andrew Clow
andrew at freedomsoftware.co.nz
Mon Jun 15 00:59:57 EDT 2015
Hi Dennis,
Don't know if you found a solution yet but thought I'd offer an alternative method.
Calculate lcComputerName as getenv("COMPUTERNAME")
Calculate lList as listenv() ;; undefined list variable, listenv returns 2 columns automatically.
Breakpoint {lList} ;; Inspect lList to see what other environment variables are visible.
Regards,
Andrew.
-----Original Message-----
From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Denis Woodbury
Sent: Saturday, 13 June 2015 02:51
To: OmnisDev List - English
Subject: O$- RegAdmin on 64bit Windows - kRegAdminKeyLocalMachine
Hi,
I¹m trying to get the computer name on which Studio is running using
RegAdmin
Tried Studio 5.2.3 and 6.1.2 x32 and x64 but it does not work for me on
Windows 8.1 64Bit, Windows TS 2012R2 or Windows 10
The code below works with Studio 5.1.1 and 6.1.2 on Windows 7 32bit
Do $extobjects.RegAdmin.$objects.RegAdmin.$newref() Returns lorRegistry
Do
lorRegistry.$openkey(kRegAdminKeyLocalMachine,"SYSTEM\CurrentControlSet\Cont
rol\ComputerName\ActiveComputerName") Returns #F
Do lorRegistry.$getvalue("ComputerName") Returns lcComputerName
Do lorRegistry.$closekey() Returns #F
Do lorRegistry.$deleteref()
Is there something I¹m missing to get it to work on 64bit windows?
denis woodbury
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list