| View previous topic :: View next topic |
| Author |
Message |
Abdullah NeoBooker

Joined: 10 Mar 2009 Posts: 60 Location: Palestine
|
Posted: Thu Jan 21, 2010 4:47 pm Post subject: help with registry read action |
|
|
hi all
i have a problem reading a type data in registry
my problem with REG_BINARY
when i use registry read action returns empty!!
and when i read another type of data in the same location , say REG_SZ type , it returns with the exact value
what i can do to solve this issue
Thanks _________________ Abdullah |
|
| Back to top |
|
 |
Neosoft Support NeoSoft Team
Joined: 31 Mar 2005 Posts: 4048 Location: Oregon, USA
|
Posted: Thu Jan 21, 2010 4:57 pm Post subject: |
|
|
Currently, NeoBook variables can only handle text and numeric data and cannot be used for information stored in binary format. You might be able to work with the binary registry data by creating a VBScript function. _________________ NeoSoft Support |
|
| Back to top |
|
 |
Abdullah NeoBooker

Joined: 10 Mar 2009 Posts: 60 Location: Palestine
|
Posted: Thu Jan 21, 2010 5:02 pm Post subject: |
|
|
thank you for your quick reply
iam not familiar with vbscript . and if i have a vbsript written with all tasks i need , read registry , doing some tasks , how i can then return value from it to my project.? i mean how to pass value from vbscript to neobook app
i know it maybe easy , but not for me
and please if you can add this little feature to your future list
thanks _________________ Abdullah |
|
| Back to top |
|
 |
Abdullah NeoBooker

Joined: 10 Mar 2009 Posts: 60 Location: Palestine
|
Posted: Thu Jan 21, 2010 6:04 pm Post subject: |
|
|
This is my vbscript style , didnt work
| Code: | Function Fu()
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
key = ".........."
ID = WshShell.RegRead(key & "Regbinarykey")
Di = "Di : " & WshShell.RegRead(key & "Di") & vbNewLine
Ref = "Ref : " & WshShell.RegRead(key & "Ref") & vbNewLine
[%3] = "con : " & Converted(ID)
Ref = Di & Ref & [%3]
Save Ref
End Function
Function Converted(ID)
Mathmatic job ;) ........
.......
.........
.........
End Function
publication.nbGetVar "[%3]"
|
no luck with it
any idea? _________________ Abdullah |
|
| Back to top |
|
 |
Neosoft Support NeoSoft Team
Joined: 31 Mar 2005 Posts: 4048 Location: Oregon, USA
|
Posted: Fri Jan 22, 2010 11:36 am Post subject: |
|
|
Try this:
You can then execute the script like this:
Call "Registry Read Binary" "Software\Microsoft\Windows NT\CurrentVersion\TaskManager" "Preferences" "[RegData]"
As I said before binary data is not compatible with NeoBook variables (which are designed to be used with text and numeric data), so the conversion portion of the script may not yield the results you're looking for. _________________ NeoSoft Support |
|
| Back to top |
|
 |
Abdullah NeoBooker

Joined: 10 Mar 2009 Posts: 60 Location: Palestine
|
Posted: Fri Jan 22, 2010 12:24 pm Post subject: |
|
|
Thanks Dave
but your code not working
it return 0 when i write it without changes, and when i change it to locate binary value from HKEY_LOCAL_MACHINE it give me error in LB = LBound(strValue) or the next line ,
mmm just want to thank you for your help and looking for reply from you or from another member here
good luck _________________ Abdullah |
|
| Back to top |
|
 |
Neosoft Support NeoSoft Team
Joined: 31 Mar 2005 Posts: 4048 Location: Oregon, USA
|
Posted: Fri Jan 22, 2010 4:54 pm Post subject: |
|
|
I think the part that reads the binary data from the registry is actually working, but it's the conversion to a string that's the problem. Binary and string data are incompatible. You will probably need to convert the binary data into hex before it can be represented in string format.
Also, the security settings in some versions of Windows may not allow your app to access the HKEY_LOCAL_MACHINE section of the registry. _________________ NeoSoft Support |
|
| Back to top |
|
 |
Abdullah NeoBooker

Joined: 10 Mar 2009 Posts: 60 Location: Palestine
|
Posted: Sat Jan 23, 2010 1:40 am Post subject: |
|
|
thanks dave,
about converting , is that require for getting binary data or only for convert it to somthing expressive ?
convert function in my first code not required to read binary , it just a function for some mathmatics to do with the binary value.
i just have the first code with .vbs ext. and it works good
so the problem in transfer binary data came from vbs to neobook application ? dont know
want to ask if this issue can be solved in the next upgrade of neobook?
and by now iam looking to find a solve for this problem _________________ Abdullah |
|
| Back to top |
|
 |
Neosoft Support NeoSoft Team
Joined: 31 Mar 2005 Posts: 4048 Location: Oregon, USA
|
Posted: Mon Jan 25, 2010 11:23 am Post subject: |
|
|
Working with binary data is an advanced programming concept beyond what NeoBook was initially designed to do. As NeoBook continues to evolve it may be possible to add limited support for working with binary data, but keeping NeoBook easy-to-use is an important part of the program.
That being said, what exactly are you trying to do with the binary data? It's possible that there is another way of getting the information you need. _________________ NeoSoft Support |
|
| Back to top |
|
 |
Abdullah NeoBooker

Joined: 10 Mar 2009 Posts: 60 Location: Palestine
|
Posted: Mon Jan 25, 2010 11:54 am Post subject: |
|
|
I sent to you pm about what binary data i want to read from registry
thanks dave _________________ Abdullah |
|
| Back to top |
|
 |
Abdullah NeoBooker

Joined: 10 Mar 2009 Posts: 60 Location: Palestine
|
Posted: Mon Jan 25, 2010 1:13 pm Post subject: |
|
|
and if anybody can help me with vbscript .. i can send the vbscript to him
PS: the vbscript i have reads the binary value from registry and made some math on it and save the data in a file , i need to make it as internal vbscript in neobook and return the data to neobook variables not to file
 _________________ Abdullah |
|
| Back to top |
|
 |
Tony Kroos NeoBooker
Joined: 15 Oct 2009 Posts: 14
|
Posted: Tue Jan 26, 2010 4:50 am Post subject: |
|
|
| Abdullah wrote: | | and if anybody can help me with vbscript .. i can send the vbscript to him |
send me your script |
|
| Back to top |
|
 |
Abdullah NeoBooker

Joined: 10 Mar 2009 Posts: 60 Location: Palestine
|
Posted: Tue Jan 26, 2010 6:56 am Post subject: |
|
|
Hi Tony
please check your inbox _________________ Abdullah |
|
| Back to top |
|
 |
Tony Kroos NeoBooker
Joined: 15 Oct 2009 Posts: 14
|
Posted: Tue Jan 26, 2010 9:45 am Post subject: |
|
|
| done, check inbox too |
|
| Back to top |
|
 |
|