Dec 05 2022 01:41 AM
Hi all,
I am trying to replace a file which is located on devices in
C:\ProgramFiles\ExamWritePad\
The file is called ExamWritePadSettings.Json
How do I do this? I have tried a bat file: Replace .\ExamWritePadSettings.Json 'C:\ProgramFiles\ExamWritePad"
I have even tried: copy /Y .\ExamWritePadSettings.json %systemRoot%\ProgramFiles\ExamWritePad
However both dont work!
Any ideas
Dec 05 2022 02:12 AM - edited Dec 05 2022 04:34 AM
Using a Intune package with a install.cmd which contains this should work:
Copy /y .\ExamWritePadSettings.Json "C:\Program Files\ExamWritePad"
It's "C:\Program Files" and not "C:\programfiles", perhaps that's the issue? Run it as system and not as user, the user doesn't have rights in c:\program files directories by default.
Perhaps you are confused with the environment variables?
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
Dec 05 2022 04:24 AM
Dec 05 2022 04:35 AM
SolutionDec 05 2022 11:26 AM
Another possibly simpler detection rule would be to use the "Date Modified" method. If the file date is greater than or equal to MM/DD/YYYY, it's the latest version and doesn't need to run.
Please like and mark this thread as answered if it's helpful, thanks!