Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I need to know how to make a batch file that installs itself and then starts at startup (systray). I would like to use the batch file on my startup to map LPT1 back to the printer closest to me because often during the day I print to other locations on our network, and forget to change it back.

Hi, it is fairly easy.
First up when the LPT1 is mapped how you want it open 'regedit' and search for LPT1.It should be in the following key:
[HKEY_LOCAL_MACHINE\Enum\BIOS\]mine is in [HKEY_LOCAL_MACHINE\Enum\BIOS\*PNP0401]
highlight the key and click "Registry" / "Export".
Save it as "MapLPT.reg" to where you can find it.Create a bat file that calls this one or put the following line intoo the c:\Autoexec.bat file. It will run on every startup then.
----
c:\windows\regedit.exe /s c:\Programs\MapLPT.reg----
when copying the line, include the blank line as some registry files will not merge if the extra carrige return is missing.
Without the "c:\windows\regedit.exe /s" the file will not be merged. /s means 'silent' mode
HTHc:\windows\regedit.exe /s c:\Programs\Popcap.reg

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |