Solved

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

Posted on 2008-06-16
4
932 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

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…
Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

822 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