Registry Module (windows only)

Share your advanced PureBasic knowledge/code with the community.
AZJIO
Addict
Addict
Posts: 2257
Joined: Sun May 14, 2017 1:48 am

Re: Registry Module (windows only)

Post by AZJIO »

Should there be some kind of warning if someone on Linux wants to use this?
User avatar
ChrisR
Addict
Addict
Posts: 1579
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Registry Module (windows only)

Post by ChrisR »

Yes, a compiler error :wink:
AZJIO
Addict
Addict
Posts: 2257
Joined: Sun May 14, 2017 1:48 am

Re: Registry Module (windows only)

Post by AZJIO »

ChrisR wrote: Sat Dec 21, 2024 11:50 am Yes, a compiler error :wink:
A compiler error may indicate an incorrectly written function.
What if the function is from PureLibraries?
User avatar
ChrisR
Addict
Addict
Posts: 1579
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Registry Module (windows only)

Post by ChrisR »

I was joking but it's a good question for libraries that are not cross-platform
Randy Walker
Addict
Addict
Posts: 1208
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA
Contact:

Re: Registry Module (windows only)

Post by Randy Walker »

AZJIO wrote: Sat Dec 21, 2024 10:30 am Should there be some kind of warning if someone on Linux wants to use this?
Probably not since the subject line clearly shows (windows only). which probably also excludes MAC as well.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy Walker
Addict
Addict
Posts: 1208
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA
Contact:

Re: Registry Module (windows only)

Post by Randy Walker »

ChrisR wrote: Sat Dec 21, 2024 11:50 am Yes, a compiler error :wink:
Ooops. :oops: Looks like someone didn't read the subject line and tried it anyway. Subject lines can be so tricky that way. :wink:
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
AZJIO
Addict
Addict
Posts: 2257
Joined: Sun May 14, 2017 1:48 am

Re: Registry Module (windows only)

Post by AZJIO »

Randy Walker wrote: Sat Dec 21, 2024 6:28 pm Probably not since the subject line clearly shows (windows only). which probably also excludes MAC as well.
Even if (windows only) were not specified, everyone already knows that the registry exists only in Windows. When the library is compiled, it will not know which forum thread it was compiled from. To do this, the library must have some kind of flag to warn the user that this library is not intended for this OS.
When compiled, all debugger messages will be removed, so embedding a debugger message will not work.
Randy Walker wrote: Sat Dec 21, 2024 6:33 pm Ooops. :oops: Looks like someone didn't read the subject line and tried it anyway. Subject lines can be so tricky that way. :wink:
There are no people here who will try the registry functions in Linux
Randy Walker
Addict
Addict
Posts: 1208
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA
Contact:

Re: Registry Module (windows only)

Post by Randy Walker »

olmak wrote: Thu Aug 11, 2016 4:37 am Hello at all
I'm trying to get a list of installed programs, with some parameters.
Can anyone help me?
I think this collects all installed programs using the native Windows "winget" command:

Code: Select all

Exe = RunProgram("powershell.exe","winget list","",#PB_Program_Hide|#PB_Program_Open|#PB_Program_Read|#PB_Program_Error)
Debug "Please wait for info to be collected"
If Exe
    While ProgramRunning(Exe)
      If AvailableProgramOutput(Exe)
        Output$=ReadProgramString(Exe)
        name$ = StringField(Output$,1,"  ")
        Debug Output$
        ;Debug name$
      EndIf
    Wend
EndIf
Sorry, I don't see any parameters.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
User avatar
jacdelad
Addict
Addict
Posts: 2074
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Registry Module (windows only)

Post by jacdelad »

On 6.40 Beta 1 I get an IMA for the "OpenKeyS"-macro. Seems to be directly related the new string system. Could someone more experienced please take a look?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/2*DX517, 164TB+82TB+28TB+2TB SSD
User avatar
mk-soft
Always Here
Always Here
Posts: 6538
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Registry Module (windows only)

Post by mk-soft »

It is PB v6.40 is alpha and must first be tested by us all string functions

Please do not post error messages in other code examples
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
Randy Walker
Addict
Addict
Posts: 1208
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA
Contact:

Re: Registry Module (windows only)

Post by Randy Walker »

ts-soft wrote: Sun Sep 01, 2013 6:10 pm Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
FINALLY... Someone who agrees with me. :mrgreen:
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Post Reply