Page 1 of 1

PostPosted: Mon Apr 09, 2012 10:19 pm
by Tony Kroos
oh my god, where did you get this s**t? )

Code: Select all
{NeoBook Function}
Version=5,70
Language=VBScript
Comment=OSInfo 1.1|Neobook function to retrieve OS info
{End}
On Error Resume Next
Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
Set colDm = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
For Each objOS in colOS
    dtmConvertedDate.Value = objOS.InstallDate
    dtmInstallDate = dtmConvertedDate.GetVarDate
    nbSetVar "[OS_Caption]", objOS.Caption
    nbSetVar "[OS_Version]", objOS.Version
    nbSetVar "[OS_BuildNumber]", objOS.BuildNumber
    nbSetVar "[OS_Architecture]", objOS.OSArchitecture
    nbSetVar "[OS_InstallDate]", dtmInstallDate
    nbSetVar "[OS_CodeSet]", objOS.CodeSet
    nbSetVar "[OS_Language]", objOS.OSLanguage
    nbSetVar "[OS_Locale]", objOS.Locale
    nbSetVar "[OS_SKU]", objOS.OperatingSystemSKU
    nbSetVar "[OS_SP]", objOS.ServicePackMajorVersion
    nbSetVar "[OS_Key]", objOS.SerialNumber
Next
For Each objDm in colDm
If objDm.PartOfDomain Then
        nbSetVar "[OS_PartOf]", "Domain"
    Else
        nbSetVar "[OS_PartOf]", "Workgroup"
    End If
    nbSetVar "[OS_Domain]", objDm.Domain
Next
nbSetVar "[OSInfo]", Err.Number
Set objWMIService = Nothing
Set dtmConvertedDate = Nothing
Set colOS = Nothing
Set colDm = Nothing


use Google for more info about variables...

I am trying to make a simple application to show ... & Key

It is possible, but I can't see any reasons why do you need to extract system key

PostPosted: Tue Apr 10, 2012 12:55 am
by Tony Kroos
This script doesn't work with registry, so no matter 32 or 64 bit...
To retrieve serial number key (not Product Key), add this (edited above):
nbSetVar "[OS_Key]", objOS.SerialNumber
Next
For Each objDm in colDm
...


You'll get key to [OS_Key] variable
If you want Windows Product key (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX), then still can't see such a reason... I would write the key down on paper and put in my shorts to backup it )

PostPosted: Tue Apr 10, 2012 3:13 am
by Tony Kroos
but my question is how to make my VBScript work in Neobook on my 64bit OS
This script won't work. native *.vbs rely on system script engine (if x64 then vbs runs as x64 and so on...), but neobook is a 32bit application, and it always run in 32bit mode on x64 system (and functions too, of course), there's no direct access to x64 registry entries. however, it is still possible...
you may try REG QUERY /? to obtain key value you need.

PostPosted: Tue Apr 10, 2012 6:45 am
by dpayer
Tony Kroos wrote:oh my god, where did you get this s**t? )


Code: Select all
call "tact" "courtesy" "politeness"
gosub "tryagain"


This is one of my favorite self maintenance routines!

David P.

PostPosted: Tue Apr 10, 2012 7:58 am
by Tony Kroos
okay I've just updated my brain's firmware with this one )

PostPosted: Tue Apr 10, 2012 1:43 pm
by Pilou
Good evening
Interesting post about key product + printing

Vbs code Abdullah

Sun Act: Set Act = CreateObject ("WScript.Shell")

Sun Ky1, KY2, KY3

Ky1 GetKey = (Act.RegRead ("HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ DigitalProductId"))
KY2 Act.RegRead = ("HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ ProductName")
KY3 Act.RegRead = ("HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ BuildLab")

publication.nbSetVar "[% 1]", KY2 + "" + KY3
publication.nbSetVar "[% 2]", Ky1

Function GetKey (rpk)
Dim i, j, DwAcum, ProKey, SzPosChar
RpkOffset const = 52 i = 28
SzPosChar = "BCDFGHJKMPQRTVWXY2346789"
Do
DwAcum = 0: j = 14
Do
DwAcum DwAcum * 256 =
DwAcum = rpk (j + rpkOffset) + DwAcum
rpk (j + rpkOffset) = (DwAcum \ 24) and 255
DwAcum DwAcum Mod 24 =
j = j-1
Loop While j> = 0
i = i-1: ProKey = mid (SzPosChar, DwAcum 1.1) & ProKey
If (((29-i) Mod 6) = 0) And (i <> -1) Then
i = i-1: ProKey = "-" & ProKey
End If
Loop While i> = 0
GetKey = ProKey
End Function

Edit: Tony croos
You'll get to key [OS_Key] variable
If you want Windows Product key (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX), then still can not see sa situation Reason ... I would write the key down on paper and put in my shorts to backup it)

Please download the following zip

Explanations and tutorial soon on NéofrbooK

http://neofrbook.free.fr/

http://jeanlouis.gastoldi.free.fr/infoproduit.zip

Pilou

PostPosted: Tue Apr 10, 2012 4:12 pm
by Pilou
Ok
However good script vbs !

pilou

PostPosted: Tue Apr 10, 2012 4:16 pm
by Pilou
Pilou wrote:Good evening
Interesting post about key product + printing

Vbs code INTERNET

Sun Act: Set Act = CreateObject ("WScript.Shell")

Sun Ky1, KY2, KY3

Ky1 GetKey = (Act.RegRead ("HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ DigitalProductId"))
KY2 Act.RegRead = ("HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ ProductName")
KY3 Act.RegRead = ("HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ BuildLab")

publication.nbSetVar "[% 1]", KY2 + "" + KY3
publication.nbSetVar "[% 2]", Ky1

Function GetKey (rpk)
Dim i, j, DwAcum, ProKey, SzPosChar
RpkOffset const = 52 i = 28
SzPosChar = "BCDFGHJKMPQRTVWXY2346789"
Do
DwAcum = 0: j = 14
Do
DwAcum DwAcum * 256 =
DwAcum = rpk (j + rpkOffset) + DwAcum
rpk (j + rpkOffset) = (DwAcum \ 24) and 255
DwAcum DwAcum Mod 24 =
j = j-1
Loop While j> = 0
i = i-1: ProKey = mid (SzPosChar, DwAcum 1.1) & ProKey
If (((29-i) Mod 6) = 0) And (i <> -1) Then
i = i-1: ProKey = "-" & ProKey
End If
Loop While i> = 0
GetKey = ProKey
End Function

Edit: Tony croos
You'll get to key [OS_Key] variable
If you want Windows Product key (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX), then still can not see sa situation Reason ... I would write the key down on paper and put in my shorts to backup it)

Please download the following zip

Explanations and tutorial soon on NéofrbooK

http://neofrbook.free.fr/

http://jeanlouis.gastoldi.free.fr/infoproduit.zip

Pilou

PostPosted: Sun Apr 29, 2012 6:22 pm
by Pilou
good evening

Code: Select all
PlugPilou: CléWindows


This is my first plugin! CléWindows made ​​following the topic of Tony
Download link

http://neofrbook.free.fr/crbst_46.html

Tried on windows XP pro but not on higher versions!

Important please put the functions in VBS (F11)

The file includes: + plugin. Exe + the Vbs+pub

Plugin totally free for private use.

Help me please leave me your comments, reflections, criticism etc. ... at: http://neofrbook.free.fr/crbst_46.html

Thank you in advance

pilou