Jump to content

Djé

Member
  • Posts

    359
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    France

Everything posted by Djé

  1. * Very good trick indeed. - Please note that extensions are enabled by default on ALL winXP systems. So if you didn't change it, no worry. Now, you're true, we can just keep 'SETLOCAL ENABLEEXTENSIONS' at the top of the script to be sure.- On the other hand, I don't recommand enabling delayed expension (off by default) if you don't require it. In some situations this can bring more mess than solve issues. You script doesn't require it. Also note that even with ENABLEDELAYEDEXPANSION, you can still use '%' as a variable marker: only those marked with '!' have their expansion delayed, though. * There may be another issue when using WPI from a network share if WPI itself is on the share: you need to lower the security in order to run unsigned programs (WPI itself) without the "Open file" security Warning. SET "KEYD=HKCU\Software\Microsoft\Internet Explorer\Download" SET "KEYP=HKCU\Software\Microsoft\Windows\CurrentVersion\Policies" REG add "%KEYD%" /v "CheckExeSignatures" /d "no" /f REG add "%KEYD%" /v "RunInvalidSignatures" /t "REG_DWORD" /d 1 /f REG add "%KEYP%\Attachments" /v "SaveZoneInformation" /t "REG_DWORD" /d 1 /f REG add "%KEYP%\Associations" /v "LowRiskFileTypes" /d ".cmd;.exe;.hta;" /f - From my experience, if you run WPI at RunOnceEx, you need to run the above script from T12: running it just before WPI @RunOnceEx fails. - It may be a good idea to reverse to higher security for HKCU, HKU/.DEFAULT and the Default User's hive once the programs are installed. For example in cleanup.cmd from RunOnceEx. - In the "LowRiskFileTypes", put whatever extension(s) you use from the share, outside of WPI: WPI deals with the inside ones. * Also, you CAN use WPI from a network share with absolute paths: you just have to map the network drive to that path:NET USE Z: \\DJE\XPCD\install and then in WPI, have your commands like: Z:\myprog.exe -switch But it may be less convenient than your method. Which I'm gonna investigate further right now.
  2. Thomas, 1- you did not reply about the password discrepancy issue mentionned in my 1st post. 2- the debuging log is correct. No big problem on the machine with the NET command or the REG one: users are correctly added, and reg entries are correctly imported. On that box you ran the debuging script: -delete 'c:\regdebug.txt' - In Notepad edit the top of the 'adminuserThomas.cmd' script to replace the username 'Thomas' by 'Tester' and set 'passtest' as password: :: --------------------- Config start. -------------------- :: Set username (and password, optional) for admin user. SET AdminUser=Tester SET AdminPass=passtest ::***** LANGUAGE DEPENDANT ***** SET AdminGroupName=Administrators :: ---------------------- Config end. --------------------- -Save your changes. -run it (double-click). -restart the box See if it autologon to some account. If yes, tell us which one. If no, repost the new 'c:\regdebug.txt'.
  3. Thomas, REG and regsvr32 are 2 completely different programs. There can be a lot of reasons why your dog is still wagging its tail (maybe it is just a stupid dog ), so let's concentrate on the 1st issue, the REG one. First, there is a problem with my previous script in your case: the admin group name is in French. You should replace 'Administrateurs' with 'Administrators'. But, I am not sure that it is the issue. Attached is a custom version of the previous script, specifically designed to debug your case. Download it an just simply run (double-click) it on the system you want to debug (no need to do it during windows installation). The 'black' CMD window will show up for a few instants executing the commands, and then disapear. A file (named c:\regdebug.txt) will be written with your old values (your password(s) are not recorded), the results of the commands and the new values. Post the file (attach it) so we can see what is going on. adminuserThomas.cmd
  4. Bezalel, do you have documentation about this? What means what, and what to replace? Is google my friend?
  5. Actually, the bartPE CD and the UaXPCD *ARE* 2 separate things (and both have a I386 folder, although quite different one from the other). You can have your UaXPCD folder wherever you want: on the bartPE disk or on a partition of your HD, or on a USB drive or on a remote share that you connect to, etc. Installing windows from BartPE is then just a matter of running winnt32.exe from where it is (in your UaXPCD folder). In my case, I have a (almost-)normal bartPE CD. On it I have a script that connects to a network drive: NET USE Z: \\Dje\XPCD /user:nodomain\install installand then run winnt32.exe from where it is on Z: Z:\I386\WINNT32.EXE /unattend:Z:\I386\WINNT.SIF /tempdrive:c: That's all! (well no, the whole thing is more sophisticated than this, with a lot of cool scripts to automate and customize things, but ultimately, it breaks down to this). I'm running it like this since months. If your UaXPCD folder is on the bartPE disk (X:) then you don't need the 'NET USE ...' command and would just run: X:\UaXPCD\I386\WINNT32.EXE /unattend:X:\UaXPCD\I386\WINNT.SIF /tempdrive:c:(Not tested) You may even not need the '/tempdrive:c:' option in this case. For the $OEM$ thing, the point not to forget (at least when making a local source) is: either put the $OEM$ folder INSIDE I386, or use OEMFilesPath=..\$OEM$ in the [unattended] section of winnt.sif
  6. Good catch, indeed. In fact, you can do much more than that: * Just type 'notepad', and you can *EDIT* the files. (incidentally you can browse the computer using the 'open' box). - Instead of looking at winnt.sif in your \I386, look at $WINNT$.INF in C:\WINDOWS\system32. There are the settings actually used by setup (it's too late to change things in winnt.sif). Now try to hack it!! - As for changing the ProductID: I don't know about CD based install, but you need a valid one in winnt.sif prior to run winnt32.exe. So I have a valid 'generic' one in there, and a custom script to change it from T39, according to the machine spec (see the discussion about preactivation). - The games on the HD, as well as all files are accessibles. I didn't try to run explorer yet (I suspect it doesn't work), but just using the 'open' dialog of notepad to reach the files (and then right click to open/run them) is working well. * Also type 'regedit' and now you can do whatever you want with the registry. ... ... ... No don't do that! * For sure, this trick is not enough advertised. I only discovered it in a buried message of this board. It works as soon as setup runs (before T39). * Extremely useful for debuging and understanding how setup works, for improving the unattended things. * USB devices are also accessible as early as T39: I'm running scripts on USB drives from this point. Very useful form customization: it runs the script only if the flash disk is plugged-in.
  7. Thomas, Look at your post: all files are being merged in one 'CODE' tag. And please, for the sake of usability and clarity, attach such long files as winnt.sif & LAST SESSION.INI rather than including them. Now for your problem: Your folder in Documents & Settings is not created before you try to logon to it (1st logon). So you need to logon 1st with the thomas account. Which you tried, but failed, as you say that the 1st logon is with the 'owner' account. This means that your autologon stuff is not working properly. For 1 thing, your password in AUTOLOGON.REG may be fake, but it is different from the one in USERACCOUNTS.CMD. Please check that it doesn't come from this and report back. Alternatively, you may want to use only 1 single script instead of these 2 files. That way, you just have to set your login & password only 1 time, avoiding such error. See attachment. Also you don't need the OOBEINFO.INI file if you use the 'NET USER' method. Moreover, in XP home, if the 1st user created (or loging in, I'm not sure of which yet) is an admin and has the same name as the 'FullName' of '[userData]' in winnt.sif, the 'owner' account is deleted automatically (because this user is the owner). [EDIT] replaced attachement with a more international version (ready for english systems). adminuser.cmd
  8. Description: VB Array Functions. Programming Language: Visual Basic (for Applications, but I guess it works also with VB & VBS). Usage: Have the whole set in a module of your project, or just insert in your code the function(s) that you need (beware of dependancies). VB's handling of arrays is under everything. Especially when compared to other languages. Those functions will come handy to everyone seeking to make something out VB arrays. Yes, they are the same as those I'm using in my Excel ProgsLists generator. '-Double-check but most of them should work with any array, even not 0-base-indexed (no relevant for VBS). '-Arrays are normally passed ByRef, so the args are updated by the function. '-They are fairly tested, but the usual disclaimer apply. Not all array handling functionnalities of other languages are implemented here. If you have other functions that you'd like to be included in the set, PM me. Content: '* Returns true if the array has at least the specified number of elements (default to one element) Function isSetArray(anArray, Optional minSize As Integer = 1) As Boolean * Drops the first element out of the array and returns it - in the array, the other elements' index is decreased by one Function arrayDrop(anArray()) * Pops the last element out of the array and returns it - the array passed as an argument loose this element Function arrayPop(anArray()) * adds 'avalue' as a new element at the end of the array Function arrayAdd(anArray(), aValue) * Merges the 2 arrays in the 1st one and returns it Function arrayMerge(Array1(), ByVal Array2) * Like the 'Join' function but with more possibilities Function implode(anArray(), Optional separator As String = " ", Optional keepEmptyElem As Boolean = False) * Like the 'Split' function but actually working with line breaks! - Try: Split(myString, vbcrlf) -> error Function explode(theString As String, Optional separator As String = " ", Optional keepEmptyElem As Boolean = False) * Translates an array containing arrays [like array(i)(j)] to a bidimentional array [like array(i, j)] - The second dimension depends on the dimension of array(0) - The array passed as an argument is NOT updated Function arrayRect(anArray()) * Similar to Splice in JS: remove/insert some elements in the array - starts operating at the 'start' position (from 1st element=0) - removes 'count' elements - inserts the elements of 'additions', which has to be an array (if passed) Function arraySplice(anArray(), start As Integer, Optional count As Integer = 1, Optional additions As Variant) Restriction: Except for 'isSetArray()' and the second arrays of arrayMerge & arraySplice, the array arguments are passed ByRef so they must be declared as arrays prior to pass them to the functions: To change this and be able to pass anything (!), you may remove the '()' in the declaration: [Edits]: - v0.0.2. Improvements to isSetArray, arrayMerge, implode & arraySplice. Addition of explode. - Testing Sub() procedure at the bottom of the module. More_ArrayFunctions.bas.txt
  9. @Gawoozle &azaze1 this bug should be solved in 5.1. Try this latest version of the installer.
  10. I'd like to have support for the %USERNAME% environment variable (maybe in the replpath() function of generate.js), for conditional restoring of user data.
  11. Attached is shortcut file to put in you WPI folder. It just opens your config.js in notepad. It saves a few clicks each times! It should work wherever the WPI folder is. Edit it only if you want to use another editor. Edit_config.js.zip
  12. Here are little improvements on Delprat & Caramel's code: -Get rid of the folder thing: Stuff them all in one folder and just use the numbers in the file extension (.x=uncompressed, .x_=compressed). -Number of digit easily customizable. -Security: max number of tries before leaving the loop. -User customizable stuff set at the top of the file (.dll location, number of digits and number of tries). rndombbu.cmd (call it from presetup.cmd) @ECHO OFF &SETLOCAL ENABLEEXTENSIONS ::****************************************************************************** ::CUSTOMIZE HERE: winntbbu.dlls' location, nber of digits and max nber of tries PUSHD %cddrive%\bbudlls SET DIGITS=1 SET MAXTRIES=50 ::FILE EXTENSIONS CHANGE (x=number): .dll-->.x and .dl_-->.x_ ::****************************************************************************** :random_bb SET /A TRY=%TRY%+1 IF %TRY% GTR %MAXTRIES% GOTO :END SET bbn= FOR /L %%? IN (1,1,%DIGITS%) DO (SET bbn=%bbn%%random:~-1%) if %random:~-1% geq 5 ( if exist winntbbu.%bbn%_ ( expand -r winntbbu.%bbn%_ %temp% move /y %temp%\winntbbu.dll %windir%\system32\ ) else ( goto :random_bb ) ) else ( if exist winntbbu.%bbn% ( copy /y winntbbu.%bbn% %windir%\system32\winntbbu.dll ) else ( goto :random_bb ) ) :END set bbn= set cmp= POPD [EDIT] added the 'SET bbn=' instruction, otherwise try>1 would have fail.
  13. A bit like Bilou, I have a solution called from DetachedProgram @T39. It is not a Compname/batch solution but it uses the RBE.EXE prog (MiTeC ROM BIOS Explorer 2.2) together with a modular AutoIt script. It is still a bit too alpha for releasing (don't worry Bezalel, I'll start a new thread if ever I do), but here is an idea that I'm implementing and may be found useful by others: -I use only XP home systems so the productkeys are not the standard one from microsoft. I have to save mines before (thanks to Bezalel's idea). The one paired with the OEMBIOS.* files has to be restored to 'SYSTEM32\$WINNT$.INF' early enough (T12 is too late), hence the T39. -Althoug it's working with a CD based install, I use winnt(32).exe based installs (network or usb drive), which makes a local source on the sytem. So I don't want to download ALL the oembios sets to the local source since I will use only one. So @T39, my AutoIt script just writes a batch script that will be run @T12 to connect again to the network (there is no network @T39) and download the files to System32 (and move the cat to \CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}). It works like a charm. Other features (if someone's interested): - 1 (double-)click back-up, silent restore! - Modules allow to backup/import other custom setting that you usually have to fill in winnt.sif: My winnt.sif is a very standard one with basic infos. So the command to run winnt(32).exe is always the same (no need for a different answer file for each system). - Current modules cover (at least partially) the Display, NetworkIdentification & UserData sections of winnt.sif. Plus a module for custom commands to be run at T39, T12 or RunOnceEx. - Backed-up data is stored in a .ini file, easy to edit, manually or with AutoIt. - oembios.* file and backed-up data can be tagged with either the System's Manufacturer, Model, Version, Serial or UUID (all from type1 smbios, other tables could be implemented).
  14. Man, can't you just attach the file to keep this thread readable... Please edit your post. Most of your probs, if not all, have been solved in 5.0 final. Check it out and report any remaining flaw.
  15. Because Findstr may find more than one "Manufacturer" line (Bezalel reported so) and you don't want to iterate on all of them but just take the 1st one (which hopefully is the right one). Hence the GOTO once the job is done.
  16. I must have break it I'm looking into it right now. [edit]I've just send a fix to mritter.
  17. Mritter, I confirm the bug for the 'Applications category' thing: - I downloaded the vanilla WPI and ran it. Of course no prog is showing up since the config is empty (no config.js -nor useroptions.js for that matter). - Then I went to WPI's config editor. Typed a prog entry. -> category is set BY DEFAULT to Applications. - Typed a command for that entry, saved and exit the editor. -> The prog is not showing up in WPI's main window!
  18. Oups, sorry! I've just changed that and passed uid[pn]=[]; first because of my new injection thing. It works fine (with or without injection) for display and install. Only the configwizard broke. But I can have uid[pn]=[]; in between prog[pn]=[]; and the injection stuff (prog[pn][0]+='...' So it's ok. Thanks again and sorry to have make you spend your time on this. And the injection also breaks the configwizard, not so surprisingly! But that is not a WPI bug!
  19. Your WPI is bored of checkbox? It wants to experience something different? Something new? Something wizz? Or is it introverted? Should it go ride higher in the sky with diamonds? Or maybe just see the things from a different POV? Do you want to help it? Well, you can't give it your coke nor your fanta, but you can still improve its creativity and make it feel powerful. Just treat it with a special injection of yours. And see the result: Look! Now it's displaying custom option's checkboxes, buttons, radio button choice, textfields, or whatever else it's triping on. And all this without ANY modding of WPI. It is just your beloved vanilla WPI. But it has been injected. Don't worry, this has no side effect: if you remove the syringe from its config.js, it stops immediately. WTF am I talking about? 'Injection' is well known in the security community as a way used by crackers to attack server sided databases (SQL injection is the most well know type) or applications. It works for example by 'injecting' some code in an otherwise inert form answer. On a server application with low security, the code processing the answer may also execute the injected code, giving the cracker a way to control the server. Now in WPI things are different: we are the server, we already control everything and execute whatever code we want. So clearly WPI does not need to protect itself agains this thing. Rest that the mechanism still works (in a slightly different way) and we can take benefit of it to improve WPI's functionality and interface. Functionality & User Interface: - I mention interface because many issue (such as the 'set default browser' option in the pic) can be dealed with using the existing WPI features (I could just have another prog running that command, dependant on the main setup) but the injection can bring more freedom as for how to display it. So in this case, injecting the option is just another way to perform the task: Having on the same line clearly links the option to the main setup.- Same goes for radio options which could be solved by setting exclusions. But radios buttons are more user friendly for this. And they don't need any code to handle the exclusions. - Now there is the case of buttons. The great improvement here is that they can allow the user to perform an action (answering a question, selecting a file, etc.) now, while the WPI window is displayed, and not wait for all the other progs to be installed before the selected one can ask what it needs. In the example, the user can just select now the profile he wants to be restored, and don't wait for the restoring app's turn to run and ask him the question.- Another great use, with Fx extensions as an example: the user can select which extension to install by clicking the button: This will open ... another WPI with another config.js dedicated to the extensions. When the user click 'Begin Install' in this one, for each selected extension, it run a prog which simply record the extension's name to a file. The file will then be parsed by the extension installer of the main WPI in due time (after firefox and profile installation).Again, I could probably stuff all the extensions in the 1st config.js and try to manage something with the exclusion (all vs some extensions). But a new dedicated WPI window is so much cleaner. Ah, yes. I lied. For this last trick to work, you need to mod WPI: In WPI.hta (open it with notepad) you have to change 'singleInstance' from 'yes' to 'no' on line 21. That's all. But how the Duck Woes it Fork: An example being better than a long explanation, have a look at the attached config.js (to be able to use the extension button change the command for running the second WPI to suit your case). Simply put, it appends some HTML tags to the prog[pn]s. - Since these prog[pn] are used (without further processing -here would go the protection against injection in a server application-) to build WPI's HTML interface, the HTML elements appears in it. - The active ones (buttons, etc.) have their onclick() attribute set to the custom javascript code needed to perform the intended action (mainly modding the commands: cmd1[pn], etc.) Done. Issues: Although very promizing, this is also very beta. The main issue is about how to automate the tedious writting of the HTML and javascript that will be injected. I'm working on a next version of my Prog Lists writing excel application which will be able to do it. Probably with easy functions (that you could use in excel's formulas) like: injectCmdCheck(label, checked, cmdNum, CmdChecked, CmdUnchecked) to insert a checkbox altering the cmdx of the current prog. Does it make sense? There is also a small glitch with the tooltips as they also display some parts of the injections! Enough for now. Comments welcome! [Disclaimers] 1- If ever you took it otherwise, the drug 'apology' at the beginning of the post is fully ironic. It is only there for humor and literary purpose (although if you have no humor, I may advice some *** !). Here is my -non humorous- position about drugs: Drugs make you stupid ('soft' drugs do, 'hard' ones usually kill you before they can). 2- If you're a script kid and your brain is striked by the idea of trying this injection thing on a server that you don't own, you're running -very fast- into deep s***. Not only well designed applications are protected against this kind of things, but admins have tools to detect it and to hunt you down. This is sooo outdated. Now go back finish your homeworks. config.js
  20. Sorry, I did not explain it well: my Sort Order is empty as I already feed WPI the progs in the order I want. So I don't bother using this option. When I was writing 'first', it meant that the first prog's category was 'Applications'. See attached config.js (taking the same stuff as example...). Now the thing is: with any other string -including "applications" (please note that this one is not capitalized)- it works flawlessly. No problem also if there is another prog before in another category. BTW, there's another strange error message if I ever try to edit this config inside WPI (try it yourself to see it). Not that I need it (choosing and installing progs work fine and I use another tool to edit config.js), but that may be the sign that I could improve my application for writing config.js. If ever you have any hint... config.js
  21. 2 small issues: 1- If the 1st category is called 'Applications', it isn't displayed, neither its content! 2- not exactly a bug as it is mentioned as 'option removed' in the changelog, but I'm a bit annoyed by the mandatory sorting of the elements of a category: - I have 2 items: Firefox Profile & Firefox Extensions. - Extensions are installed to the Profile. So the above order is the right one! - Still it is displayed in the reverse order (alphabetic). I know that it's not an issue for installation since I can falsify the sorting option for installing, but I'd like to have the display matching what will be done later (WYSIWYG).
  22. I don't know if detached programs is the best time to do this but in case you want to try, yes you can freeze setup at that point. You just need Process.exe from BeyondLogic (freeware). Attached is a stub of a batch for you to use it @T39. Save both in $OEM$ and have the batch called from DetachedProgram like this: DetachedProgram = cmd.exe Arguments = "/Q /C FOR /F %? IN ('FINDSTR/B dospath= %SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (SET %?\&& CALL START /MIN %dospath:\\=\%$OEM$\Detached.cmd" The piece of code in Arguments find the source location from which you are installing by looking for the dospath directive in \SYSTEM32\$WINNT$.INF. This works both with CD based install and winnt[32].exe based install. Detached.cmd
  23. I didn't know, but there's also an Yzöwl14001 Certification. This one must have an even more exclusive Almanach! Maybe you have to read it in the dark. Just as it burns... B)
  24. I got it! this first findstr is for preserving the blank lines, isn't it? Oh you gurus...
  25. Your cimmands may well be correct. I think that those problems should be fixed in the -soon to be released- next rc version.
×
×
  • Create New...