We recently took the k2000 upgrade to 3.6 and one of the things that broke is the number of autologins supplied from the answer file on the WIM image.

It used to autologin once and it was enough to install the post install tasks we had and then the staff member would be able to manually put it on the domain. (This was our first Kace image and hadn’t played around with it much to this point.)

Now it will autologin, run some tasks through the "Task Engine" and when it gets to the task "Run DpInst" it will automatically restart, requiring us to login with the local admin account that was created in the answer file. It then logs in and runs our postinstallation tasks and restarts again. Here we are required to login again to add the computer to our domain.

So as it is currently, we are required to login two additional times in comparison to our previous setup.

Is there anything we can do to prevent this without rebuilding our image? Such as creating a postinstallation task that will increase the number of autologins from 1 to 3?

(We are going to be rebuilding our Image, but it would be nice to not have these couple steps added in the meantime. Also, the "Task Engine" is amazing, and we are now going to be able to do so much more with Kace, taking our partially automated process to an almost completely automated process.)

Answer Summary:
Create a vb script and run it as a mid level task fixlogin.vbs: Const ForReading = 1 Const ForWriting = 2 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("c:\windows\panther\unattend.xml", ForReading) strText = objFile.ReadAll objFile.Close strNewText = Replace(strText, "LogonCount>1", "LogonCount>3") Set objFile = objFSO.OpenTextFile("c:\windows\panther\unattend.xml", ForWriting) objFile.WriteLine strNewText objFile.Close
Cancel
1 Comment   [ + ] Show Comment

Comments

  • Yeah - since upgrading to 3.6 we've needed to add an autologon for the "Set Engine Run Key" post-install task and if the driver feed is enabled...
Please log in to comment

Community Chosen Answer

1

Thought of a much easier way to do this.  Create a vb script and run it as a mid level task

fixlogin.vbs:

Const ForReading = 1
Const ForWriting = 2

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("c:\windows\panther\unattend.xml", ForReading)

strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "LogonCount>1</LogonCount",

"LogonCount>3</LogonCount")

Set objFile = objFSO.OpenTextFile("c:\windows\panther\unattend.xml", ForWriting)
objFile.WriteLine strNewText
objFile.Close

Answered 04/29/2014 by: SMal.tmcc
Red Belt

  • run this as the 1st mid level task
    • This seems like a much easier, and nicer way to do this! I had the xcopy method working, but Ill have to try it out next time I am in my Kacebox.
      • that way if you are like me and have variations in the answer files you do not have to worry about placing the wrong file in the image
Please log in to comment

Answers

0

Ok to make it part of the kbox.

You will need xml file(s) and need to create a vbs script and a batch file.  You do not need the exe's since they are part of the WinPE boot env.

The VBS script is to call the batch file:

create a batch file to do the work you want.  I am also making changes to the offline registry in the images.  You only need the xcopy line.

Create a zip file with the vbs script, batch files and xml file in it.

Then create a mid level task and run it as the first task after deployment. As an example; the apply computer name task modify's the xml files so you want to replace them before any other mid/post tasks run.

Answered 04/28/2014 by: SMal.tmcc
Red Belt

Please log in to comment
0

I had to add 2 auto logins to the answer file.  I have 40-50 existing wims I store and deploy from a external sources.  I have 3 different styles of answer files in all these images so my fix was pretty easy.  I mounted one of each type of images with the variation of ans files. I had to harvest acad32bit, admin32bit and admin64bit ans files.  To do this you need a tech station with imagex to mount and harverst the files from the wims.

I then edited the files with notepad and changed the  <LogonCount>1</LogonCount> to 2 and saved the files.  I placed these answer files in subdirs under my images$ shares on the windows servers.  I map T: shares to the windows servers as part of my KBE's, so that is why you see me calling from the T drive.

You should be able to do the same thing to wim images stored on kace vs a windows share.

 

Answered 04/25/2014 by: SMal.tmcc
Red Belt

  • Ok, I believe I have followed most of what you said. I have the unattend.xml file available, so I don't have to mount it to extract it.

    With that being said, where do I put the unattend.xml file? Our Kace box is pretty much the standard box you would get from Dell, so we are not setting up any drives that the Kace box references. So I guess what I am asking is, where is the standard location for files that the mid-level task would have access to? and how do I get to it? (I go to \\kacek2000 to get to the Drivers) Also, why are you copying over 2 .xml files?
    • I could not find anything easily on the web for how to do this.

      So here is what I did, I took the unattend.xml file along with C:\Windows\System32\xcopy.exe file and put them into a .zip. I loaded the .zip into an application K2000 Boot Environment (Windows) postinstallation task with the command:

      xcopy.exe unattend.xml c:\windows\panther /q /y

      And it worked!

      I would still like to know where I could store this on the Kace box so I could run this as a .bat instead of an application in the future.
      • I am working on making it call the bat via a mid level vbs, will post the results when I am finished
    • I replace both to keep it consistent. If for some reason I need to have a tech re-sysprep a machine in the field to recapture I know that file they call with the sysprep batch file is correct.
      • I have tried the method as described by SMal and ISEKOLD but the unattend.xml in the image does not get overwritten by my new edited xml. I have this as the first mid-level task but the machine does not autologon. I manually logon and check the xml and it is still the original one we used when we sysprepped (I leave it there for now to check it). Not sure what is wrong.
        This may be a silly question but at the stage of first mid-level task is the working drive referred to as C:Drive as it has not installed Windows at that time? I am I correct or way off base?
        Any help?
      • Do you have only one partition?

        The best test if you are not sure what is up with the drives. Temporarily remove any mid and post tasks from the image. Deploy the image but do not reboot when done. From the main KBE menu is a choice called "recovery" choose that and then open a command window. using dos commands go to the local drives and look around to make sure the file is where you expect to be with your xcopy command.


        During Mid phase and within the kace KBE. the drives are:
        X: is a ram drive that PE OS is running on.
        Y: is a drive pointing to the kbox to get files.
        C, D etc are the local drives.
      • I got it working! Happy Days! Thanks SMal.tmcc. You da man!
Please log in to comment
Answer this question or Comment on this question for clarity