Error whe including .reg files - the files included are 0kb in size

Convert your BATch files into EXEcutable format in one click.
aztekboy
Posts: 1
Joined: Thu Aug 10, 2006 6:10 pm

Post by aztekboy »

hello,

When I compile the bat file and I include a registry key that I want it to copy to a directory the key copies but with 0kb size.

here is the batch file

@echo off
mkdir C:\setup
copy key.reg C:\setup
regedit /s C:\setup\key.reg


as you can see it does insert the key in the registry but it doesn't take effect because its 0kb

am I doing something wrong? When I choose the key in the include window its 7kb but it seems that after compiling it loses the data.

Thanx for all your help



Edited By aztekboy on 1155233990
daslick
Posts: 6
Joined: Sun May 21, 2006 4:55 am

Post by daslick »

I've had the same problem, with many file types. Copy your code into the clipboard, exit QBFC, open QBFC, then paste the code, attach the files, and recompile. I've had to do this a lot, it seems to be a bug. Just make sure the exe is bug free before you assume that it works.
Oleg Tsheglov
Site Admin
Posts: 307
Joined: Fri Feb 13, 2004 5:55 pm

Post by Oleg Tsheglov »

Ryan Lamberton

Post by Ryan Lamberton »

Can you give an example or correct this bat file to show use of %myfiles%?

copy /y proxy.reg C:\WINDOWS\proxy.reg
reg import C:\WINDOWS\proxy.reg
del C:\WINDOWS\proxy.reg

I am trying to copy proxy.reg from an attached (included) file
Ernie Park

Post by Ernie Park »

I believe you need only the following . . .


start file ************************************

:: Use the line below when you compile
set compile=%myfile%\

:: Use the line below to test before you compile
:: set compile=

reg import %compile%proxy.reg


*************************************** end file


Ernie
Ernie Park

Post by Ernie Park »

This was posted . . .

@echo off
mkdir C:\setup
robocopy /e /eta key.reg C:\setup
regedit /s C:\setup\key.reg


QuickBFC has its own "setup" directory - just use that to avoid the file copy.

As an alternative to the "copy" command, try robocopy.exe (google it)


However, since the copy is really an extra unneeded step, try below.


start file ************************************

:: Use the line below when you compile
set compile=%myfile%\

:: Use the line below to test before you compile
:: set compile=

regedit /s %compile%key.reg


*************************************** end file