?
Solved

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

Posted on 2008-06-16
4
Medium Priority
?
938 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found listed in my profile here: http:…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

764 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