PDA

View Full Version : .bat files


e laursen
12-18-01, 06:59 PM
Does anyone know how to retrieve life path information from the registry using bat files? I want to create some quickie install *.bat files, but they will be used on different computers that may have the target program installed in a different folder.

Actually, to be more clear, I will be creating CDs with UT (and other programs) maps and want to use a bat file for my friends so it will automatically copy all the maps into the correct directory, but some people are not using the default directory. My thinking is that there is usually a listing in the registry that indicates the install directory. I would like to leverage that information.

Thanks.

e laursen
12-19-01, 07:31 AM
bump

Quaky
12-20-01, 02:10 PM
you can do this the other way, but you will need some Linux commands (ported for dos of course). eg perform a

dir *.UMX /s

(or whatever extension is used) the you'll get something like this:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>dir *.utx /s
Volume in drive C is System
Volume Serial Number is E8DA-0E9E

Directory of C:\games\Unreal\Textures

17/05/1998 09:06 7.980 AlfaFX.utx

after that you can use GREP (ported linux command) to get the

Directory of C:\games\Unreal\Textures


pass that as a parameter to another batfile (or program) that copies the maps. I could make this in VB if you like (neat windows install instead of those old bat files).

If you want it programmed in VB (just ask, no biggie) mail me at
quaky@pandora.be ...

Quaky
12-20-01, 09:57 PM
Greetz, I have completed the program. Because I don't know if yahoo mail supports big attachments I upload it here.

Some advice:
1. Make sure you fill in the cdrom drive letter.
2. If the program crashes, copy the msvbvm60.dll to your system32 directory
3. burn the cdrom with the 2 files from the archive and all the maps in the root level of the cd eg under d:\
4. If you choose to place your levels in a subfolder eg d:\UTmaps\ you can enter d:\UTmaps (no \ allowed) as cdrom drive.

I hope you like it and use it. :D

e laursen
12-21-01, 12:01 AM
Quaky...

I'm checking it out. Thanks for the help. You are "the man."