• Notice regarding image hosts and attachments. See here.

Help with Batch File

Associate
Joined
31 Jan 2010
Posts
283
Location
UK
I haven't really played with batch files since back in the day when I was running MS-DOS 5.0 :D

I have created a batch file that will install an OEM Logo and Information on Windows Vista and Windows 7. This is fine but it only works if the the system drive is "C".

Can someone add something in after the pause command so that they have to press corresponding key for their drive. For example if their system drive is "D" they would press the "D" button and it will carry on installing to that drive.

I would also love to turn this script into a .EXE file and have an icon for it, so if anyone knows of any good .BAT to .EXE converters please let me know.

Thanks In Advance :)

Code:
@echo off
cls
echo This installer will install your OEM
echo Information to your Windows Vista or
echo Windows 7 Computer.
echo.
echo This installer is NOT compatible with XP
echo or any other Windows Version.
echo.
echo.
echo.
pause
copy OEMLogo.bmp C:\windows\system32
OEMLogo.reg
 
I used to use bat2com to wrap simple batch files into .com back in t'day. Not sure if that's still a valid option or not.

Think I remember that :D

Was the command something like:

Code:
bat2exe.exe test.bat test.com

Then it converted it for you?
 
Just a quick update.

I have got the batch file down to this now:

Code:
@echo off
copy OEMLogo.bmp %windir%\system32
regedit /s OEMLogo.reg

I even have the .reg file installing silently.

Just need to turn into a .exe file and I am sorted.
 
OK now I have hit a problem :(

It works fine as a batch file but when converted to a .exe file it does not work. What makes it strange is that it still comes up and says file copied but it does not actually copy the file. I have tried 2 .bat to .exe converters with the same result.

Anyone have any ideas?
 
I have just tried copying to the Windows Folder also the Program Files folder and this did not make a difference.

I have even tried right clicking and choosing "Run as Administrator" with no luck :(

I also have UAC disabled on my machine.
 
Back
Top Bottom