For example, the vast majority of our Managed Installs (MI) are zipped up files, with a bat file inside which is run, this usually does some checks of the Windows OS Version, Processor Architecture, and then runs the relevant MSI or EXE with the required parameters (we have quite a few that require more than just "/i /qb!"), and sometimes copies config files, or removes unnecessary shortcuts, etc.

Now, I would like some more feedback from my scripts in the computer inventory page in the K1000 under the MI log, which contains status, activity and output, however there's usually nothing very helpful here, I would like to be able to check errorlevels in my script and write to the log file so that we know what part failed and possibly why.

I know we can turn on debug logs, but that's per machine and creates a lot of logs when we just need some quick feedback on deployment.

Is it possible to pass some variables to runkbot.exe or kdeploy.exe to add a line to the log and ensure this is uploaded to the K1000?

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

Right now there is no switch to enable feature based logging. 

Answered 01/29/2013 by: AbhayR
Fourth Degree Black Belt

  • That's not what I'm after, since we use our own bat file to do installs out of zip files, then I'd want to do some checks on errorlevel and then run something like kdeploy.exe /l:status /m:"Error, unable to install due to Outlook running"
  • This type of task would best be done via Scripts (as suggested by @GillySpy) than MI as it supports file uploads as well as you can add multiple steps to check all the pre-conditions before deploying the package. It also supports logging.
  • KBOX scripts are ok for somethings, but not up to this task, there's not enough options, trying to replicate a script would take so many "tasks" it would be huge, or I'd have to have so many little scripts for it to run in several tasks even then I'm not sure combined conditions would work far too much effort when a zipped MI including a single re-useable bat file works so well. Just need to be able to add lines to the Agent MI log, which it does itself so would think there was a way unless it's hard coded inside one of the k?.exe files.
  • One thing you can do is to dump to logs of bat file to a file on the machine and later run a script to upload that file from all the machines where MI is configured.

    This is not the ideal solution but should get you home.
Please log in to comment
1

If you want to take more control over the process you could use a kscript instead of an MI.  A kscript (we call them kbots internally) can behave like an MI

  • tied to inventory so they have similar event scheduling to an MI
  • deployed to a label
  • leverage software items that have payloads

but you have the option of extra steps or tasks to verify, log and remediation conditions.

You could also track a specific log of an installer and then request that to be uploaded to the machine's inventory.

Answered 01/29/2013 by: GillySpy
Seventh Degree Black Belt

  • I have used Scripts a little, not found them the best for normal deployment, useful for ad hoc tasks though. We had one regular task but the popup command prompt was annoying users.
    Managed to get the hang of the logic... not as good as it could be, but has been somewhat useful at times.

    Thing is, we mostly use a bat file inside a zip, so while we could call msi's with the log and upload that, it's rather messy, if in the bat it checks for the outlook.exe as a running process, I just want a single line in the MI activity/output/status log to just say "Error: Unable to install as Outlook is running" as an example, there are many other conditions I check for, and similarly one line to log a basic status is all that's required.

    Obviously the log does get some items:

    Output Log
    Running as: SYSTEM
    Launched Process: KDeploy

    Status Log
    Completed FS/MI processing...

    Activity Log
    Launching program: 'C:\Program Files (x86)\Dell\KACE\\KDeploy' '-fs -mi -fade=1 -notifyevent=' wait='true'

    How does this work and can we make it log our own messages, similiar to scripts, but by calling an .exe with parameters.
Please log in to comment
Answer this question or Comment on this question for clarity