Jump to content

GreenMachine

Developer
  • Posts

    3,070
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    France

Everything posted by GreenMachine

  1. If you do not have the rm.exe, a UNIX like remove utility, (didn't come with my windows) use the windows built-in command rmdir (remove directory, rd for short) instead. Type rmdir /? at the command prompt for usage.
  2. Try "%PROFILESDIR%\Default User" instead of (nonexistant) %DEFAULTUSERSPROFILE%. I get the feeling I already said that ...
  3. SQL can be installed using the Unattended InstallShield Method, described here somewhere (in the guide, perhaps?). You basically run setup with a switch, input all the data, and finish. Instead of creating the install, a silent install file is created, which you will now need to pass to setup when calling it. The guide is more informative than my 3 sentences ... I'm not sure about VS, but a quick try will tell you for about 1 minutes work. Don't know about illustrator either. If you get it working for VS please let me know. I've had a lot of luck with google searching for APPNAME and "Unattended install".
  4. Thanks, Royalbox. Credit where credit's due: I'd been meaning to try that slipstream for a while, but could not make the first step. Following is my modified version of WebMedics version. I simplified certain parts (only do fix type 1 and 2, no MDAC), and made others more complicated (each file extracted to it's own directory, XCOPY instead of COPY for selective date based copies), and changed the directory structure (after about 5 beers, I can no longer keep track of single digit variables / directories). For what it is worth, here it is. You need the fixes in either directory HFTYPE1 or HFTYPE2, the expanded SP1.CAB in directory SP1CAB, and the files COMPRESS.EXE, CABARC.EXE, HOTKILL.INI in the root of your chosen directory. It is path indepedant, and works (for me ...) with long file names. But I guess I do not need to walk you through it: the code is fairly readable. @echo off setlocal enableextensions REM - Shamelessly copied from others posted work ... REM ---------- Initialization ---------- ECHO Find out where we are ... SET PREPDIR= FOR /F "delims=" %%i IN ('cd') DO SET PREPDIR=%%i ECHO We are at %PREPDIR%. REM ---------- CleanUp & Preparation ---------- ECHO Cleaning up first. if exist WORKDIR RMDIR "WORKDIR" /S /Q > NUL if exist SAVEDIR RMDIR "SAVEDIR" /S /Q > NUL if exist EXTRACT RMDIR "EXTRACT" /S /Q > NUL MKDIR WORKDIR MKDIR SAVEDIR MKDIR SAVEDIR\SVCPACK MKDIR EXTRACT if exist HFTYPE1.cmd del /q HFTYPE1.cmd > NUL if exist HFTYPE2.cmd del /q HFTYPE2.cmd > NUL REM ---------- Extract Type 1 HotFixes ---------- ECHO Extracting Type 1 Fixes ... for /f "usebackq delims==" %%i in (`dir /b HFTYPE1\*.exe`) do ( echo HFTYPE1\%%~ni.exe /q /x:EXTRACT\%%~ni >> HFTYPE1.cmd echo xcopy /d /h /y /s EXTRACT\%%~ni\*.* WORKDIR >> HFTYPE1.cmd echo if exist EXTRACT\%%~ni\SP2 xcopy /d /h /y /s EXTRACT\%%~ni\SP2\*.* WORKDIR >> HFTYPE1.CMD ) if exist HFTYPE1.cmd call HFTYPE1.cmd REM ---------- Extract Type 2 HotFixes ---------- ECHO Extracting Type 2 Fixes ... for /f "usebackq delims==" %%i in (`dir /b HFTYPE2\*.exe`) do ( echo HFTYPE2\%%~ni.exe /Q /T:%PREPDIR%\EXTRACT\%%~ni /C >> HFTYPE2.cmd echo xcopy /d /h /y /s EXTRACT\%%~ni\*.* WORKDIR >> HFTYPE2.cmd echo if exist EXTRACT\%%~ni\SP2 xcopy /d /h /y /s EXTRACT\%%~ni\SP2\*.* WORKDIR >> HFTYPE2.CMD ) if exist HFTYPE2.cmd call HFTYPE2.cmd if not exist WORKDIR\* goto _end REM ---------- Save the files to be copied to the distribution ---------- ECHO Copy Fixes to SVCPACK copy /y HFTYPE1\*.exe SAVEDIR\SVCPACK > NUL copy /y HFTYPE2\*.exe SAVEDIR\SVCPACK > NUL REM ---------- Save off the .cat files. ECHO Move the .cat Files. for %%i in (WORKDIR\*.cat WORKDIR\UPDATE\*.cat) do move /y %%i SAVEDIR\SVCPACK REM ---------- Clean up some ---------- if exist WORKDIR\SYMBOLS RMDIR "WORKDIR\SYMBOLS" /S /Q > NUL if exist WORKDIR\UPDATE RMDIR "WORKDIR\UPDATE" /S /Q > NUL if exist WORKDIR\COMMON RMDIR "WORKDIR\COMMON" /S /Q > NUL if exist WORKDIR\SP1 RMDIR "WORKDIR\SP1" /S /Q > NUL if exist WORKDIR\SP2 RMDIR "WORKDIR\SP2" /S /Q > NUL for /f %%i in (hotkill.ini) do del /f /q /s WORKDIR\%%i > NUL REM ---------- Update any files that are also in the SP1.CAB ---------- ECHO Merge the 2 packs. xcopy /d /h /u /y WORKDIR\*.* SP1CAB ECHO Make SP1.cab cabarc.exe N SAVEDIR\sp1.cab SP1CAB\*.* REM ---------- Compress to MS format ---------- ECHO Compress all the files compress.exe -d -r -zx21 WORKDIR\* SAVEDIR REM ---------- Generate the .inf file ----------- ECHO Create the .inf file. echo [Version] > svcpack.inf echo Signature="$Windows NT$" >> svcpack.inf echo MajorVersion=5 >> svcpack.inf echo MinorVersion=1 >> svcpack.inf echo BuildNumber=2600 >> svcpack.inf echo. >> svcpack.inf echo [SetupData] >> svcpack.inf echo CatalogSubDir="\i386\svcpack" >> svcpack.inf echo. >> svcpack.inf echo [SetupHotfixesToRun] >> svcpack.inf for /f "usebackq delims==" %%i in (`dir /b HFTYPE1\*.exe`) do echo %%~ni.exe /n /q /u /z >> svcpack.inf for /f "usebackq delims==" %%i in (`dir /b HFTYPE2\*.exe`) do echo %%~ni.exe /Q:A /R:N >> svcpack.inf echo. >> svcpack.inf echo [ProductCatalogsToInstall] >> svcpack.inf for /f "usebackq delims==" %%i in (`dir /b SAVEDIR\SVCPACK\*.cat`) do echo %%~ni.cat >> svcpack.inf REM ---------- compress svcpack.inf ---------- ECHO Compress the .inf File. compress.exe -d -r -zx21 svcpack.inf SAVEDIR REM ---------- copy new system files to output folder ---------- ECHO Copy any Additional Files. if exist SYS\*.* xcopy /y SYS\*.* SAVEDIR :_end (I hate those long posts with too much code to read ... sorry!)
  5. Not to be nit-pickin' ... From what I've tried and read, DefaultUsersProfile never exists. Certain variables are available during setup, certain other during run-time. You can type the SET command without parameters or switches to see the current list of environment variables. If you are curious, you could add something like PAUSE SET PAUSE to one of your setup batch files, and you can see what is there to use. Concerning Jeffr's problem, as WebMedic says, be sure the directory exists. I prefer to use XCOPY, with the full directory structure. Eliminates these kind of problems, avoids checking to see if directories exist, and is generally a much better command than COPY (date compare, only copy existing files, etc). Also, should you running this in the pre-gui reboot stage of setup, USERNAME will not exist. Strange: I went through a lot of research to figure out how to keep the Media Player link from being added to the quick launch bar...
  6. Good eye, Kenneth, for the missing [COMMANDS] statement: I bet that is it. I would have said that order is important on the NET LOCALGROUP command, but in testing it does not seem to matter. User.cmd lives, and remains, on the CD only, directly in the $OEM$ directory. cmdlines.txt lives there as well, and is "run" automatically if it exists. It may depend on OEMPreInstall, can't remember right now. That will be in the ref.chm file that comes with setupmgr.exe of the deployment kit. (It is in fact parsed, and the commands passed to the command interpreter...)
  7. Should read Statement 2: For some reason either %PROFILESDIR% is evaluating to NULL, and the drive E is used, as there is no drive letter in the path. Or perhaps you previously defined PROILESDIR to be "E:\"? If not, I would think that E: is the CD drive letter, which would explain the "Unable to create directory - E:\Default User" error - cannot create a directory on the CD. If you are unsure of the PROFILESDIR value, you can add this to your batch file: ECHO PROFILESDIR is %PROFILESDIR% and it will show you on the screen where it thinks the profiles are to be kept. PROFILESDIR is undefined after the cmdlines.txt portion of setup, and could cause both your problems if it is undefined. If you get the first statement working, you do not need the second statement: just put your files in the Profiles directory, with the proper directory structure. I have never found a way to prevent Windows from re-defining the Start Menu Sort Order whenever MenuItems are re-arranged, or new programs are added, but I have not looked too far as my solution works fine. (I never re-arrange by hand, and it is VERY rare that I add a new program.)
  8. Can't remember if you need quotes when using envronement variables... Perhaps start /wait "%systemdrive%\Updates\q282010.exe" /Q /U /Z If you put a "PAUSE" at the end, you will be able to see any error messages written to the screen.
  9. I see you have a pause at the end of the batch file. Before you press any key, see if there is an error message after the NET commands. You should have either an error, or a "Command Successful" type message. Do tell!
  10. Strange as it may seem I had the exact same thing (with different files). I was convinced it should work, and I burned 3 bad CDs. Could not get those bad files on another CD drive, either. (Different files each time.) I lowered the burn speed from 52X to 32X, and it worked. It had been working at 52X for a while. Bottom line - one never knows! Best test would be to install to VirtualPC through a mounted ISO file. I vote for hardware failure, not software, and VirtualPC will tell you for sure.
  11. I must have mis-understood. I guess it was the "etc", "only exception" and "does not do it that way" that threw me off... I must of also mis-stated: My files are in sub-directories of $OEM$. $OEM$ itself only contains CMDLINES.TXT and INSTALLS.COM. I never reference $OEM$ directly: all my calls use relative paths from inside of it. (See earlier example)
  12. @WebMedic: Are you sure? I am very open to discussion, but please be sure before you call me wrong. I've been doing installs that way for months. It works exactly as I described. All my files are under a directory with $ ($OEM$), are not copied to the hard drive, and are installed correctly. If it was really hard, you can be sure I would not be doing it, but really hard does not mean impossible or wrong. Peace.
  13. Does that make me three? No RunOnce, RunOnceEx, GuiRunOnce, .inf file generation, pre-installatiion file copy, "install" folder for me. Minimalist. Different strokes for different folks - otherwise we could just have a How-To guide, instead of an idea sharing forum. Keep it cool ...
  14. It can, and does for me. As Webedic says, $$,$1,C,D etc. are copied to the HDD. That is why I never use them. Root files as well as user-defined folders are not copied to the HDD, can be referenced from the batch file with relative paths, and run from the CD. If in doubt, either watch the CD whilst your programs are running - or eject it and see at which point you get an error. Example: CMDLINES.TXT: [COMMANDS] ".\INSTALLS.CMD" INSTALLS.CMD: @ECHO OFF TITLE Post Install Setup :: ---------- Update MS Components ECHO Starting DirectX 9 Install. START "DirectX 9 Install" /WAIT ".\DIRECTX\DXSETUP.EXE" /opk . . . Directory Structure: $OEM$ - DIRECTX - IE - PROFILES - SVCPACK That's all. No $anything, no install. No clean up of hard drive later.
  15. For a more in depth discussion on cmdlines.txt ... Written for Windows 2000, but still relevant. However, it is erroneously stated that files to be run must be on the hard disk. I NEVER copy installation files to the hard disk: all installations are called from a batch file, which is called from cmdlines.txt, and use relative paths to $OEM$ subdirectories on the install CD.
  16. "About 5 folders" and 6 files in directory 2 ... I vote for a path problem. Long directory names? Quotes where needed? The strangely numbered directories you see are most likely the temporary directories that hotfixes often use. They are named something like "456156753864328974238549". If the hotfix install correctly, these will be deleted. Seeing them is not a good sign.
  17. Sorry, I'll try to clarify: The Variable DEFAULTUSERPROFILE never exists. The directory %PROFILESDIR%\Default User (Most likely C:\Documents and Settings\Default User) does exist, and contains a file named ntuser.dat. This dat file is where user specific registry settings are stored (The HOT_KEY_CURRENT_USER registry hive). If you want to reference this folder during setup (part 1), you may use the %PROFILESDIR% variable. There is no environment variable to reference this path after part 1 setup, or during normal operation. You can either derive it from ALLUSERSPROFILE, or assume it to be in %SYSTEMDRIVE%\Documents and Settings\Default User if you did not set the PROFILESDIR variable to something else in WINNT.SIF. You do not see the Default User directory if you have not selected to show hidden files. I have seen that All Users.WIndows thing before, and now that Webmedic has shaken the dust of ... I remember that this will happen if a directory of USERNAME already exists when the system attempts to create the user profile. You could conceivibly create the file C:\Documents and Settings\All Users\some.txt, and the system would not use the same directory to store a new profile of the same name. Quick and dirty workaround: delete the directories, and the system will re-create them with the correct directory names next logon of that user.
  18. 1) Not sure about the duplicate users. Looks like you're are on a server, no? 2) Webmedic has an answer to this already posted here somewhere. 3) DefaultUserProfile does not exist. PROFILESDIR exists during pre-gui reboot, ALLUSERSPROFILE exists after. You can use %PROFILESDIR%\Default User (wrapped in quotes) in your example. I would just create all your menu items. then xcopy, instead of making each directory. No need to install them to the HDD first: you can copy from where you are (CD:\$OEM$ at this point).
  19. If I may make a suggestion (or two...): The script to do the hotfix slipstreaming works great, but is kind of a black box. If it were to be used as a learning device, perhaps there should be a few changes for clarification/simplification. RAID could be a seperate case study. MDAC is particular and trickey, perhaps it should not be here as well (I do it from cmdlines.txt). Perhaps a few more ECHO to screen statements, to have an idea ... Descriptive directory names. How about HFTYPE1, HFTYPE2, WORKDIR, SAVEDIR instead of 1, 2, 4, 5, respectivly. The generated log file seems a bit long ... Please take these words for what they are intended to be: suggestions, and by no means criticism.
  20. There is a medical term for that ... Evelynn Wood used to have speed reading classes many years ago that were based on reading phrases, not words, and reading one sentence right to left, and the next left to right, (less eye-movement, refocusing). I've also heard that Lawyers learn to read upside down - practice for those meetings where the unsuspecting adversaire leaves something on his desk ...
  21. It can be done, but is a little complicated. I spoke about it onthe bottom of the 5th page of this thread. I have posted a few replies to this, and am not sure anyone other than myself has succeeded. Let me know.
  22. Well, if you got a log file, I guess I'm off the hook for blowing anything up! I have seen that error screen before, but all I remember about the solution was that it was so obvious, I forgot it. I am not quite sure which Type 2 HotFixes can be applied. I do KB814078, Q327405, Q330994, and Q822925 without incident. Installations (MDAC 2.8, MPlayer9, IE 6.1, JavaVM, .Net, DX) I do seperately. 5 errors, 5 files in directory 2 ... Good Luck!
  23. If the hardware is EXACTLY IDENTICAL and the software has been installed EXACTLY THE SAME, it'll work. In other words ... forget about it. This is the kind of thing to do if you have a (very) lot of time on your hands, like in a prison cell for a while, not so you can "see the daylight". You'll spend hours trouble shooting, and you will never know for sure. It is still not sure that all seting and serial would be saved in the reg file. Winamp, amongst others, still uses .ini files insread of the registry.
  24. I've seen that pack. It is just a collection of the post SP1 hotixes, and a batch to run them all (quite similar to the batch files used here). It offers no more than the many batch files posted here for the same purpose. Question is: Do you want to download your patches from MS, or deadknightz?
  25. The UserData section of WINNT.SIF specifies the Registered User Information, not a Windows User Account, thus the code above does not create an account. Furthermore, it is impossible to create 2 accounts with the same name.
×
×
  • Create New...