/build/static/layout/Breadcrumb_cap_w.png

Start Menu & Taskbar Layout

I have a post install task that runs a powershell script to import the .xml file for the start menu and taskbar layout but it continually fails.

Has anyone else been able to get this to work?


Import-StartLayout -LayoutPath "$PSScriptRoot\StartTaskLayout.xml" -MountPath -C:\

1 Comment   [ + ] Show comment
  • Also post the Error Message and return code when a task fails - Channeler 5 years ago

Answers (1)

Posted by: SMal.tmcc 5 years ago
Red Belt
0

Are you zipping the xml and ps1 files together and adding those to a post application task?

For the app task command use

powershell -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file script.ps1





Comments:
  • Yes, they are zipped together. - abratton 5 years ago
    • it the powershell at least ver 3.0 - SMal.tmcc 5 years ago
  • Just went thru the files myself on a test, the command that way is looking for PS in the kace application directory vs the system area


    this command powershell -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file script.ps1 the xml looks like this

    <Task ID="1162">
    <Name>powershell example</Name>
    <WorkingDirectory>%systemdrive%\KACE\Applications\1162</WorkingDirectory>
    <CommandLine><![CDATA["%systemdrive%\KACE\Applications\1162\powershell -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file script.ps1" ]]></CommandLine>
    <Parameters></Parameters>
    <PostTaskAction>None</PostTaskAction>
    <KACETaskType>Application</KACETaskType>
    <FileType>Exe</FileType>
    <Type>PO</Type>
    <Guid>15d167da1da2d1</Guid>
    </Task>
    note the command line:

    Use this command for the task:

    %systemdrive%\%sysnative%\WindowsPowerShell\v1.0\powershell -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file script.ps1

    the task then looks like this:

    <Task ID="1162">
    <Name>powershell example</Name>
    <WorkingDirectory>%systemdrive%\KACE\Applications\1162</WorkingDirectory>
    <CommandLine><![CDATA[%systemdrive%\%sysnative%\WindowsPowerShell\v1.0\powershell -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file script.ps1]]></CommandLine>
    <Parameters></Parameters>
    <PostTaskAction>None</PostTaskAction>
    <KACETaskType>Application</KACETaskType>
    <FileType>Exe</FileType>
    <Type>PO</Type>
    <Guid>15d167d1570e71</Guid>
    </Task> - SMal.tmcc 5 years ago
    • To check how it's formatted lets look at the Task xml for that deployment. have your browser at the list page of your deployments. point your mouse at the deployment with this task. look at lower left corner of your browser and note the system ID. Next go the library and do same thing for task.

      connect to your \\ikbox\peinst share using .\admin samba password.

      under peinst you will find a directory "scripts"

      In that dir find the deployment_Tasks_###.xml that matches the id number to the number in the name.

      Edit that file and search for the matching task ID and post that part

      for example for a task with ID 1114

      Task ID="1114">
      <Name>Acad W10 copy w2d files</Name>
      <WorkingDirectory>%systemdrive%\KACE\Applications\1114</WorkingDirectory>
      <CommandLine><![CDATA["%systemdrive%\KACE\Applications\1114\xcopyacadfiles.exe" ]]></CommandLine>
      <Parameters></Parameters>
      <PostTaskAction>None</PostTaskAction>
      <KACETaskType>Application</KACETaskType>
      <FileType>Exe</FileType>
      <Type>PO</Type>
      <Guid>15d14f784b689e</Guid>
      </Task>

      next on the ikbox navigate to applications\task_id###
      do dir and you should see your zip and a sub contents dir. change to contents dir and make sure your files are there - SMal.tmcc 5 years ago
  • I do something similar on my images. I use a bat file to copy the XML Layout to the directory. Both files are zipped together. Then I call the bat file in the command line.

    @echo off
    xcopy LayoutModification.xml /y C:\Users\Default\AppData\Local\Microsoft\Windows\Shell - ceasar.trejo 5 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ