Kaseya Community

create a script to fix TileDataLayer\Database\EDB.log

  • Does anyone have a script that will check if this folder exists C:\WINDOWS\system32\config\systemprofile\AppData\Local\TileDataLayer\Database\

    if it doesnt then the script will create it?

  • here is what i create but its not working.

    <If description="Procedure description: Checks if the the TileDataLayer Folder exists if not creates it.">

    <Condition name="TestFile">

    <Parameter xsi:type="StringParameter" name="Path" value="C:\WINDOWS\system32\config\systemprofile\AppData\Local\TileDataLayer\nul"/>

    <Parameter xsi:type="EnumParameter" name="Condition" value="Exists"/>

    <Parameter xsi:type="StringParameter" name="Value" value=""/>

    </Condition>

    <Then>

    <Statement name="WriteScriptLogEntry" continueOnFail="false">

    <Parameter xsi:type="StringParameter" name="Comment" value="TileDataLayer already exists"/>

    </Statement>

    </Then>

    <Else>

    <Statement name="Execute Powershell" continueOnFail="false">

    <Parameter xsi:type="StringParameter" name="Parameter1" value=""/>

    <Parameter xsi:type="StringParameter" name="Parameter2" value="mkdir C:\WINDOWS\system32\config\systemprofile\AppData\Local\TileDataLayer\Database"/>

    <Parameter xsi:type="StringParameter" name="Parameter3" value="False"/>

    </Statement>

    <Statement name="WriteScriptLogEntry" continueOnFail="false">

    <Parameter xsi:type="StringParameter" name="Comment" value="TileDataLayer folder created"/>

    </Statement>

    </Else>

    </If>

    </Body>

    </Procedure>

    </ScriptExport>



    d
    [edited by: noclav at 9:10 AM (GMT -8) on Dec 31, 2020]
  • Try using "Execute Commandshell"  instead of "Execute Powershell"