Jump to content

script/batch file to run on first boot help


Recommended Posts

ok so what im trying to do is have a text file popup on the screen the first time i login after installing my xp cd

ps sorry if this has been answered before i couldnt find anyhting on the subject on here and on google for the past 5 hours

thanks

Link to comment
Share on other sites


Open your text file with Notepad using RunOnceEx. Follow the steps below. As written, your text file should be located in a directory specified in the PATH environment variable, such as the %SystemRoot% directory.

  1. Decompress SVCPACK.IN_ in the I386 directory of your Windows source files to get SVCPACK.INF. Place the SVCPACK.INF file in I386 and delete the file named SVCPACK.IN_ in I386.
  2. Verify that the CatalogSubDir value in the [setupData] section in SVCPACK.INF is set correctly. It should read as follows:
    [SetupData]
    CatalogSubDir="i386\svcpack"


  3. Add the following line to the [setupHotfixesToRun] section at the end of the SVCPACK.INF file:
    MyRegs.cmd


  4. Create a file named MyRegs.cmd in the I386\svcpack directory of your Windows source files with the following single line of code:
    Reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\OpenTextFile" /v "1" /d "Notepad.exe \"TextFileName.txt\"" /f

Edited by 5eraph
Link to comment
Share on other sites

OK. Thorough explanations for the $OEM$ folders and WINNT.SIF are provided at the links in my previous reply. Here's a crash course to get your text file in:

  1. Create a file named WINNT.SIF in the I386 directory of your Windows source files that contains the following lines of code:
    [Unattended]
    OemPreinstall="Yes"


  2. At the root of your Windows source (outside I386) create the directory "$OEM$\$$" and place your text file in the $$ subdirectory. This will install your text file in $SystemRoot$ ("C:\WINDOWS" by default).

Edited by 5eraph
Link to comment
Share on other sites

You can MakeCab it if you'd like, but it's not necessary. Be advised that if both SVCPACK.INF and SVCPACK.IN_ exist in I386 then Windows will use the .IN_ file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...