WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Binary Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Splitting Registry Binary Entry for Writing to INI File

Keywords: 	 split binary value

Question:

I am using the RegQueryBin command to get a binary value from the registry. What I want to do is cut it up into 255 byte chunks so I can stick it in an .ini file to use later.

Answer:

Ummm writing undebugged code at random here
	bin=RegQuerybin(...

	binlen=strlen(bin)
	chunksize=240

	;note integer divide
	chunks=((binlen-1)/chunksize)+1

	for xx=1 to chunks
	thischunk=strsub(bin,xx*chunksize+1,chunksize)
	IniWritePvt("BIN","xyz%xx%",thischunk,inifile)
	next

Article ID:   W12736
Filename:   Splitting Registry Binary Entry for Writing to INI File.txt
File Created: 1999:04:15:16:49:16
Last Updated: 1999:04:15:16:49:16