Jump to content

cancerface

Member
  • Posts

    135
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

Everything posted by cancerface

  1. The -t 60 switch instructs shutdown.exe to do a 60sec countdown before restarting the PC, so no worries, the rest of the script will be parsed. If you still don't like this just move the shutdown line at the end. The net user command deletes the aspnet account that was created when you installed the .Net framework if I am not mistaken ... You can remove it if you want and then check if the aspnet account is present in your system. If not, no need for that line ... CF
  2. Here is a cool trick using wmic.exe: The following code would give you the current entry (or entries?) in Boot.ini: %SystemRoot%\system32\wbem\wmic.exe ComputerSystem get SystemStartupOptions At work the above gives me: SystemStartupOptions {""Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn"} Now if I want to change it by adding the /kernel=OEMKrnl.exe option I would have to give: %SystemRoot%\system32\wbem\wmic.exe ComputerSystem Set SystemStartupOptions= '"Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn /kernel=OEMKrnl.exe' Note that I am using single quotes around the expression that I am supplying to wmic.exe ... I guess you would have to play around with this if you had multiple entries in your boot.ini file ... Hope this helps CF
  3. It should work for non-amin accounts. A google search would point you to this page where you can download it IF you have a valid license. CF
  4. CUSRMGR.EXE does the trick ... The options that you are looking for are CanNotChangePassword and PasswordNeverExpires so it would look like this: cusrmgr.exe -u Staff +x CanNotChangePassword +x PasswordNeverExpires cusrmgr.exe -u Student +x CanNotChangePassword +x PasswordNeverExpires CF
  5. In case you are still having problems with this one, there is a series of bootdisks that can be found in Bart Lagerweij's web-site which have been extensively tested and are quite modular. You may want to give a try to the network bootdisk as it is already optimized in terms of memory requirements and is easy to edit according to your needs. Hope this helps ... CF
  6. How about booting from A: with the same autoexec and see what file smartdrv is trying to write/access? Maybe include that file on the CD and then smartdrv will be happy ... CF
  7. Updated first post, adding an option to check/not check the user's input before execution (ie you can now leave the first three fields empty) CF
  8. @All Thanks for the feedback, I appreciate it @Mikka The purpose was to create a real account that would substitute the Administrator during the first login and this is why it is checking for all the fields being filled. However it is easy to get rid of this check and just look for a username/password ... @XPero I have seen you actually posting on the NSIS forum ... Good work on xpize by the way @Dels I have been using it with XP and I am pretty sure it should work in 2k and 2k3, although I have not tested it ... Not sure about 9x/ME though. At this stage it makes external calls to net.exe, compname.exe and cusrmgr.exe but I have not tested either of these in Win9x/ME ... I am working on a version that does not depend on any external utilities, as per RogueSpear's suggestion but I am stuck right now trying to make the created account not to expire. I'll post my work as soon as I figure this out CF
  9. @Gouki I have been using BartPe for quite some time as a rescue/deployment environment. If you don't have any size constrains for your build you may want to try BartPE with XPE ... Basically xpe makes it possible to use explorer as a shell + adds MMC, WMI, etc functionality. There is a simple how-to here and you can grab many plugins for BartPE here. If you want .NET support you can get a plugin from here. If you need more hardware support you can use the UBCD4WIN drivers for mass storage/network and/or a version of BTS's drivepacks. I hope that this is helpful ... At least it should minimize the "doing it yourself" part CF [Edit] Hmmm ... The links to the drivers seem to be down ... Try here instead ...
  10. Check the Sala source page ... There is a tool called "Win 2003 Optimize" which does what you're after. Note that you can also do this during an unattended install (check for the Unattended install guide on the above page) Hope this helps CF
  11. @jaclaz I have used the msdn page although you can get all the info from the cmd prompt ... wmic.exe /? CF
  12. @kelsenellenelvian Glad you like it The cancel button is easy to implement, although in my setup this is how I create an admin account so if I hit cancel then the default 'administrator' account will be the one active during the unattended install (a bit pointless). Also I didn't really see the point in having multiple accounts as this tool is always run at cmdlines and was needed in order to get an admin account that could potentially be different than the one hard-coded to the INI. My scenario was to have an already burned unattended XP DVD which I use for my desktop at home and my laptop at work. I use a different account for these machines due to restrictions on my work environment, but I wanted to have the ability to silently deploy all my apps and settings using the appropriate account ... I see however the point of having a tool that would allow the creation of multiple users in a batch mode giving at the same time control to the admin to change their names/properties ... In fact I was thinking of combining the oobeinfo way with my tool if possible so that a set of standard users can be created via oobeinfo, and then their info/usernames can be edited using my approach during the unattended setup. I will post my results as soon as I test this, although I am not sure if oobeinfo runs before the system goes into cmdlines ... The other option is to have a post-install GUI for creating multiple users. Maybe something like that already exists; I have not searched around to be honest. CF [Edit] Updated first post and uploaded a version with a cancel button
  13. Playing around with wmic.exe I saw that you can change some Boot.ini options. In order to get a 0sec delay you can try: %SystemRoot%\System32\Wbem\wmic.exe ComputerSystem Set SystemStartupDelay="0" Also it seems that you can set the boot parameters as well as the name that appears on the boot menu with: %SystemRoot%\System32\Wbem\wmic.exe Set SystemStartupOptions="<options>" This however is a bit more complicated so you might want to try on a working machine the next in order to get an idea of what the SystemStartupOptions might be: %SystemRoot%\System32\Wbem\wmic.exe Get SystemStartupOptions Note that the above were not tested upon building a machine ie I am not sure if wmic.exe is accesible via cmdlines ... CF
  14. I came across NSIS about a year ago and was impressed at the simple yet powerful code that you can generate. I have never been big into programming and I can only qualify as a noob in delphi, however I started moving all my batch scripts a while ago into NSIS. Like you said, you get an exe rather than a cmd file and you can in fact talk to the native windows API without use of external tools + as an open source tool it allows you to get answers to your questions in no time ... If only I had more time in my hands CF [Edit] I posted a small guide for an unattended firefox deployment that created a small banner showing information about the install process a while ago in this thread, based on an NSIS script ...
  15. @RogueSpear This is the evolution of a rather old and simple batch script into a simple exe. Unfortunately it is not in VB or C++ although I have been thinking for some time to move it to Delphi. It is a simple NSIS script. I have altered the header of the NSIS exe a bit to accommodate the changes needed in order to have a larger window etc. I could make calls directly to the windows API or even use tools that come with windows xp, like wmic for example, in order to avoid use of external utilities but this was never an issue since it does the simple job I wanted it to do. I would be interested to see what you have in mind though @ abadaba Can't you use the oobeinfo method to create the users, including an admin account then run this tool at cmdlines which will create another admin account and will set the autologon option? You can then delete the oobeinfo admin account from some batch script if you don't need it (not sure if you can use oobeinfo without creating an admin account ... Also I am not sure when oobeinfo creates the accounts) ... CF
  16. Nice layout on that one RogueSpear, I may have to redisign mine a bit Yes it is easy to add the computer name (see new attachment). Change the NewUser.ini to: [UserInfo] FirstName=<the user's first name> LastName=<the user's last name> Description=<user description> UserName=<the username> Password=<the password> Admin=1 UnlimitedPass=1 AutoLogon=1 TimeOut=120000 [ComputerInfo] CompName=DeployedPC CompDesc=Unattended Windows XP I am using a small tool called compname.exe to change the name and I assume that it will be located inside the System32 folder. Note that if the computer name is left blank then the program will skip setting it up. Let me know what you think CF [Edit] Moved the attachment to the first post
  17. Although there seem to be many methods for creating users during an unattended setup I was looking for some tool that would allow the possibility to interact with the user creation process during an unattended installation, especially after burning my source on a CD/DVD. The oobe method doesn't provide this option neither does a registry hack via some batch. Hence this little tool was created (see attached). How it works: Place the exe in the same folder with an INI file that you will create and should look like this: NewUser.ini [Interface] CheckValues=0 CancelButton=1 Confirm=1 PasswordCheck=1 MACAddressOveridesSections=1 ParseUserSection=1 ParseComputerSection=1 ParseSecuritySection=1 CheckIfUserExists=1 EnableTimeOut=1 TimeOut=120000 Beep=1 BeepWarning=1 BeepFreq=500 BeepDuration=100 [UserInfo] FirstName=John LastName=Doe Description=System Administrator UserName=jdoe Password=123 UnlimitedPass=1 AutoLogon=1 Admin=1 [ComputerInfo] CompName=DeployedPC CompWorkGroup=HomeNet CompDesc=Unattended Windows XP RegOwner=John Doe RegOrg=Some Company, Inc. [ComputerInfo_1] MAC=00-90-56-C0-DD-00 CompName=DeployedPCA CompWorkGroup=HomeNetA CompDesc=Unattended Windows XP (A) RegOwner=John Doe RegOrg=Some Company, Inc. ParseSecuritySection=1 FirstName=Jack LastName=Doe Description=System Administrator (A) UserName=jdoe Password=567 UnlimitedPass=1 AutoLogon=1 Admin=1 FakeAdmin=1 FakeGuest=1 RenameAdmin=1 RenameGuest=1 DisableAdmin=1 ForcedLogon=1 NewAdminName=rootA NewGuestName=NewGuestA HideNewAdmin=1 ... [ComputerInfo_n] MAC=00-44-45-AB-D0-08 CompName=DeployedPCB CompWorkGroup=HomeNetB CompDesc=Unattended Windows XP (B) RegOwner=John Doe RegOrg=Yet Another Company, Inc. ParseSecuritySection=0 FirstName=Jim LastName=Doe Description=System Administrator (B) UserName=jimdoe Password=567891 UnlimitedPass=1 AutoLogon=1 Admin=1 FakeAdmin= FakeGuest= RenameAdmin= RenameGuest= DisableAdmin= ForcedLogon= NewAdminName= NewGuestName= HideNewAdmin= [SecurityInfo] FakeAdmin=1 FakeGuest=1 RenameAdmin=1 RenameGuest=1 NewAdminName=root NewGuestName=NewGuest DisableAdmin=1 ForcedLogon=0 HideNewAdmin=1 The [interface] Section contains entries that can be either 1 or 0. CheckValues forces the program to check if the user has filled all fields. CancelButton displays or hides the cancel button. Confirm invokes a dialog asking if you really want to proceed with the user creation process (...) PasswordCheck will disable password checking and will force an empty password (new!) MACAddressOveridesSections will override all the [userIfo] and [securityInfo] values and will force reading them directly from an appropriate [ComputerInfo_n] section ParseUserSection if set to 0 the user-creation part will not get processed ParseComputerSection if set to 0 the computer-renaming part will not get processed ParseSecuritySection if set to 0 the security section will not be processed CheckIfUserExists if set to 1 will force a check for the username in the local user database EnableTimeOut if set to 0 will disable the timeout and the next parameter (TimeOut) will be ignored TimeOut is the time that you want the program to wait before adding the user. Note that this value is in milliseconds. Beep if set to 1 it enables a sound from the PC speaker when the progress bar is changing BeepWarning if set to 1 will only allow the sound when the bar is at 50% or less of the TimeOut value BeepFreq sets the frequency of the sound (50 - 5000) BeepDuration sets the duration in ms of the sound (50 - 1000) The first five values of the [userInfo] section are self explanatory. Admin can be either 1 or 0. In the first case the created user will be added to the admin group. If the value is 0 then the user will be added to the users group. UnlimitedPass can be either 1 or 0. In the first case the password will be set not to expire. AutoLogon can also be 1 or 0. If it is set to 1 then the user will be automatically logged to the system. The [ComputerInfo] section controls five parameters: CompName and CompDesc and can be used to setup the computer's name and description CompWorkGroup is used to set the name of the workgroup for the PC and join it. RegOwner is used to set the registered owner of the local PC RegOrg is used to set the registered organization of the local PC Additionally, the program looks for n [ComputerInfo_n] sections which contain similar information to the [ComputerInfo] section but they are tied to specific MAC addresses. A [ComputerInfo_n] section contains, in addition to the above, a parameter called MAC which is used to identify the physical address of a network controller. If upon execution the MAC address of an ethernet controller matches the value of the MAC parameter in a [ComputerInfo_n] section then all the computer parameters (Name, Workgroup etc) will be read from that section. As of v.1.8 if the MACAddressOveridesSections flag is active in the [interface] section then the following values can also be parsed from the [ComputerInfo_n] section that contains a matching MAC address: ParseSecuritySection FirstName LastName Description UserName Password UnlimitedPass AutoLogon Admin FakeAdmin FakeGuest RenameAdmin RenameGuest DisableAdmin ForcedLogon NewAdminName NewGuestName HideNewAdmin These values will now override the ones in [userInfo] and [securityInfo] sections! If however there is no match of the MAC values from each section to the MAC address of an ethernet controller on the target PC then the values from the initial [ComputerInfo] [userInfo] and [securityInfo] section will be used instead. The [securityInfo] section controls the following parameters: FakeAdmin if set to 1 the tool will create an account called 'Administrator' (or whatever the name in your localized version of windows) which will be set with a loooong MD5 password and will be locked and inactive. FakeGuest if set to 1 the tool will generate a Fake Guest account similar to the Administrator account described above RenameAdmin if set to 1 the tool will attempt to rename the default Administrator account RenameGuest same as above, if set to 1 the tool will rename the Guest account NewAdminName if you chose to rename the administrator account this field holds the new name NewGuestName if you chose to rename the guest account this field holds the new name DisableAdmin if set to 1 then the administrator (or the renamed administrator) account will be disabled ForcedLogon if set to 1 will cause windows to automatically login the default user upon logoff HideNewAdmin [Windows XP] if set to 1 this will hide the renamed administrator account from the list of users that can log on the PC As of v1.0 setting any of the Parse[]Section parameters to 0 will result in inactivating the relevant section on the GUI. For example ParseUserSection=0 and ParseComputerSection=0 will look like this: Call the exe from a script so that the new user will be created. I am running it from cmdlines using the following batch file: user.bat @ECHO OFF CMDOW @ /HID TITLE Creating Windows XP Users %SystemDrive% CD %SystemRoot%Scriptsusers START /WAIT %SystemRoot%ScriptsCreateUser.exe In the above example both files (the EXE and the INI) are in $OEM$$Scripts inside my unattended CD/DVD. The INI contains my default information for the account to be created with a non-secure password (123 or something) which will be used only for the unattended setup and should be changed after that ... In order to read the necessary values from another ini file the tool can be started using: CreateUser.exe /INI="<full path to INI file><inifile.ini>" Once the program is executed it will wait for the TimeOut period and then it will parse all the enabled sections UNLESS you click on the GUI, which allows for changes of all the information needed for the process. Finally I should mention that it is working in my hands in Windows XP but I would consider it as a beta and would appreciate any feedback B) CF ChangeLog v.1.8.5 Added Dutch GUI Support Fixed French GUI Download program: NewUser.7z Update Pack Addon (compatible with nLite/Integrator, compiled and maintained by Aserone) Thanks Aserone GUI Translations Turkish (by KenanBalamir) Greek French (by kSaMi and Ponch) Spanish (by iperoni) Russian (by Ulrih) Dutch (by pietpuk) Since I am not able to translate the messages that pop-up in every language, I am attaching here the English strings used by the program so that any interested parties can translate in their own language and re-attach the new files on this thread. The attached 7z archive contains two files, an INI with the interface strings and a TXT with the pop-up messages. Try to keep the messages as concise as possible, especially the ones in the INI file as their size will affect the layout of the GUI. It is important that you save the files as ANSI rather than Unicode, since the NSIS compiler used to make the program will not be able to read the translated characters! It would also be very helpful if people could provide the ANSI page code of the file with their strings. You can find a list of those codes here Download language strings: Lang_Strings.7z(Only if you wish to translate the GUI to your language and contribute to this thread!) ToDo - Add support for CryptProtectData functionality - Add multi-lingual interface/messages
  18. Nice one RogueSpear I think your VB script for checking the Bios for VMware strings is faster than the wmic implementation that I was using Well just for the record, in a batch script this one also works for me (after declaring %cdrom% somewhere): FOR /F "tokens=1 delims=-" %%i IN ('%SystemRoot%\System32\Wbem\wmic.exe BIOS GET SerialNumber ^| FINDSTR /c:"VMware"') DO (IF "%%i" == "VMware" start /wait %cdrom%\oem\VMwareTools.exe) CF
  19. @MOONLIGHT SONATA Sorry for the laaaaaate response but I did not keep up with this thread Anyway, you didn't find anything wrong with the script I posted, but looking at the code just now I reallized that copy/paste in fact altered it a bit: It should read: IF NOT EXIST %SystemDrive%\BOOT.INI (ECHO Restoring original BOOT.INI© %SystemDrive%\BOOT.OLD %SystemDrive%\BOOT.INI) yet if the above is entered within CODE tags it gives: IF NOT EXIST %SystemDrive%\BOOT.INI (ECHO Restoring original BOOT.INI&COPY %SystemDrive%\BOOT.OLD %SystemDrive%\BOOT.INI) ... I just spotted the difference the &COPY becomes a copywrite sign © I can confirm that the script works if run from cmdlines, although I run it right after I install recovery console (from cmdlines) ... Not sure if this changes things for you CF @jaclaz You're right, the script I posted is unreasonably complicated I think I picked it up from some site looooong time ago... [Edit] The script came from Rob van der Woude's site and can be found here. There is also another version that may be of use to MOONLIGHT_SONATA here.
  20. Hi, I am not 100% sure about this, but I think that you need the following in your winnt.sif (or unattended.txt) [Networking] InstallDefaultComponents=No [NetProtocols] MS_TCPIP=params.MS_TCPIP Might be wrong though... Can't seem to fine the 'InstallDefaultComponents=No' in ref.chm so it may have been a relic from NT or 2000 in my winnt.sif CF
  21. For #5 you mean that this post didn't help you? CF
  22. A not so elegant solution to #3 is this one: DisableSRonALLDrives.vbs Dim SRP, eSRP Set SRP = GetObject("winmgmts:\\.\root\default:SystemRestore") eSRP = SRP.disable("D:\") eSRP = SRP.disable("E:\") eSRP = SRP.disable("F:\") eSRP = SRP.disable("G:\") eSRP = SRP.disable("H:\") eSRP = SRP.disable("I:\") eSRP = SRP.disable("J:\") eSRP = SRP.disable("K:\") eSRP = SRP.disable("L:\") eSRP = SRP.disable("M:\") eSRP = SRP.disable("N:\") eSRP = SRP.disable("O:\") eSRP = SRP.disable("P:\") eSRP = SRP.disable("Q:\") eSRP = SRP.disable("R:\") eSRP = SRP.disable("S:\") eSRP = SRP.disable("T:\") eSRP = SRP.disable("U:\") eSRP = SRP.disable("V:\") eSRP = SRP.disable("W:\") eSRP = SRP.disable("X:\") eSRP = SRP.disable("Y:\") eSRP = SRP.disable("Z:\") EnableSRonC.vbs Dim SRP, eSRP Set SRP = GetObject("winmgmts:\\.\root\default:SystemRestore") eSRP = SRP.enable("C:\") CF
  23. For #1 you can use microsoft's pagefileconfig.vbs (found in %SystemRoot%\System32) First I delete my swap file ECHO y | cscript //nologo //T:600 %systemroot%\system32\pagefileconfig.vbs /delete /VO C: and then I create the new file ECHO y | cscript //nologo //T:600 %systemroot%\system32\pagefileconfig.vbs /create /I 1024 /M 1024 /VO C: CF [Edit] You can also define any values for min/max size with this way ... ECHO y | cscript //nologo //T:600 %systemroot%\system32\pagefileconfig.vbs /create /I <your_min_value> /M <your_max_value> /VO C:
  24. I am not sure if you will get the effect that you want by removing the onboard hdds, install windows on the scsi then reconnect the onboard array ... It will still pick up the onboard controller's hdd as the first drive. There must be some bios switch (on the m/B) that will allow an external device to gain priority at boot time. So let me start this one over ... 1) Your scsi raid is recognized through adaptec's bios and each drive has a unique scsi ID 2) For channel A of your scsi, the first member of the array has been assigned scsi ID 0 3) When you enter the SCSISelect utility you have selected the correct controller as master/boot AND you have the boot scsi ID as 0 4) There is no option in your m/b's bios that will allow you to change the boot order, or some switch that will allow you to boot from external scsi device 5) When you boot with a CD (say, to start the windows installation) the scsi raid partition (on channel A) does not get assigned as 'C' Correct? Can you provide some more info on the m/b itself? What brand/model? ... [Edit] If it is award bios 6 it should be able to boot from scsi according to this document CF
  25. @mrguitarmann Oups, my bad, I meant to write the actual printer's name and not its model Oh well ... as long as it works no harm done CF
×
×
  • Create New...