Quantcast
Viewing all articles
Browse latest Browse all 1063

How do I find the folder name in c:\windows\ccmcache that corresponds to a package from a script

I am creating a task sequence in SCCM to install some software and I need to create a "Run command line" task to call a batch file contained in a package I have created. How can I find the folder in c:\windows\ccmcache\ where a package is located.

for example:

cmd /c c:\windows\ccmcache\?????\settings.cmd

I know I can create an application in the package to call the script but unfortunately this causes another problem; the script will not write to a file.

Run command line task (this works):
cmd /c echo hello >c:\temp\test.log

Run command line task (this does not work because it doesn't know where settings.cmd is):
cmd /c settings.cmd

Package\Program (does not work)
cmd /c settings.cmd

settings.cmd =
echo hello >c:\temp\test.log

I can make the package\program work if I deploy it outside of a task sequence by checking "Allow users to interact with this program" but as soon as I do that it is unavailable for use in a task sequence.

If there is a way to set a task sequence variable from a script, that would work too.

Thank you



Viewing all articles
Browse latest Browse all 1063

Trending Articles



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