Quantcast
Channel: Micro Focus Forums
Viewing all articles
Browse latest Browse all 11924

Why isn't this batch script working?

$
0
0
Hi all,

ZCM 11.2.2, Windows 7 x64 clients.

I needed to copy a file to all existing user profiles, and so I made a script that works when I use it in a .bat file, but I can't get it to work using the Run Scipt action in ZCM. This is part of the script:
Code:

FOR /F "delims==" %%A IN ('DIR /B "C:\Users"') DO mkdir "C:\Users\%%A\AppData\LocalLow\Apple Computer\QuickTime"
When I run it as a Run Script action I get this error:

Code:

An error occurred while executing the program. Error is: Unexpected \Users"') DO mkdir "C:\Users\A\AppData\LocalLow\Apple.
But if I put the exactly same line in a .bat file and call it from a Launch Executable action it works fine.

This is no big problem, since I can use the .bat file workaround, I'm just curious why it doesn't work. I'm guessing it has something to do with the " and ' symbols...?

Regards,
Pär

Viewing all articles
Browse latest Browse all 11924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>