Solved

Install after RIS - Client Doesn't Install Under System Account

Posted on 2008-06-16
4
925 Views
Last Modified: 2013-11-21
We have just upgraded our SMS 2003 installation to SCCM 2007.

As a part of our deployment, we have a script that is run after an RIS installation. This script installs the antivirus, the SMS client, waits until the install is finished, and then initiates the SMS actions. This all worked fine.

We then upgraded to SCCM2007. Since this point the installation of the SMS Client has failed. The ccmsetup.log file in C:\Windows\System32\ccmsetup shows the following at the bottom:

<![LOG[Source \\systems\SMS_TC1\Client is inaccessible (5)]LOG]!><time="14:28:30.390+-60" date="06-16-2008" component="ccmsetup" context="" type="2" thread="1500" file="ccmsetup.cpp:4785">
<![LOG[Failed to find accessible source. Waiting for retry.]LOG]!><time="14:28:30.390+-60" date="06-16-2008" component="ccmsetup" context="" type="2" thread="1500" file="ccmsetup.cpp:4909">
<![LOG[Next retry in 10 minute(s)...]LOG]!><time="14:28:30.390+-60" date="06-16-2008" component="ccmsetup" context="" type="0" thread="1500" file="ccmsetup.cpp:8191">

If I exit the script, and run the install manually as the user, then it will install fine.

After remembering that the RIS commands run under the system account, I changed our vbscript to run the install using the run as command. This does not work either, even when running as administrator through the script.

As a last ditch attempt, I even changed the NTFS permissions on the share to 'Everyone - Full Control' but this did not work either.

I'm guessing that whatever I do, something is still trying to run under the SYSTEM account, but I don't know what.

Anyone got any ideas on how to get round the problem?

Thanks.


0
Comment
Question by:trolley01
  • 2
  • 2
4 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 21797659
Hi, under normal operations, the only reason a script would run under the system account is if it was either explicitly launched under it, or it ran as a StartUp script, instead of a Login script.

If the script runs as a Login script, it should, by default, run under that user context of the user who logged in.

Also, if you *are* launching it via the System account, you might find that account does not have the neccessary NTFS permissions to read the \\systems\SMS_TC1\Client folder. By default, the System account only has access to local computer resources, or domain controllers "NetLogon" share.

Regards,

Rob.
0
 
LVL 1

Author Comment

by:trolley01
ID: 21800850
The script runs as part of the RunOnce section of the RIS Setup Information File. The programs listed in this section of the SIF run as the SYSTEM account.
0
 
LVL 1

Author Comment

by:trolley01
ID: 21802629
Ok. I think I have got it to work. Two fresh installations using RIS, both followed up with my antivirus and the SCCM2k7 client.

Instead of the original script, which was:

Set objShell=Wscript.CreateObject("WScript.Shell")
objShell.Run "\\SYSTEMS\InterChk\ESXP\setup.exe -user THOMASCLARKSON\SophosAV -pwd ********** -s",,True
objShell.Run "\\systems\SMS_TC1\Client\i386\CCMSETUP.EXE SMSSITECODE=TC1",3,True


I have changed it to be:

Set objShell=Wscript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objNetwork = WScript.CreateObject("WScript.Network")

'Install Sophos AV
objShell.Run "\\SYSTEMS\InterChk\ESXP\setup.exe -user THOMASCLARKSON\SophosAV -pwd ********** -s",,True

'Create a folder, and copy SCCM2k7 Installation Files
If objFSO.FolderExists("C:\SCCM2k7") = True Then
      objFSO.DeleteFolder ("C:\SCCM2k7")
End If
objFSO.CreateFolder("C:\SCCM2k7")
objNetwork.MapNetworkDrive "Y:", "\\systems\SMS_TC1", False
objFSO.CopyFolder "Y:\Client", "C:\SCCM2k7"
objNetwork.RemoveNetworkDrive "Y:"

'Wait for 30 seconds, whilst Sophos Installation Completes
Wscript.Sleep 30000

'Run the copied Client Setup
objShell.Run "C:\SCCM2k7\ccmsetup.exe"

'Wait for 3 minutes, then delete files
WScript.Sleep 180000
objFSO.DeleteFolder("C:\SCCM2k7")

I'm guessing there may be a better way to do this, but for now, this is working.

Anyone think of something better?





0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 21842888
Hi, that looks fine, although my only concern is the wait periods that you have there.  I would be more inclined to try to watch the install "process", and see when that ends....

So, instead of waiting 30 seconds, try using:

'========================
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2")

boolStillRunning = True

Do While boolStillRunning = True
      Set colProcess = objWMIService.ExecQuery ("Select Name from Win32_Process")
      boolStillRunning = False
      For Each objProcess in colProcess
            If objProcess.Name = "sophosav.exe" Then
                  boolStillRunning = True
            End If
      Next
      Wscript.Sleep 2000
Loop
'========================

and similarly, instead of waiting three minutes, use the same block as above, but just change the executable name that it monitors.

Regards,

Rob.
0

Featured Post

Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

Join & Write a Comment

Some time ago I faced the need to use a uniform folder structure that spanned across numerous sites of an enterprise to be used as a common repository for the Software packages of the Configuration Manager 2007 infrastructure. Because the procedu…
Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now