SCCM: Deployment a Script as an Application

Caporegime
Joined
7 Nov 2004
Posts
30,194
Location
Buckinghamshire
Hi all,

Wondering if there are any SCCm gurus here?

I have a script that essentially deactivates an existing license, then applies the new license and copies a config file over - The script itself works fine if just executed by itself, but soon as I run it as an Application in SCCM it fails.

I can get this working as a Package in SCCM, but it lacks accurate reporting.
 
Soldato
Joined
25 Oct 2002
Posts
2,622
What are you using as your detection method? Also look in this log on a client and it may shed some light as to what is failing "C:\Windows\CCM\Logs\AppEnforce.log"
 
Caporegime
OP
Joined
7 Nov 2004
Posts
30,194
Location
Buckinghamshire
What are you using as your detection method? Also look in this log on a client and it may shed some light as to what is failing "C:\Windows\CCM\Logs\AppEnforce.log"

I tried it via folder directory for the application that's installed and by file in that directory.

Also, AppEnforce.log doesn't exist
 
Soldato
Joined
25 Oct 2002
Posts
2,622
I tried it via folder directory for the application that's installed and by file in that directory.

Also, AppEnforce.log doesn't exist

That's odd, I'm fairly sure AppEnforce.log should exist as any Application deployments that actually run are recorded there.

It's possible that your detection method is too broad, and that the client is detecting the application as already installed and so doesn't actually run. You could try making it more specific (eg. if the license is a regular file then make it look at the date modified), or you could make your script create something unique such as a file or registry entry which you can then use as the detection method).
 
Caporegime
OP
Joined
7 Nov 2004
Posts
30,194
Location
Buckinghamshire
That's odd, I'm fairly sure AppEnforce.log should exist as any Application deployments that actually run are recorded there.

It's possible that your detection method is too broad, and that the client is detecting the application as already installed and so doesn't actually run. You could try making it more specific (eg. if the license is a regular file then make it look at the date modified), or you could make your script create something unique such as a file or registry entry which you can then use as the detection method).

Ah okay, that might make sense then...It's thinking it's already installed, however with Scripts in SCCM (we're only on 1606) they appear to just go through Software Center and say installed.

Maybe I'll try as you stated and make it create a file.

Run it as a package and then set up an SCCM compliance report

I have it running as a Package currently so i'll look at the compliance reports, ta :)
 
Back
Top Bottom