0

I have deployed a bat file to a device using the with file name as the install line e.g. app.bat

It is a simple one line piece of code:

for /d %I in ("C:\ProgramData\theapp*") do "%~I\theapp.exe"

But this fails to deliver and I I receive a generic 1006 error. Could this issue be realted to the bat file itself?

Codecode1
  • 15
  • 5
  • in batch files, % symbols must be doubled where `For` variables are concerned. So `%%l` or `%%~l` instead of `%l` or `%~l` – T3RR0R Apr 09 '21 at 12:14
  • In the future, please read the help file for a command before asking a question. The eighth line of the help file says: **To use the FOR command in a batch program, specify %%variable instead of %variable.** – Squashman Apr 09 '21 at 13:58
  • Why did you tag this question with `PowerShell` tags when there is no reference to Powershell in your question nor is there any PowerShell code in your question. – Squashman Apr 09 '21 at 14:00

0 Answers0