sfamonkey Posted August 6, 2004 Posted August 6, 2004 I need to add a line to my boot.ini during setup. How can I do this. I'm I able to program something in vb and then make an exe and excute it during the install if so how can I write or can I use cmd?thanks in advance
MHz Posted August 6, 2004 Posted August 6, 2004 I've had that prob with batch scripts before, how I wanted to change the winnt.sif via batch. Only solution I coud find. Is Gzar. Allows you to change text, replace and whatever to inis, textfiles etc. Put it in your $OEM$\$$\System32 directory and use your batch to "GZAR Blah Blah Blah".
sfamonkey Posted August 6, 2004 Author Posted August 6, 2004 Would you explain more. I get that I donwload the file and send it to system32 but then what do I do? Like to I write GZAR C:\boot.ini multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP DBS" /fastdetect /kernel=oemkrnl.exeFor Gzar is the program for C:\boot.ini is the file and for multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP DBS" /fastdetect /kernel=oemkrnl.exe is the line I need add
MHz Posted August 6, 2004 Posted August 6, 2004 I can do a batch command to add to it. With Gsarecho C:\boot.ini multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP DBS" /fastdetect /kernel=oemkrnl.exe>>c:\boot.ini
MHz Posted August 6, 2004 Posted August 6, 2004 Sorry, mean't without Gsar.>> makes the output go to your boot.ini
MCT Posted August 6, 2004 Posted August 6, 2004 goto start > run > cmd bootcfg /?i think thats what u want
ravashaak Posted August 6, 2004 Posted August 6, 2004 The win32 version of sed may also be useful in such a situation. - Ravashaak
sfamonkey Posted August 6, 2004 Author Posted August 6, 2004 MCT I think that what I want but I have xp home. So I get an error saying that it doesn't know the command. MHz Thanks for the help but I was wonder if any one could help me more.[boot loader]timeout=3default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP DBS" /fastdetect /kernel=oemkrnl.exemulti(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetectThis is my boot ini. I need to right to the boot.ini to tell it to change the timeout to 3 cause when you reinstall windows it's defualt is 30 and then I also need it to make DBS defualt. I want to do this automatically. So I all I have to do is right a cmd and tell RunOnceEx.cmd to run it
sfamonkey Posted August 6, 2004 Author Posted August 6, 2004 ravashaak would yo explain in more detial?
MCT Posted August 6, 2004 Posted August 6, 2004 i thought xp home had bootcfg?but heres the code u use if u do have bootcfgbootcfg /Timeout 3did u type it correctly? also.. its in %windir%\System32
sfamonkey Posted August 6, 2004 Author Posted August 6, 2004 I don't have it. Nope. It not in C:\windows\system32
ravashaak Posted August 8, 2004 Posted August 8, 2004 SED can be used to edit text files from the command line. Originally a UNIX utility, it is now available for use in a windows command line environment. Just download the zip file from the url below and extract the sed.exe file. Next, place the file in your %systemroot%\system32 directory and you should be good to go.It may take a little practice to get the hang of this command's syntax, but once you do, you'll have a powerful and extremely handy new tool. If you get stuck, do a web search for sed tutorials or maybe sed syntax.Here's the link:http://unxutils.sourceforge.net/UnxUtils.zip Best of luck! - Ravashaak
maxXPsoft Posted August 8, 2004 Posted August 8, 2004 sfamonkeyYou can use a write to ini in VB and it will do it with no problem easily. Only thing is first Shell out and attrib -R it first. Sometimes it's Read only.Here's an excellent .bas module I use which I have found is easiestINI files - made easy
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now