Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Allow F6, OemPreinstall=No

Featured Replies

I don't think this has been mentioned yet, but for those who have trouble adding PATA/SATA/RAID controller drivers to your CD you can use this method to manually install the drivers with a floppy and still get the $OEM$ folders copied over.

As some people may be aware, having OemPreinstall=yes will break F6 to install drivers, whereas OemPreinstall=No doesn't.

Cmdlines.txt - This is executed no matter whether OemPreinstall is enabled or not, so we're going to launch a .cmd file from cmdlines.txt.

Open up notepad and paste the following:

@echo off
IF EXIST D:\$OEM$ set CDROM=D:IF EXIST E:\$OEM$ set CDROM=E:IF EXIST F:\$OEM$ set CDROM=F:IF EXIST G:\$OEM$ set CDROM=G:IF EXIST H:\$OEM$ set CDROM=H:IF EXIST I:\$OEM$ set CDROM=I:IF EXIST J:\$OEM$ set CDROM=J:
XCOPY /E /Q %CDROM%\$OEM$\$1 %SYSTEMDRIVE%XCOPY /E /Q %CDROM%\$OEM$\$$ %SYSTEMROOT%XCOPY /E /Q %CDROM%\$OEM$\$Docs "%SYSTEMDRIVE%\Documents and Settings"XCOPY /E /Q %CDROM%\$OEM$\$Progs "%PROGRAMFILES%"
EXIT

Save this as OemPreinstall.cmd in the \$OEM$\ folder.

Add to (or make) a cmdlines.txt file:

[COMMANDS]"OemPreinstall.cmd"

And save in the \$OEM$\ folder.

There is a disadvantage to this method - you cannot use OemPnpDriversPath= to install your drivers as the folders are copied over far too late for Setup to detect and install them.

Confused I am.

If OemPreinstall=No then the $OEM$ folder is ignored (yes?).

So how can Cmdlines.txt in the \$OEM$\ folder always run?

Sorry if that's stupid question.

  • Author

When its set as No it won't copy over. But launching the .cmd file from cmdlines.txt looks for the $OEM$ folder on the CD, no matter what driver letter it has, then copies over everything in it to the hard disk (just as OemPreinstall=yes would do)

the folder isn't ignored, just not copied.

If cmdlines.txt is in there, then it will run. Just like svcpack.inf. If there is something in there,they will run.

Good thing I don't copy anything over :)

Ah I see. That's good.

I wanna run some reg tweaks but still need the F6 option.

Thanks.

  • Author

You should still be able to run regtweaks, what trouble are you having?

I switched my brain on and got it sorted.

I'm just using 2 files : cmdlines.txt and XPtweak.reg

cmdlines.txt has:

[COMMANDS]

"REGEDIT /S XPtweak.reg"

and this works! No need for the .CMD (in my case anyway).

Thanks for all the quick and helpful replies! :)

  • 1 year later...

Anyone else re-finding this old thread may be interested in this more robust example for the batch file.

OemPreinstall.cmd

@CMDOW.EXE @ /HID 2>NUL||@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
FOR %%? IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO (
IF /I "%%?:" NEQ "%SYSTEMDRIVE%" CALL :SUB "%%?:" &&GOTO START)
GOTO ENDIT

:START
IF EXIST %MYOEM%\$1 XCOPY %MYOEM%\$1 %SYSTEMDRIVE% /S/I/Q/Y >NUL
IF EXIST %MYOEM%\$$ XCOPY %MYOEM%\$$ %SYSTEMROOT% /S/I/Q/Y >NUL
IF EXIST %MYOEM%\$Docs XCOPY %MYOEM%\$Docs "%ALLUSERSPROFILE%\.." /S/I/Q/Y >NUL
IF EXIST %MYOEM%\$Progs XCOPY %MYOEM%\$Progs %PROGRAMFILES% /S/I/Q/Y >NUL

:ENDIT
ENDLOCAL &GOTO :EOF

:SUB
IF NOT EXIST %~1\$OEM$ EXIT/B 1
SET "MYOEM=%~1\$OEM$"
EXIT/B 0

It should be okay run as is without alteration.

I don't know how I missed this thread when it was first posted, but that's one heck of a great idea!

I miss Aaron :(

@Yzöwl, depending on your posts I see you using either:

FOR %%? IN ('MOUNTVOL^|FIND ":\"') DO  ...

Or

FOR %%? IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO ...

And now adding this nice CALL :SUB "%%?:" &&GOTO START trick to the later.

Are you researching for the best way to do it or is there specific reasons for picking up this or that method?

Well, I'm glad you asked!

NO, I still prefer MOUNTVOL, it is however not guaranteed to pick up on every drive.

Because everyone is using the (A B C... version, and that method is the one used in 'The Guide' I thought it more prudent to not confuse things.

What this method actually does is, hopefully, run through the letters one at a time as usual, but, when it finds a match it breaks out of the loop. If therefore the CD-ROM is at drive H, the loop doesn't continue to look for I:\$OEM$, J:\$OEM$..., Z:\$OEM$.

It is also 'more robust' because:

  • If CMDOW is either in PATH or local to the batch it will hide the window, if it isn't then echoing is turned off. Obviously if the window is hidden, then echoing doesn't matter.
    It doesn't prevent the remote possibility of a CD-ROM on C:, but will not search whatever is appointed as the System Drive.
    It doesn't set a variable to the CDROM drive, when it isn't needed.
    It will only copy the contents of the $OEM$ folders if they are there, and in that case, if the window isn't hidden, you will not get a screen output of how many files were copied.
    If you have already redirected your profile directories using winnt.sif or other method, then it doesn't limit the location of those files to the System Drive.

Yes I'm really impressed.

I loved that "%ALLUSERSPROFILE%\.." and your first line as much as your "PUSHD %OEM%||PUSHD %SYSTEMDRIVE%" in another thread.

Batch scripting can be a bit harsh, but you know how to put oil in it. :thumbup

  • 2 years later...
  • 4 weeks later...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.