Jump to content

pauledavey

Member
  • Posts

    106
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

Posts posted by pauledavey

  1. Here is some code that will work for you:

    strComputer = "."

    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

    Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")

    For each elem in colItems

    If instr(elem.CSDVersion, "2") Then

    msgbox "Found Service Pack2"

    ' Place your code here

    Else

    If instr(elem.CSDVersion, "3") Then

    msgbox "Found Service Pack3"

    ' Place your code here

    End If

    End If

    Next

  2. Hey Andy,

    I have WDS set up (having had it installed when SP2 was installed on my server) on a File and Print server. You do not have to enable any options in DHCP for PXE like you did in RIS for WDS. Just ensure that in the WDS MMC snappin, you have authorised the WDS box with the DHCP server, remove the PXE options etc from your DHCP server scope, and you should find that it all works ok.

    Hope this helps.

  3. getchassis.vbs

    strComputer = "."

    Set objWMIService = GetObject("winmgmts:" _

    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colChassis = objWMIService.ExecQuery _

    ("Select * from Win32_SystemEnclosure")

    For Each objChassis in colChassis

    strType = objChassis.ChassisTypes(i)

    Next

    If strType = "5" Then

    ' Pizza box type, so run pizza type chassis commands here via more vbscript code

    End If

  4. yep - you can do this using a simple WMI query once the windows shell has loaded.

    Sample vb script:

    strComputer = "."

    Set objWMIService = GetObject("winmgmts:" _

    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colChassis = objWMIService.ExecQuery _

    ("Select * from Win32_SystemEnclosure")

    For Each objChassis in colChassis

    For i = Lbound(objChassis.ChassisTypes) to Ubound(objChassis.ChassisTypes)

    Wscript.Echo objChassis.ChassisTypes(i)

    Next

    Next

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

    ChassisTypes

    Data type: uint16 array

    Access type: Read-only

    Array of chassis types. This property is inherited from CIM_Chassis.

    Value Meaning

    1 Other

    2 Unknown

    3 Desktop

    4 Low Profile Desktop

    5 Pizza Box

    6 Mini Tower

    7 Tower

    8 Portable

    9 Laptop

    10 Notebook

    11 Hand Held

    12 Docking Station

    13 All in One

    14 Sub Notebook

    15 Space-Saving

    16 Lunch Box

    17 Main System Chassis

    18 Expansion Chassis

    19 SubChassis

    20 Bus Expansion Chassis

    21 Peripheral Chassis

    22 Storage Chassis

    23 Rack Mount Chassis

    24 Sealed-Case PC

  5. you can, but that isn't what I wanted as stated in the original question. However, I am happy now, as I have it wokring as below

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    ' WinPE | Windows XP '

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    Both boot completely indepently without a bootloader and are invisible to each other.

    Paul

  6. got this working with the WinPE files and the WinXP files on completely seperate partitions. Used a Powerquest\symantec tool which can switch the partitions over on the fly and reboot the machine, whilst I hide the other partition.

    Works ab fab

    :-)

    Paul

  7. I cannot see any solution to what I have asked on those threads..

    I want to have three partitions on the disk.

    Partition one:- Windows PE and Windows PE Boot files **(hidden)**

    Partiiton two:- Windows XP SP2 and bootfiles

    Partition one is hidden from Windows XP. The windows xp and windows PE BOOT files are on seperate partitions. I want to swap the partitions over in windows using a script of sorts, so that the machine reboots in to Windows PE.

    Now, all the solutions I have seen so far require the windows pe bootfiles and windows xp bootfiles to be on the same partition. I cannot have this in this case.

    Has anyone any epxerience with virtual floppys or virtual partitions (powerquest and ghost)? Has anyone managed to put the windows pe bootfiles in to one of these virtual files? That was one solution I was looking at, but have come to a dead end so far.

    Paul

  8. Question: Has anyone here ever loaded Winpe on to a hard drive partition, booted in to the Winpe environment (loading the Winpe environment in to memory) and then tried to delete or reimage that partition?

    Thought I would ask the question before trying it in case any of you have already done this and know that it works, or rather doesn't.

    In theory I can't see any reason why it wouldn't.. You can load Winpe from a CD in to memory and swap CD's without crashing the WinPE environment, so why not on a hard disk?

    Any thoughts on this, really appreciated!

    Thanks!

    :D

  9. OK. I have tried many different ways to do this an have yet to find out how to get it to work.

    This is the scenario:

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

    ' ' '

    ' Rebuild Partition ' Windows XP SP2 '

    ' (hidden primary) ' (Primary) '

    -----------------------------------------------------------------------------------'

    As you can see the hard disk has two partitions. The first partition 'rebuild' is hidden and therefore not visible in windows (hidden in Windows PE1.5 with Powerquest tools. The second partition is C: and has a full standard installation of Windows XP SP2 on it.

    The problem is as follows:

    The first partition MUST remain hidden to Windows, not just the user

    The partition layout MUST stay this way round for various reasons.

    I need to install Windows PE on to the 1st (hidden) partition. What I want to do is to unhide the 1st partition and make it active in Windows (I can do this with the powerquest tools) and then reboot the machine. The machine then reboots in to Windows PE installed on the hidden partition (which no in effect has become C:)

    I need to do this without hacking files etc as this is to be used in a corporate environment, so everything must be 100% legit.

    Has anyone ever managed to do this? When I have tried I have found that WIndows PE and WIndows XP on the same partition work fine, but putting Windows PE the 1st partition results in it not booting.

    If anyone knows how to do this or knows if this cannot be done, please can you let me know?

    Many thanks in advance.

    Paul

    :-)

  10. I have a very strange problem going on with sysprep on windows xp sp2 clients. Basically I am creating my build using standard unattended processes. Then I am running sysprep.exe –mini –reseal , using a standard sysprep.inf file in the c:\sysprep folder.

    The file is processed etc all ok. However when I actually run sysprep as above, it takes between 35 – 50 minutes before the machine logs out of windows and shuts down. This is happening on lots of different kit (old and new HP notebooks and desktops).

    Do you have any ideas? The sysprep.inf contents are as below. The version information of sysprep.exe that I am using is also below. If you can help I would really appreciate it as I am having a very hard time over this. Many thanks in advance.

    Sysprep.Exe

    File Version and Product Version - 5.1.2600.2180

    Size – 86.5KB

    Sysprep.Inf File Contents

    ;SetupMgrTag

    ; Atkins Windows XP SP2 Combined Sysprep.inf

    [unattended]

    KeepPageFile = 0

    UnattendMode=FullUnattended

    OemSkipEula=Yes

    OemPreinstall=Yes

    OemPnPDriversPath = "PnP\nVidia;PnP\Matrox;PnP\IntelVid;PnP\Bcom;PnP\Aud"

    DriverSigningPolicy=Warn

    [GuiUnattended]

    AdminPassword=banana

    EncryptedAdminPassword=NO

    AutoLogon=Yes

    AutoLogonCount=2

    OEMSkipRegional=1

    TimeZone=85

    OemSkipWelcome=1

    OEMDuplicatorString = "Winxp Global Build”

    [userData]

    ProductKey=xxxx-xxxxx-xxxxx-xxxxx-xxxxx

    FullName="GRIS"

    OrgName="GLOBAL"

    ComputerName=*

    [GuiRunOnce]

    Command0 = "c:\winnt\Atkins\bldRun1.wsf"

    [Display]

    Xresolution=1024

    YResolution=768

    [RegionalSettings]

    LanguageGroup=1,9,10,13

    SystemLocale=00000809

    UserLocale=00000809

    UserLocale_DefaultUser=00000809

    InputLocale=0809:00000809

    InputLocale_DefaultUser=0809:00000809

    [identification]

    JoinWorkgroup=Atkins

    [Networking]

    InstallDefaultComponents=No

    [NetAdapters]

    Adapter1=params.Adapter1

    [params.Adapter1]

    INFID=*

    [NetClients]

    MS_MSClient=params.MS_MSClient

    [NetServices]

    MS_SERVER=params.MS_SERVER

    [NetProtocols]

    MS_TCPIP=params.MS_TCPIP

    [params.MS_TCPIP]

    DNS=Yes

    UseDomainNameDevolution=No

    EnableLMHosts=Yes

    AdapterSections=params.MS_TCPIP.Adapter1

    [params.MS_TCPIP.Adapter1]

    SpecificTo=Adapter1

    DHCP=Yes

    WINS=No

    NetBIOSOptions=0

  11. OK, one further question on PE.

    I want to have setres.exe run with the following syntax:

    x:\tools\setres\setres.exe h800 w600 b24

    Then I want the following command run:

    X:\HTA_Page\Index.hta

    I put them in the winbom.ini section but it doesn't work. Can any of you guys show me how you have run apps etc on startup. I do not want to have to copy the files somewhere just have them run as shown above.

    Many thanks in advance

    Paul

    :D

×
×
  • Create New...