Jump to content

iTwins

Member
  • Posts

    119
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Hong Kong

Posts posted by iTwins

  1. No. We can use to slipstream to an original Windows cd installation (works perfect)

    but it doesn't work directly with sysprep.

    Its difficult to add massstorage to sysprep. I can't find a really working solution

    thanks

    Auto-slipstreaming into sysprep.inf is not hard, just that Sysprep is very picky. Some of the drivers I had to modify its INF file to prevent Sysprep from hanging during the preparation stage.

    No promises but I'll see what I can do....but DON'T keep your hopes too high :)

  2. Hi

    First of all, nice work :D

    any change for new updates?

    Thanks. Umm...probably not. I no longer work in IT and I don't have access to any of the hardware that I used to verify RSlip with.

    any chance to integrate the massstorage drivers of the site driverpacks.net (excelent site)?

    I haven't tried Driverpacks before but doesn't it already do what RSlip does and probably better?

    Cheers,

  3. Could anyone help?

    I get this alot:

    The situation occurs on XP SP3 (both client and host) and I share a USB drive for other XP clients on the network. Whenever I try to NET USE to the host USB share from an XP client, the "Error 1130: Not enough server storage available to process this command" appears on the client side and NET USE is unsuccessful

    I have tried all suggestions found on the web:

    1) Set IRPStackSize to hex:F or

    2) Set PagedPoolSize to Dword:0 or

    3) Set MinFreeConnections to Dword:5

    All cannot solve my problem.

    The only way to resolve this was to re-run XP Service Pack 3, which you can imagine, is very time-consuming.

    Any other idea?

  4. You can however DIY by supplying your own PNP Codes and use RSlip's /PNPINI parameter.

    Sounds great, any documents demonstrating this switch?

    heh, it was already mentioned in the first post.

    "RAID Slipstreamer v5.3 Build 080626.exe" /Install /Source P:\WXPSP2 /NoGUI /PNPINI X:\text\msd.ini /DRVPATH x:\Drivers\XP

    - This tells the program that you supply your own PnP INI file and drivers.

    - The PnP INI must be in this format. For example:

    ----------------------------------------------------------

    [2003]

    1=HPDRV

    2=END

    [XP]

    1=HPDRV

    2=End

    [2000]

    [AMD64]

    [HPDRV]

    LABEL="HP ABC RAID 0,1,5,6,10,50 Controller"

    DRIVERNAME="HPMSDDRV.SYS"

    1="PCI\VEN_9005&DEV_0285&SUBSYS_02989005"

    2="PCI\VEN_9005&DEV_0285&SUBSYS_02999005"

    3="PCI\VEN_9005&DEV_0285&SUBSYS_029A9005"

    4="PCI\VEN_9005&DEV_0285&SUBSYS_02A49005"

    5=End

    ----------------------------------------------------------

    - This tells the program that the HPDRV driver supports both Windows 2003 and XP and the PNP codes to integrate are listed in the [HPDRV] header. You can find these PNP codes in the OEMSETUP.INF or TXTSETUP.OEM files that normally comes with the driver.

    - The LABEL variable is for visual use only. Windows doesn't care how you name it

    - The DRIVERNAME variable is the main DRIVER.SYS file used by the driver

    - Always include an "END" at the end of each section and the numbering must be accumulative. If you skip one number, the program might go into an endless loop.

    - /DRVPATH is used in conjunction with /PNPINI. You need to specify the path of where your physical storage drivers are located

    - When both /PNPINI and /DRVPATH are used, the program's integrated PNP codes and drivers are bypassed. You provide your own...

    The intention of this parameter is so you can DIY. You no longer need me to constantly release new updates. The design is nothing to write home about but it does the job right.

    Take it out for a test drive.

    Cheers,

  5. Ok, this is what I do:

    1) Install Windows XP like a normal person does, regardless whether it's interactive or unattended.

    2) After WinXP is installed, configure WinXP and then install all necessary MS or 3rd party applications, including service packs and hotfixes

    3) Copy the required Sysprep directory to C:\Sysprep

    4) Within C:\Sysprep is a Sysprep.inf. This is all you need in the INF file. Sysprep and RAID Slipstreamer will fill in the rest.

    [Unattended]
    InstallFilesPath=C:\Sysprep\i386
    OemSkipEula=Yes
    DriverSigningPolicy=Ignore
    UpdateInstalledDrivers=Yes
    OEMPnPDriversPath=Drivers\Audio;Drivers\Misc;Drivers\NIC;Drivers\RAID;Drivers\System;Drivers\Video;Drivers\Modem;Drivers\PCMCIA;

    [RegionalSettings]
    LanguageGroup=1,7,8,10,11,9,13,14

    [GuiUnattended]
    OemSkipWelcome=1
    EncryptedAdminPassword = No

    [Identification]

    [GuiUnattended]
    TimeZone=210

    [RegionalSettings]
    Language=409

    [UserData]
    ProductID="ABCDE-12345-FGHIJ-67890-KLMNO"
    FullName = "Your Name"
    OrgName = "Your Company Name"
    Password = "Passw0rd"
    ComputerName= "Computer Name"

    [Networking]
    InstallDefaultComponents=Yes

    [Display]
    BitsPerPel=32
    Xresolution=1027
    YResolution=768
    Vrefresh=75

    [SysPrep]
    BuildMassStorageSection=yes

    [SysprepMassStorage]

    5) In WinXP, open a command prompt and run "Sysprep -bsmd"

    6) Then run "RSLIP54.EXE /install /source %SystemDrive%\Sysprep /mode Sysprep /OS XP /NoGUI"

    7) Run Sysprep -reseal -mini -pnp -quiet -noreboot

    8) Verify the WinXP configurations and applications are in place before [manually] shutting down

    9) After shutdown, boot to Vista PE and proceed to create the WIM image

    When you have your WIM image, it is ready to deploy to other systems.

    Regarding the APIC HAL issue, if the image was created on a multi-processor CPU for example and the image is to deploy to another system with the same processor type, then no changes required. If however you are deploying to a single-processor CPU, then you may need to add the required parameter into the Sysprep.inf (sorry, I forget what to add. You may have to research yourself). Personally, I created a customized Vista PE that detects the CPU type and then automatically apply the correct HAL and Kernel files after the image has been restored. Actually, it's not really that simple if you are to support multi-core CPUs, single-core CPUs, and legacy and virtual CPUs (including Microsoft Virtual PC 2004/2007)

  6. Yes, you need Vista PE to recognize the HDD before you can deploy images to. It only requires 3 steps, providing that you have already installed MS Windows AIK:

    1) "C:\Program Files\Windows AIK\Tools\x86\imagex" /mountrw "%Drive%\Dev\WinPE\HOME_PE20\boot.wim" 1 %Drive%\imagex

    Where:

    - "C:\Program Files\Windows AIK\Tools\x86\imagex" is the path and filename of the Imagex.exe

    - /mountrw "%Drive%\Dev\WinPE\HOME_PE20\boot.wim" is to mount the boot.wim boot image with read and write access

    - 1 is the first image within boot.wim

    - %Drive%\imagex is where the directory where you mount your boot.wim into

    2) "C:\Program Files\Windows AIK\Tools\PETools\peimg.exe" /inf=%Drive%\Dev\00_OEM_DRV\XP\RAID\vmscsi.inf %Drive%\imagex\Windows

    Where:

    - "C:\Program Files\Windows AIK\Tools\PETools\peimg.exe" is the path and filename of the peimg.exe

    - /inf=%Drive%\Dev\00_OEM_DRV\XP\RAID\vmscsi.inf is the path and filename of the device OEMSETUP.INF. In this case, it's VMware's mass storage controller

    - %Drive%\imagex\Windows is the path to the Vista PE Windows root

    3) "C:\Program Files\Windows AIK\Tools\x86\imagex" /unmount /commit %Drive%\imagex

    ....for dismounting the boot.wim image and the save the changes.

    Place the boot.wim back into Vista PE. That's all.

  7. Barely alive. :P

    The Nvidia drivers were confusing the hell of me and I didn't have the hardware to confirm if the codes were working or not. Because of this, I removed them from RSlip. You can however DIY by supplying your own PNP Codes and use RSlip's /PNPINI parameter.

  8. I have a similar WIM image that works on all of my home and work desktops and laptops, despite of different IDE/SATA/RAID controllers. I call it 1WIM4ALL. :)

    It's actually quite simple:

    1) Run Sysprep with the following command-line parameter:

    Sysprep -bsmd

    2) Download and run RAID Slipstreamer with the following command-line:

    RSLIP54.EXE /install /source %SystemDrive%\Sysprep /mode Sysprep /OS XP /NoGUI

    where:

    - %SystemDrive%\Sysprep is where the required Sysprep directory resides in.

    - /OS XP is to tell RAID Slipstreamer to install XP drivers only

    - /NoGUI is to run RAID Slipstreamer in silent non-interactive mode

    3) Finally, run Sysprep with the following command-line parameters:

    Sysprep -reseal -mini -pnp -quiet -noreboot

    When complete (it could take some time, especially in VMware), shutdown and create your WIM image or clone using Norton Ghost. That's all.

    Cheers,

    Warning: I hope you are aware of the APIC HAL issues when deploying images to different processor types and ways to workaround it. :)

  9. There is nothing much to configure on a Txtsetup.sif. It either works or it doesn't; there's nothing in between.

    Your slowness maybe a result of file allocation errors or worst, hdd bad sectors.

    It may also be that you installed too many applications that makes the operating system sluggish. Best way is to backup your existing OS and do a clean install. If it's still sluggish, then its most likely a hardware issue.

  10. ""During TXT install I got "QL40XX.SYS not found" and the install will terminated.""

    I had the same problem, same message, using XPproSP2. Couldn't figure it out. So instead of loading ALL the drivers (default mode) I just loaded the INTEL drivers (2 check boxes) I needed, using V5.3 Click on one of the green tabs, next to your OS, then check only the drivers you need, make sure the correct directory is shown at bottom left, and execute. Good Luck.

    You are right; v5.3 screwed up somehow.

    I didn't have the time to figure it out why but it's good that you found a workaround. Well done.

    I'll see what I can in the future....or try the command-line method and see if it helps.

    Sorry!

  11. Been using your tool for a little while now and just had the need to add the ICHR10x board to my disk. The tool looks like it added the driver the same way it always does, but Windows PE can not reconigze any hard drive on the computer. I put the disk in my older boards (ICHR9x), and it works fine.

    Any ideas?

    Sorry, I don't have my ICH10x board anymore and even when I had it I have not tried WinPE....so I'll take your word for it.

    I have no idea but the best way I can think of right now is to identify the Vendor and Device codes of your ICH10x (if it's really an ICH10x compatible controller)

    Download this program PCISCAN.EXE , run and extract to a floppy disk. Boot it up and run "PCISCAN -V" at the DOS prompt. Identify the "SCSI" subclass:

    Here's an example of a screen capture taken from VMware Workstation v6.0x configured with a Buslogic IDE controller

    scrcapzb5.png

    scrcapzb5.b23c3cf4a5.jpg

    The above capture shows at the SCSI subclass row, the Vendor code is "104B" and the Device code is "1040". If you look at the VMSCSI.INF that came with VMware Tools, this is the driver code:

    [VMware.Mfg]
    %DEVICE%=DDInstall,PCI\VEN_104B&DEV_1040

    Anyways, the new v8.2.x Intel storage driver supports these codes:

    AHCI mode

    1=PCI\VEN_8086&DEV_2681&CC_0106

    2=PCI\VEN_8086&DEV_27C1&CC_0106

    3=PCI\VEN_8086&DEV_27C5&CC_0106

    4=PCI\VEN_8086&DEV_2821&CC_0106

    5=PCI\VEN_8086&DEV_2829&CC_0106

    6=PCI\VEN_8086&DEV_2922&CC_0106

    7=PCI\VEN_8086&DEV_2929&CC_0106

    8=PCI\VEN_8086&DEV_3A22&CC_0106

    RAID mode

    1=PCI\VEN_8086&DEV_2682&CC_0104

    2=PCI\VEN_8086&DEV_27C3&CC_0104

    3=PCI\VEN_8086&DEV_27C6&CC_0104

    4=PCI\VEN_8086&DEV_2822&CC_0104

    5=PCI\VEN_8086&DEV_282A&CC_0104

    Find out if your controller is supported by the v8.2.x version that came with RSlip Build 080626.

    Cheers,

  12. What's new in v5.3 Build 080626:

    - Updated mainly because of the introduction of Intel's ICH10x AHCI driver. And as always, while I'm updating it, I updated all others as well. These include:

    • Adaptec 20xx/21xx/22xx/24xx/26xx/28xx/ICP90X4R0 SCSI/RAID Controller (AAC.SYS /ARC.SYS -- 2000/2003/XP/AMD64) - Used (and renamed) by numerous vendors including Dell and IBM
    • Adaptec SAS/SATA RAID / IBM ServeRAID 8i/8k/8k-l/8s SAS Controller (AACSAS.SYS / ARCSAS.SYS -- 2000/2003/XP/AMD64) - Used (and renamed) by numerous vendors including Dell and IBM
    • Intel ICH6x/ICH7x/ICH8x/ICH9x/ICH10x SATA RAID Controller (IASTOR.SYS / IAAHCI.SYS -- 2000/2003/XP/AMD64)
    • QLogic QL40xx iSCSI 1Gbps Controller (QL40XX.SYS -- 2000/2003/XP/AMD64)
    • LSI Logic SAS 5e/5i/5iR/6iR/1020/1030/1035/1064/1064E/1068/1068E/1078/3000 (SYMMPI.SYS / LSI_SAS.SYS -- 2000/2003/XP/AMD64) - Used (and renamed) by numerous vendors including Dell and IBM
    • LSI Logic MegaRAID 8408E / IBM ServeRAID MR10 SAS/SATA Controller (MEGASAS.SYS / MSAS2K3.SYS -- 2000/2003/XP/AMD64) - Used (and renamed) by numerous vendors including Dell and IBM
    • AMD 790FX / ATI SB600 AHCI RAID Controller (AHCIX86.SYS -- 2000/2003/XP/AMD64) - Up to the ATi Xpress 3200 chipset
    • LSI Logic MegaRAID SAS 8204/8208 XLP/ELP (MEGASR.SYS / MEGASR2K.SYS -- 2000/2003/XP) - Used (and renamed) by numerous vendors including Dell and IBM
    • Marvell 6121 SATA Controller (MV61XX.SYS - 2000/2003/XP/AMD64) --> Used by some of those crappy Asus P45 motherboards that hang once in a while, just like its P35 brothers. Asus is CRAP!

    All other drivers are unchanged.

  13. Great idea and a great tool!! Kudos. Kickarse!

    One problem though:

    I noticed that if I extracted USB drivers into C:\DRIVERS for example, detected and installed all drivers, and finally deleted C:\DRIVERS permanently. The next time I insert a USB thumbdrive/hdd, the system will not be able to find the drivers it needs, not even USB drivers that originally came with XP. I believe the tool may have changed the search path and points to C:\DRIVERS instead. Because of this, I normally extract the drivers deep inside "%SystemDirectory%\Driverforge" and let them be just in case...

    I tested not from the latest version but several revisions back, so I am not sure if this has since been fixed already or not.

    Cheers,

  14. I think you may want to recheck your own system and verify the file you downloaded against the MD5 hashes provided. I just downloaded the latest version from the links in the first post and found no viruses in the files checking with the latest mcafee, norton and nod32.

    Thanks for verifying this, IcemanND!

    I think people has a grudge against this tool - they must hate it. I have since received two complains of it having viruses or trojains. :wacko:

    Posted April 1st...hmmm....

  15. Nice idea... but how does it work exactly?? :blink:

    There are actually two main purposes for such a product:

    1) Migrate user data and applications from one type of computer system to another without the need to reinstall everything

    2) Create an image that works on any type of hardware configuration

    Cheers

  16. When my company's statistics for 2006/2007 showed that on average an engineer needs to spend 14+ hours to migrate a user's data from one system to another, I immediately went looking for a solution. Now with the help of Sysprep Creator, that time is shorten to less than 3 hours *** In addition, I have now created a Sysprep Image that works on any systems used in my corporation and not having to worry about getting BSoD.

    *** With the help of Microsoft's ImageX and migrating 22 Gb of data from a Dell Latitude D410 to a Dell Precision 390 Workstation (RAID1)

    Sysprep Creator was inspired by Vernalex's excellent Sysprep tutorial but added versatility and compatibility in addition. Think of Sysprep Creator an enhancement of Vernalex's Sysprep tutorial.

    29562110iz4.png

    Sysprep Creator was tested migrating to and from the following combination of systems over a 3 month period:

    Microsoft Virtual PC 2004/2007 ***and VMware Workstation v5.x/6.x configured for Buslogic IDE/SCSI and LSI Logic SCSI HDDs (Virtual)

    Dell Optiplex GX240, GX260, GX270, GX280, GX520 745 and 755 (Desktops)

    Dell Latitude X1, X300, D410, D420, D430, D430 (with SSD), D610, D620 and D630 (Laptops)

    Dell Precision 380, 390 and T3400 (Workstations)

    My home computers: 4 desktops and 4 notebooks of various processors and RAID/AHCI/SATA/SCSI/IDE configurations

    ...and how can I forget....the Asus EeePC 4GB SSD / 512MB version!

    The following systems were also tested but with limited device driver support:

    Lenovo Thinkpad X41 Tablet PC, X60, X60 Tablet PC, X61 Tablet PC (Laptops)

    Dell Latitude XT Tablet PC (Laptop)

    HP Compaq nc6400 (Laptop)

    Hope you find this helpful. It has certainly help both my work and at home.

    *** ACPIPIC HAL must be manually set in Sysprep.inf. This is normally performed at the time of restoring image.

    Download

    v1.2 Build 071223 from Rapidshare: 2 x files. Total size is 146 Mb:

    Sysprep Creator v1.2 Build 071223 - Part 1

    Sysprep Creator v1.2 Build 071223 - Part 2

    Part 1 MD5 Hash: 552BFEF5E07FAFE00062AC34C57DD688

    Part 2 MD5 Hash: C222E9DB6A1AE0E34F77107306292433

    Use HJSplit to rejoin files. Download HJSplit here: http://freebyte.com/hjsplit/#win32

    Sysprep Creator v1.2 Build 071223 Usage Guide.pdf

    Known issue:

    Encountered a very strange issue. For some reason when Sysprep Creator is used on VMware Workstation v6.x configured for LSI Logic 1020/1030 SCSI HDD and migrated to an Intel ICH9R (IASTOR.SYS) system configured for AHCI mode, the system will always BSoD. However, if the target system is configured for Intel ICH9R RAID0/1/5/10 mode, it always works. I suspect it may have something to do with the VMware Tools but no concrete evidence. And no fix yet.

  17. @iTwins - Correct me if I'm wrong, but the UpdateUPHAL line checks the HAL required, Uni or Multi, and chooses the correct one for the platform being built. If the master is built on a Multiprocessor, and will be deployed on only Multi or Uniprocessor systems, you don't need this line but you will have a performance hit on the Uni's running a Multi proc HAL. If iqsman needs to deploy to ACPI systems as well, he should build it on a Uni or Multiprocessor system then change the HAL in device manager to ACPI before running sysprep.

    I think that is correct however, I do not use the UpdateUPHAL or UpdateHAL switches. Instead I copy teh required HAL and kernel files to the system32 instead. It works just as well if not better. Luckily, my corp doesn't have any pre-HT systems to support. The only one pre-HT system that we need to support that uses ACPIPIC is the crappy MS Virtual PC 2007 and this was tested no problem.

  18. Hey,

    thank you for your work, but for me it didnt working... :( Please help me to find out why.

    I made a TEMP folder in my drive C: and copied dosnet.inf and txtsetup.sif. From command line:

    RAID_Slipstreamer_x86_v5.1_Build_071204.exe /install /source c:\temp /os xp

    It seems everything is correct. But it made NOTHING except a dir structure $OEM$\$1\Drivers\RAID.

    What did I made wrong? My config files are untouched, same as before. Please help!

    Joc

    Hey Joc,

    Sorry, I cannot replicate your problem. The only advise I could give is to re-download the tool and try again

    Cheers,

  19. You are absolutely correct, if you are not supporting OLD hardware, pre HT processor then you would not run into the HAL issues. If only that were the case where I work. Every machine you have listed that you have tested is an ACPI UNI or ACPI Multi processor HAL. Try putting it on a Dell GX400 or earlier machine (except the GX300, Dells attempt a a dual processor machine) and unless you upgrade the BIOS and change a setting in it it will likely puke or run like crap.

    Microsoft MVP Setup & Development - Johan Arwidmark wrote vbscripts for WinPE 2005 and v2.0 that detect the number of processors on the target system and then writes the correct UpdateUPHAL value in Sysprep.inf. Well, that script didn't work on WinPE v2.0 but it did gave me an idea how to workaround it. I don't have the link for the original scripts but here's the ZTIHALDETECT.VBS that supposedly solved the problem:

    '//////////////////////////////////////////////////
    '//
    '// Script File:
    '//
    '// ZTIHalDetect.vbs
    '//
    '// This script updates sysprep.inf with correct HAL Type
    '// The Reference (master) computer should be built from
    '// an Advanced ACPI computer
    '//
    '// Use this script for WIM images (Imagex, OSD, WDS)
    '//
    '//////////////////////////////////////////////////

    Set oWshShell = CreateObject("WScript.Shell")
    Set oFSO = CreateObject("Scripting.FileSystemObject")


    ' Customize the local sysprep.inf file based on the HAL type

    Call UpdateSysprepinf ()

    ' Done, quit.

    WScript.Quit

    Sub UpdateSysprepinf ()

    ' Find out the HAL type

    sHalType = oWshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL000\HardwareID")

    If sHalType(0) = "acpiapic" Then

    if oWshShell.Environment.item("NUMBER_OF_PROCESSORS") = 1 then

    WriteIni "c:\sysprep\sysprep.inf", "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,%WINDIR%\Inf\Hal.inf"
    else
    writeini "c:\sysprep\sysprep.inf", "Unattended", "UpdateHAL", "ACPIAPIC_MP,%WINDIR%\Inf\Hal.inf"

    end if

    ElseIf sHalType(0) = "acpiapic_up" Then

    WriteIni "c:\sysprep\sysprep.inf", "Unattended", "UpdateUPHAL", "ACPIAPIC_UP,%WINDIR%\Inf\Hal.inf"

    ElseIf sHalType(0) = "acpiapic_mp" Then

    writeini "c:\sysprep\sysprep.inf", "Unattended", "UpdateHAL", "ACPIAPIC_MP,%WINDIR%\Inf\Hal.inf"

    End if


    End Sub

    Function ReadIni(file, section, item)

    ReadIni = ""
    file = Trim(file)
    item = Trim(item)
    Set ini = oFSO.OpenTextFile( file, 1, True)

    Do While ini.AtEndOfStream = False
    line = ini.ReadLine
    line = Trim(line)
    If LCase(line) = "[" & LCase(section) & "]" Then
    line = ini.ReadLine
    line = Trim(line)
    Do While Left( line, 1) <> "["
    'If InStr( 1, line, item & "=", 1) = 1 Then
    equalpos = InStr(1, line, "=", 1 )
    If equalpos > 0 Then
    leftstring = Left(line, equalpos - 1 )
    leftstring = Trim(leftstring)
    If LCase(leftstring) = LCase(item) Then
    ReadIni = Mid( line, equalpos + 1 )
    ReadIni = Trim(ReadIni)
    Exit Do
    End If
    End If

    If ini.AtEndOfStream Then Exit Do
    line = ini.ReadLine
    line = Trim(line)
    Loop
    Exit Do
    End If
    Loop
    ini.Close

    End Function

    Sub WriteIni( file, section, item, myvalue )

    in_section = False
    section_exists = False
    item_exists = ( ReadIni( file, section, item ) <> "" )
    wrote = False
    file = Trim(file)
    itemtrimmed = Trim(item)
    myvalue = Trim(myvalue)

    temp_ini = oFSO.GetParentFolderName(file) & "\" & oFSO.GetTempName

    Set read_ini = oFSO.OpenTextFile( file, 1, True, TristateFalse )
    Set write_ini = oFSO.CreateTextFile( temp_ini, False)

    While read_ini.AtEndOfStream = False
    line = read_ini.ReadLine
    linetrimmed = Trim(line)
    If wrote = False Then
    If LCase(line) = "[" & LCase(section) & "]" Then
    section_exists = True
    in_section = True
    ElseIf InStr( line, "[" ) = 1 Then
    in_section = False
    End If
    End If

    If in_section Then
    If item_exists = False Then
    write_ini.WriteLine line
    write_ini.WriteLine item & "=" & myvalue
    wrote = True
    in_section = False
    Else
    equalpos = InStr(1, line, "=", 1 )
    If equalpos > 0 Then
    leftstring = Left(line, equalpos - 1 )
    leftstring = Trim(leftstring)
    If LCase(leftstring) = LCase(item) Then
    write_ini.WriteLine itemtrimmed & "=" & myvalue
    wrote = True
    in_section = False
    End If
    End If
    If Not wrote Then
    write_ini.WriteLine line
    End If
    End If
    Else
    write_ini.WriteLine line
    End If
    Wend

    If section_exists = False Then ' section doesn't exist
    write_ini.WriteLine
    write_ini.WriteLine "[" & section & "]"
    write_ini.WriteLine itemtrimmed & "=" & myvalue
    End If

    read_ini.Close
    write_ini.Close
    If oFSO.FileExists(file) then
    oFSO.DeleteFile file, True
    End if
    oFSO.CopyFile temp_ini, file, true
    oFSO.DeleteFile temp_ini, True

    End Sub

    Found it. Johan Arwidmark's Blog is here:

    http://www.myitforum.com/articles/15/view.asp?id=8997

×
×
  • Create New...