NeoSoft Support Forum Forum Index  Your source for Plug-Ins, sample publications, source code and more...

Source Language:
Translate to:

NeoSoft Support Forum
NeoSoft Community Support Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   SmartFeedSmartFeed   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help with registry read action

 
Post new topic   printer-friendly view   Reply to topic    NeoSoft Support Forum Forum Index -> General NeoBook Discussions
View previous topic :: View next topic  
Author Message
Abdullah
NeoBooker


Joined: 10 Mar 2009
Posts: 60
Location: Palestine

PostPosted: Thu Jan 21, 2010 4:47 pm    Post subject: help with registry read action Reply with quote

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
View user's profile Send private message Send e-mail
Neosoft Support
NeoSoft Team


Joined: 31 Mar 2005
Posts: 4048
Location: Oregon, USA

PostPosted: Thu Jan 21, 2010 4:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Abdullah
NeoBooker


Joined: 10 Mar 2009
Posts: 60
Location: Palestine

PostPosted: Thu Jan 21, 2010 5:02 pm    Post subject: Reply with quote

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 Very Happy

and please if you can add this little feature to your future list

thanks
_________________
Abdullah
Back to top
View user's profile Send private message Send e-mail
Abdullah
NeoBooker


Joined: 10 Mar 2009
Posts: 60
Location: Palestine

PostPosted: Thu Jan 21, 2010 6:04 pm    Post subject: Reply with quote

This is my vbscript style , didnt work Sad

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
View user's profile Send private message Send e-mail
Neosoft Support
NeoSoft Team


Joined: 31 Mar 2005
Posts: 4048
Location: Oregon, USA

PostPosted: Fri Jan 22, 2010 11:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Abdullah
NeoBooker


Joined: 10 Mar 2009
Posts: 60
Location: Palestine

PostPosted: Fri Jan 22, 2010 12:24 pm    Post subject: Reply with quote

Thanks Dave

but your code not working Sad
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
View user's profile Send private message Send e-mail
Neosoft Support
NeoSoft Team


Joined: 31 Mar 2005
Posts: 4048
Location: Oregon, USA

PostPosted: Fri Jan 22, 2010 4:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Abdullah
NeoBooker


Joined: 10 Mar 2009
Posts: 60
Location: Palestine

PostPosted: Sat Jan 23, 2010 1:40 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Neosoft Support
NeoSoft Team


Joined: 31 Mar 2005
Posts: 4048
Location: Oregon, USA

PostPosted: Mon Jan 25, 2010 11:23 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Abdullah
NeoBooker


Joined: 10 Mar 2009
Posts: 60
Location: Palestine

PostPosted: Mon Jan 25, 2010 11:54 am    Post subject: Reply with quote

I sent to you pm about what binary data i want to read from registry

thanks dave
_________________
Abdullah
Back to top
View user's profile Send private message Send e-mail
Abdullah
NeoBooker


Joined: 10 Mar 2009
Posts: 60
Location: Palestine

PostPosted: Mon Jan 25, 2010 1:13 pm    Post subject: Reply with quote

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

Smile
_________________
Abdullah
Back to top
View user's profile Send private message Send e-mail
Tony Kroos
NeoBooker


Joined: 15 Oct 2009
Posts: 14

PostPosted: Tue Jan 26, 2010 4:50 am    Post subject: Reply with quote

Abdullah wrote:
and if anybody can help me with vbscript .. i can send the vbscript to him

send me your script
Back to top
View user's profile Send private message
Abdullah
NeoBooker


Joined: 10 Mar 2009
Posts: 60
Location: Palestine

PostPosted: Tue Jan 26, 2010 6:56 am    Post subject: Reply with quote

Hi Tony

please check your inbox
_________________
Abdullah
Back to top
View user's profile Send private message Send e-mail
Tony Kroos
NeoBooker


Joined: 15 Oct 2009
Posts: 14

PostPosted: Tue Jan 26, 2010 9:45 am    Post subject: Reply with quote

done, check inbox too
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    NeoSoft Support Forum Forum Index -> General NeoBook Discussions All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Forum content © 2008 NeoSoft Corp. All rights reserved.