Part of my detection script references a value in a CSV file. I stored this CSV file along with the actual deployment. Unfortunately, detection is failing as it cannot detect the .CSV file! I stored the CSV file in the content source directory,
which is then in turn distributed to the other distribution points.
The part of the detection script that fails is as follows (note I've also tried with .\ACMECSV.csv). An excerpt from the application
$CSV = import-csv ACMECSV.csv
<![LOG[ In-line script returned error output: Import-Csv : Could not find file 'C:\WINDOWS\system32\ACMECSV.csv'.
At C:\WINDOWS\CCM\SystemTemp\fabd6339-e5fc-8a4c-9e2c-7b49f9b852c8.ps1:1 char:18
+ $CSV = Import-Csv -Path ACMECSV.csv ..
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundExcepti
on
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.Im
portCsvCommand
]LOG]!><time="17:17:07.862-780" date="02-15-2016" component="AppDiscovery" context="" type="2" thread="5260" file="appexcnlib.cpp:1022">
<![LOG[A script execution error has occurred. The script has no output in stdout and an error message in stderr.]LOG]!><time="17:17:07.863-780" date="02-15-2016" component="AppDiscovery" context="" type="3"
thread="5260" file="appexcnlib.cpp:1032">
<![LOG[Script Execution returned error message: Import-Csv : Could not find file 'C:\WINDOWS\system32\ACMECSV.csv'.
At C:\WINDOWS\CCM\SystemTemp\fabd6339-e5fc-8a4c-9e2c-7b49f9b852c8.ps1:1 char:18
+ $CSV = Import-Csv -Path ACMECSV.csv
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Import-Csv], FileNotFoundExcepti
on
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.Im
portCsvCommand
I'm wanting to reference the CSV file I have placed in the deployment share. I don't want to use the UNC path as it defeats the purpose of using a distribution point! Is there a variable that I can perhaps use that will reference the source content folder?