Jump to content


Lucid

Moderators
  • Posts

    263
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Lucid

  1. You're using a UNC path to copy from, so are you running this with user rights? Otherwise it's only running as the local SYSTEM account, which wouldn't have rights to your network location. And if you ARE running it with user rights, then they'd have to have permissions such that they could kill the running process and delete the file...

  2. If you want more help with this, you'll need to give us a little more info as to where it's erroring out, what error messages are reported, and what you're deploying it to. Otherwise try booting up and press the F8 key. If you've got Command Support enabled in your boot image you can view any log files that may be on the machine...

  3. So if SCCM hasn't discovered the AD object yet, and so it doesn't know what domain groups it's a member of, then how would SCCM know what software the physical client machine would get? If you want to do it all via scripts, then you might have better luck pre-creating the resource object in the SCCM database and making it a direct member of the desired collections. Then at the end of your TS you could have it remove those direct memberships. Like I said before, I think you're taking the harder route to get this done...

  4. One quick tidbit... To quickly test HTAs... Boot up WinPE on a PC, and then map a network drive to a folder containing your code. You make edits on your normal machine and then just fire them off via Command Line under WinPE. No need to update images and build new boot media or anything.

     

    What do you mean when you say select its location?

     

    We've got a fairly complex HTA in our environment (which needs cleaned up, but that's another story), so here are some randomish chunks of code that might help you get where you're going. If you have questions, let me know and I (and others of course) can try to help when I have a little more time...

     

     

    ' ~$~----------------------------------------~$~

    Sub BindToActiveDirectory

    'Attemping to connect to the AD environment using LDAP with alternate credentials

    ReadRegistryForAD

    'Editing the HKCU 1406 registry keys to avoid any ADO Security Warning message windows

    objWshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0\1406", 0, "REG_DWORD"

    objWshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\1406", 0, "REG_DWORD"

    objWshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1406", 0, "REG_DWORD"

    objWshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1406", 0, "REG_DWORD"

    Log ("Attemping to bind to Active Directory using LDAP with alternate credentials")

    Set objNS = GetObject("LDAP:")

    'Attempting to obtain the LDAP information")

    Set objRootDSE = objNS.OpenDSObject("LDAP://" & strDomainControllerFQDN & "/RootDSE", strAccountUserName, strAccountPassword, ADS_SERVER_BIND Or ADS_SECURE_AUTHENTICATION)

    strDNSDomain = objRootDSE.Get("defaultNamingContext")

    'Attempting to use ADO to search Active Directory

    Set adoCommand = CreateObject("ADODB.Command")

    Set adoConnection = CreateObject("ADODB.Connection")

    adoConnection.Provider = "ADsDSOObject"

    adoConnection.Properties("User ID") = strAccountUserName

    adoConnection.Properties("Password") = strAccountPassword

    adoConnection.Properties("Encrypt Password") = True

    adoConnection.Properties("ADSI Flag") = ADS_SERVER_BIND Or ADS_SECURE_AUTHENTICATION

    adoConnection.Open "Active Directory Provider"

    'Replacing the original HKCU 1406 registry key information

    If Not strRegistryKey0 = "" Then

    objWshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\1406", strRegistryKey0, "REG_DWORD"

    End If

    If Not strRegistryKey1 = "" Then

    objWshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\1406", strRegistryKey1, "REG_DWORD"

    End If

    If Not strRegistryKey2 = "" Then

    objWshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\1406", strRegistryKey2, "REG_DWORD"

    End If

    If Not strRegistryKey3 = "" Then

    objWshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\1406", strRegistryKey3, "REG_DWORD"

    End If

    adoCommand.ActiveConnection = adoConnection

    adoCommand.Properties("Page Size") = 100

    adoCommand.Properties("Timeout") = 30

    adoCommand.Properties("Cache Results") = False

    'Opened an ADO connection to the Active Directory Provider

    End Sub

     

    ' ~$~----------------------------------------~$~

    Sub ReadRegistryForAD

    On Error Resume Next

    strRegistryKey0 = ""

    strRegistryKey1 = ""

    strRegistryKey2 = ""

    strRegistryKey3 = ""

    'Backing up the registry keys for HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\x\1406

    strRegistryKey0 = objWshShell.RegRead ("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0\1406")

    strRegistryKey1 = objWshShell.RegRead ("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\1406")

    strRegistryKey2 = objWshShell.RegRead ("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1406")

    strRegistryKey3 = objWshShell.RegRead ("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1406")

    End Sub

     

     

     

     

    ' ~$~----------------------------------------~$~

    Function CreateNewComputerObject

    Dim objContainer, objComputer

    On Error Resume Next

    'Obtaining the AD OU object information for the OU

    Set objContainer = objNS.OpenDSObject("LDAP://" & strDomainControllerFQDN & "/" & strOU, strAccountUserName, strAccountPassword, ADS_SERVER_BIND Or ADS_SECURE_AUTHENTICATION)

    'Setting the AD computer account object information

    set objComputer = objContainer.Create("Computer", "cn=" & strComputer)

    objComputer.Put "sAMAccountName", strComputer & "$"

    objComputer.Put "userAccountControl", ADS_UF_PASSWD_NOTREQD Or ADS_UF_WORKSTATION_TRUST_ACCOUNT

    objComputer.SetInfo

    ' Will error here if the computer account object already exists

    If Err then

    Err.Clear

    CreateNewComputerObject = 1

    Else

    CreateNewComputerObject = 0

    End If

    End Function

     

     

     

    ' ~$~----------------------------------------~$~

    Function MoveADComputerObject

    Dim objContainer, objConn

    On Error Resume Next

    'Obtaining the AD OU object information for the OU

    Set objContainer = objNS.OpenDSObject("LDAP://" & strDomainControllerFQDN & "/" & strOU, strAccountUserName, strAccountPassword, ADS_SERVER_BIND Or ADS_SECURE_AUTHENTICATION)

    'Moving the " & strComputerDistinguishedName & " computer account object

    objContainer.MoveHere "LDAP://" & strComputerDistinguishedName, vbNullString

    If Err then

    Err.Clear

    MoveADComputerObject = 1

    Else

    MoveADComputerObject = 0

    End If

    End Function

  5. Have you thought about easier alternatives? Maybe take a look at Jason Sandy's OSD AppTree utility. Either that, or have a script kick off at the beginning of the task sequence to allow you to query AD directly and set task sequence variables. Then later in the TS process, applicationX would only install if variable1 was set to "YES" (or something like that).

     

    You say that you want the software installed during the OS task sequence, but then you say that discovery only runs once late at night. So you pre-create the AD account, wait over 24 hours, and then image it?

  6. I'll try to take a stab at this (hopefully someone else chimes in)...

     

    You say that one workstation works, but the other doesn't? Is that correct? If so, is the BIOS up to date on the one that's not working (I've seen some odd things get fixed by updating the BIOS)? And have you checked the hard disk for errors? If the physical machine is fine, are you imaging them the exact same way? You could try deleting the AD and SCCM objects for both and imaging them again - that way you know your processes are working to create new objects.

     

    And do you get an error message returned to SCCM? Listed in the advertisement status for the task sequence's advertisement?

  7. Within the task sequence that you're using to deploy the OS to a machine (you can also use it in a Build and Capture task sequence too), there's a spot where you can supply the unattend.XML file you want to use. So you first create your .XML file (keeping in mind that not all the settings will work, so start with the bare minimum and add entries one by one). Once you have your file, put it in a folder, and then create an SCCM Package out of the folder. That way you can use it in your OS task sequence.

     

    You can find a started .XML file towards the bottom of this page: http://myitforum.com/cs2/blogs/rbennett806/pages/using-sccm-to-capture-and-deploy-windows-7.aspx

     

    Basically, I'd only use them in the task sequences and not anywhere else - to avoid confusion...

  8. We don't do a whole lot with "push" technology where I'm at - being more of a "pull" environment, but if you're talking about a manual, one-off method, have you checked out some of the right-click tools available from the web? You should be able to right-click on a client within the console and tell it to rerun an advertisement.

     

    Otherwise, you could certainly create a second collection and use a membership query to populate it based on failure of a specific advertisement. I don't have a query on hand for this, but I'm sure you could find one on the web if this is the route you wanted to take.

     

    The other option is to just sit back and let the scheduled advertisement kick in and re-install it for you according to your schedule. Of course, Office is more of a "must-have" app, and I wouldn't want to wait that long; so if it was me, I'd resort to one of the above to quickly take care of the problem.

     

    On a side note, you might also see if you put a time limit on the Package's Program - so that after X amount of time SCCM determines that it failed...

  9. So what happens if you have the source files sitting locally on the machine? Can you use the shortcut idea to install it from there? Basically determine if it's a problem with the command, or a problem with the files being out on the network.

     

    I'll be honest, maybe my brain is worn out, but I'm not really understanding what it is you're doing. You're copying down a shortcut, and then trying to run the shortcut from your batch file? I think that if you're doing it via a script, you should be able to ditch the shortcut itself all together and just run the command. I'd assume the shortcut is for a person to trigger the install manually...

  10. My suggestion would be to try to capture an image without worrying about SP1 and the updates. Disable those sections for the time being. This way you can test to make sure that the task sequence and your environment are set up and working properly. Once you get a successful capture you can then work on getting SP1 and all the updates added.

     

    My second suggestion would be to check the "Setup windows and ConfigMgr" section of your task sequence. Is it using the right package? Do you have all the needed installation Properties included? Here's a sample of what we use:

     

    SMSMP=OurServer.mycompany.com FSP=OurServer2.mycompany.com CCMHOSTNAME=OurServer.mycompany.com SMSCACHESIZE=10000 PATCH="%_SMSTSMDataPath%\OSD\xxxxxxxx\i386\hotfix\KB977384\sccm2007ac-sp2-kb977384-x86-enu.msp"

  11. Yeah, this can easily be done if you know any scripting languages. You can write a batch file or a VBScript or something to do everything you just listed. Once you have the script working, just put it in a folder, make an SCCM package out of it, and set up your script to be ran from the Program in the package. Then just run that at the tail end of your OS deployment TS.

     

    Since it's just a few posts down from this one, take a peek at the bottom of this post for an example: http://www.windows-noob.com/forums/index.php?/topic/3379-configure-default-user-profile-while-deploying-windows-7/

  12. I think you need to verify what they used to generate the .WIM file from so you know what you're dealing with. Especially verifying that they didn't use Norton products to generate the image (if they did, then they still need to pay for client licensing). And what did you do to get to the part shown in the screenshot?

     

    And on a side note, you might look at using a single image, and then during OSD process, have it install the desired applications for a particular group. You can use something like Jason Sandy's OSD AppTree for a quick GUI interface...

  13. What report are you checking? If you look in the System Status | Advertisement Status, what's listed for that computer? If you're advertising it to existing clients, did you check the Properties | Advanced tab of the task sequence to make sure it can run on the client platform it's advertised to?

  14. You mean the ".theme" files? It's been awhile, but if I remember right, in your TS, you just need to copy your theme file to "C:\Users\Default\AppData\Local\Microsoft\Windows\Themes\oem.theme", making sure it's named "oem.theme". I think that's all you need to do...

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.