Jump to content


  • 0
oliphanj

TS Run Command line issues

Question

I am trying to apply a couple fixes to our image using the "Run Command Line" in the OSD Task Sequence and it is giving me this error which I found in the smsts-date.log.

I searched for this error and didn't find much of anything on Technet. I am considering opening a case. I would appreciate any guidance.

 

 

Expand a string: smsswd.exe /run: cmd.exe /c net localgroup administrators /add SRCShell TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Expand a string: TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Command line for extension .exe is "%1" %* TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Set command line: smsswd.exe /run: cmd.exe /c net localgroup administrators /add SRCShell TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Start executing the command line: smsswd.exe /run: cmd.exe /c net localgroup administrators /add SRCShell TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

!--------------------------------------------------------------------------------------------! TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Expand a string: WinPEandFullOS TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Executing command line: smsswd.exe /run: cmd.exe /c net localgroup administrators /add SRCShell TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

=======================[ smsswd.exe ] ======================= InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

PackageID = '' InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

BaseVar = '', ContinueOnError='' InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

SwdAction = '0001' InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

Command line for extension .exe is "%1" %* InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

Set command line: Run command line InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

Working dir 'not set' InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

Executing command line: Run command line InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

Process completed with exit code 2 InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

Command line returned 2 InstallSoftware 10/6/2010 10:52:33 AM 3808 (0x0EE0)

Process completed with exit code 2 TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

!--------------------------------------------------------------------------------------------! TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Failed to run the action: SRCShell to Admin.

The system cannot find the file specified. (Error: 00000002; Source: Windows) TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Sending status message . . . TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

Send a task execution status message SMS_TSExecution_ActionFailError TSManager 10/6/2010 10:52:33 AM 2708 (0x0A94)

 

 

Thanks,

Jason

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hey Jason,

can you copy the attach the whole log file?

i assume your just wanting to add the SRCShell to the local admins group?

 

is the SRCShell user a domain user or do you want to add as a local user?

 

if you want to add as a local user

"net user /add SRCShell password /EXPIRES:NEVER"

"net localgroup Administrators /Administrators /add SRCShell"

 

 

if you want to add as domain user

net localgroup Administrators /add /domain SRCShell

 

 

this help out a bit?

 

we script it, and generally don't add domain users to a local admin group as it get to messy to maintain... you can add a domain group easily also

 

 

VBSCRIPT

'Beginning Of the Script

On Error Resume Next

'get main objects/variables
Set ws = WScript.CreateObject ( "WScript.Shell" )
compname = ws.ExpandEnvironmentStrings ( "%COMPUTERNAME%" )
Set adGrp = GetObject ( "WinNT://" & compname & "/Administrators,group" )

'add domain groups to local admin group
adGrp.Add ( "WinNT://DOMAIN1/Domain Admins,group" )
adGrp.Add ( "WinNT://DOMAIN2/Domain Admins,group" )

'End of the Script

 

Share this post


Link to post
Share on other sites

  • 0

Here is the full log file. I have about 4 cmd's I would like to run or put into a batch file??

 

Jason

 

Hey Jason,

can you copy the attach the whole log file?

i assume your just wanting to add the SRCShell to the local admins group?

 

 

 

is the SRCShell user a domain user or do you want to add as a local user?

 

if you want to add as a local user

"net user /add SRCShell password /EXPIRES:NEVER"

"net localgroup Administrators /Administrators /add SRCShell"

 

 

if you want to add as domain user

net localgroup Administrators /add /domain SRCShell

 

 

this help out a bit?

 

we script it, and generally don't add domain users to a local admin group as it get to messy to maintain... you can add a domain group easily also

 

 

VBSCRIPT

'Beginning Of the Script

On Error Resume Next

'get main objects/variables
Set ws = WScript.CreateObject ( "WScript.Shell" )
compname = ws.ExpandEnvironmentStrings ( "%COMPUTERNAME%" )
Set adGrp = GetObject ( "WinNT://" & compname & "/Administrators,group" )

'add domain groups to local admin group
adGrp.Add ( "WinNT://DOMAIN1/Domain Admins,group" )
adGrp.Add ( "WinNT://DOMAIN2/Domain Admins,group" )

'End of the Script

smsts-20101006-105306.log

Share this post


Link to post
Share on other sites

  • 0

Here's a snippet of VBScript code showing how to set the password for a local account that is being created:

 

strUsername = "JoeUser"

strPassword = "xxxxxxxxxxxx"

 

Set objNetwork = Wscript.CreateObject("WScript.Network")

Set objUserAccounts = GetObject("WinNT://" & objNetwork.ComputerName & "")

Set objUser = objUserAccounts.Create("user", strUsername)

objUser.Description = "The description info goes here"

objUser.SetPassword strPassword

objUser.SetInfo

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • 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.