none
Locking workstation during task sequence. RRS feed

  • Question

  • Hello I have had trouble getting the workstation to acually lock during the task sequence. I have tried many different ways including putting the command in the task sequence or even running it form a command file. It appears to run but just doesn't lock the machine.

    Any ideas. Sorry about the code dump. Its a bit messy. BTW Z: drive is mapped

    Expand a string: WinPEandFullOS TSManager 24/04/2014 10:05:09 AM 2628 (0x0A44)
    Executing command line: smsswd.exe /run: Z:\Lock_Workstation.cmd TSManager 24/04/2014 10:05:09 AM 2628 (0x0A44)
    [ smsswd.exe ] InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    PackageID = '' InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    BaseVar = '', ContinueOnError='' InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    ProgramName = 'Z:\Lock_Workstation.cmd' InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    SwdAction = '0001' InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    Working dir 'not set' InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    Executing command line: Run command line InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    C:\Windows\system32>C:\Windows\system32\rundll32.exe user32.dll,LockWorkStationInstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    Process completed with exit code 0 InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    Command line returned 0 InstallSoftware 24/04/2014 10:05:10 AM 2964 (0x0B94)
    Process completed with exit code 0 TSManager 24/04/2014 10:05:10 AM 2628 (0x0A44)
    !--------------------------------------------------------------------------------------------! TSManager 24/04/2014 10:05:10 AM 2628 (0x0A44)
    Successfully completed the action (Lock Workstation) with the exit win32 code 0 TSManager 24/04/2014 10:05:10 AM 2628 (0x0A44)
    Set authenticator in transport TSManager 24/04/2014 10:05:10 AM 2628 (0x0A44)
    Set a global environment variable _SMSTSLastActionRetCode=0 TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)
    Set a global environment variable _SMSTSLastActionSucceeded=true TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)
    Clear local default environment TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)
    Updated security on object C:\_SMSTaskSequence.  TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)
    Set a global environment variable _SMSTSNextInstructionPointer=3 TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)
    Set a TS execution environment variable _SMSTSNextInstructionPointer=3 TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)
    Set a global environment variable _SMSTSInstructionStackString= TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)
    Set a TS execution environment variable _SMSTSInstructionStackString= TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)
    Save the current environment block TSManager 24/04/2014 10:05:11 AM 2628 (0x0A44)

    ssfully completed the action (Lock Workstation) with the exit win32 code 0


    SCCM Deployment Technician

    Monday, April 28, 2014 3:14 AM

Answers

  • Hi,

    Ever heard of the option: HideShell=YES?

    This does not lock the workstation, but hides the Windows Shell for the length of the deployment making it unusable to any end-user who want's to or might want to fiddle with the workstation during deployment.

    Normally HideShell is disabled or not set during the testing phase since it leaves you the opportunity to easily troubleshoot problems you mac encounter.

    However when you have made your OS deployment flawlessly you may enable HideShell=YES in customsettings.ini to lock the GUI during deployments.

    Cheers!


    If this post is helpful please click "Mark for answer", thanks! Kind regards

    • Proposed as answer by Frank TroutMVP Monday, April 28, 2014 3:19 PM
    • Unproposed as answer by Frank TroutMVP Monday, April 28, 2014 3:19 PM
    • Proposed as answer by Frank TroutMVP Monday, April 28, 2014 3:20 PM
    • Marked as answer by Stavbergen Wednesday, April 30, 2014 1:29 AM
    Monday, April 28, 2014 1:27 PM
  • Used to lock the workstation before HIDESHELL came along by doing the following and it worked fine. You just need to add it in to the different stages of the TS after system reboots during the installation.

    • Marked as answer by Stavbergen Wednesday, April 30, 2014 1:29 AM
    Monday, April 28, 2014 3:09 PM

All replies

  • Forgive the question, but why are you trying to lock the workstation during the task sequence?


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

    Monday, April 28, 2014 4:34 AM
  • Hi,

    Ever heard of the option: HideShell=YES?

    This does not lock the workstation, but hides the Windows Shell for the length of the deployment making it unusable to any end-user who want's to or might want to fiddle with the workstation during deployment.

    Normally HideShell is disabled or not set during the testing phase since it leaves you the opportunity to easily troubleshoot problems you mac encounter.

    However when you have made your OS deployment flawlessly you may enable HideShell=YES in customsettings.ini to lock the GUI during deployments.

    Cheers!


    If this post is helpful please click "Mark for answer", thanks! Kind regards

    • Proposed as answer by Frank TroutMVP Monday, April 28, 2014 3:19 PM
    • Unproposed as answer by Frank TroutMVP Monday, April 28, 2014 3:19 PM
    • Proposed as answer by Frank TroutMVP Monday, April 28, 2014 3:20 PM
    • Marked as answer by Stavbergen Wednesday, April 30, 2014 1:29 AM
    Monday, April 28, 2014 1:27 PM
  • Used to lock the workstation before HIDESHELL came along by doing the following and it worked fine. You just need to add it in to the different stages of the TS after system reboots during the installation.

    • Marked as answer by Stavbergen Wednesday, April 30, 2014 1:29 AM
    Monday, April 28, 2014 3:09 PM
  • Thankyou both Answers are correct however we have no MDt at the moment.

    Cheers


    SCCM Deployment Technician

    Wednesday, April 30, 2014 1:29 AM
  • Actually it didn't work see below

    Expand a string: WinPEandFullOS TSManager 30/04/2014 11:33:35 AM 2472 (0x09A8)
    Executing command line: smsswd.exe /run: Z:\Lock_Workstation.cmd TSManager 30/04/2014 11:33:35 AM 2472 (0x09A8)
    [ smsswd.exe ] InstallSoftware 30/04/2014 11:33:35 AM 4580 (0x11E4)
    PackageID = '' InstallSoftware 30/04/2014 11:33:35 AM 4580 (0x11E4)
    BaseVar = '', ContinueOnError='' InstallSoftware 30/04/2014 11:33:35 AM 4580 (0x11E4)
    ProgramName = 'Z:\Lock_Workstation.cmd' InstallSoftware 30/04/2014 11:33:35 AM 4580 (0x11E4)
    SwdAction = '0001' InstallSoftware 30/04/2014 11:33:35 AM 4580 (0x11E4)
    Getting linked token InstallSoftware 30/04/2014 11:33:35 AM 4580 (0x11E4)
    failed to get the linked token information. It may not be available. Error 1312 InstallSoftware 30/04/2014 11:33:35 AM 4580 (0x11E4)
    Working dir 'not set' InstallSoftware 30/04/2014 11:33:36 AM 4580 (0x11E4)
    Executing command line: Run command line InstallSoftware 30/04/2014 11:33:36 AM 4580 (0x11E4)
    InstallSoftware 30/04/2014 11:33:38 AM 4580 (0x11E4)
    C:\Windows\system32>rundll32.exe user32.dll,LockWorkStation InstallSoftware 30/04/2014 11:33:38 AM 4580 (0x11E4)
    Process completed with exit code 0 InstallSoftware 30/04/2014 11:33:38 AM 4580 (0x11E4)
    Command line returned 0 InstallSoftware 30/04/2014 11:33:38 AM 4580 (0x11E4)
    Process completed with exit code 0 TSManager 30/04/2014 11:33:38 AM 2472 (0x09A8)


    SCCM Deployment Technician

    Wednesday, April 30, 2014 1:34 AM