/build/static/layout/Breadcrumb_cap_w.png

Can anyone identify why this script would fail to work properly?

This is the output of my script to run a CRM client upgrade based on whether or not the copy of Office is 64 bit or 32 bit. The verify checks to see if the Office is 64 bit or 32 bit, my "On Success" action runs all the 64 bit installations, and the "Remediation" action runs the 32 bit install. It seems totally logical in my head, and if I run the script on two test machines, one running x64 and one running 32 bit, the 32 bit script doesn't work. It completes in both instances, but only the 64 bit version is actually installed whereas the 32 bit seems to just extract everything properly but not install it. I will paste the output below if that helps anyone, thanks! 

Started:10/05/2016 07:49:07
Finished:10/05/2016 07:50:51
Elapsed Time:104 seconds
Status:4

Output Log

Running as: SYSTEM
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64' did not succeed: (0)
Running as: SYSTEM
Couldn't kill process (fail) : Outlook.exe
Running as: SYSTEM
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64' did not succeed: (0)
Launched Process: CRM2016x86.exe
Running as: SYSTEM
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64' did not succeed: (0)
Launched Process: SetupClient.exe
Running as: SYSTEM
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64' did not succeed: (0)
Launched Process: Update1x86.exe
Running as: SYSTEM
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64' did not succeed: (0)
Creating process returned non-zero: C:\Microsoft CRM Upgrade 2016 x86\Service Pack 1\CRMUpdateWrapper.exe /q: (0) The operation completed successfully.
Error Code: 0
Status Code: -2

Activity Log

Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64'
Creating message window: Now beginning your upgrade of Microsoft CRM for Outlook 2010 x86. Please do not open Outlook. 86400
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64'
Launching program: 'C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\374\CRM2016x86.exe' '/quiet /extract:"C:\Microsoft CRM Upgrade 2016 x86"' wait='true'
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64'
Launching program: 'C:\Microsoft CRM Upgrade 2016 x86\SetupClient.exe' '/quiet' wait='true'
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64'
Launching program: 'C:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\374\Update1x86.exe' '/quiet /extract:"C:\Microsoft CRM Upgrade 2016 x86\Service Pack 1"' wait='true'
Checking if registry 'HKLM\Software\Microsoft\Office\14.0\Outlook' value 'Bitness' is equal to 'x64'
Launching program: 'C:\Microsoft CRM Upgrade 2016 x86\Service Pack 1\CRMUpdateWrapper.exe' '/q' wait='true'

1 Comment   [ + ] Show comment
  • Are you also accounting for the OS version? Paths will vary based on 32bit OS with 32bit Office, 64bit OS with 32 bit Office and 64bit OS and 64bit Office. - chucksteel 7 years ago

Answers (4)

Posted by: SMal.tmcc 7 years ago
Red Belt
2
check out your other question I have added a couple more solutions for you

http://www.itninja.com/question/how-can-i-use-verify-in-a-manner-similar-to-or#answer-100694

Comments:
  • By the way, on the topic of this particular question: I have verified that there is an issue with deploying this script to 32 bit Office for whatever reason. I literally dumbed the script down to just install the appropriate update files, and yet again it works on my x64 and not my x86! Crazy!

    It still goes and completes the script: extracts all the files to where they need to be and yet never installs the client after that. I can literally navigate to the folder it creates, and manually install them using the exact same "/quiet" parameters, and it works fine! Can you believe that? I literally have no idea what the deal is... - JTaff 7 years ago
    • can you post the actual script tasks so we can see them. also are these machines that fail all x64, x86 or mix of both for the OS type? - SMal.tmcc 7 years ago
      • Hi there! I left the code below in a separate answer. - JTaff 7 years ago
Posted by: SMal.tmcc 7 years ago
Red Belt
1
could be because outlook did not terminate or you ran it as system.  Did you look at the event logs? Also add the log switch (/log path) to the install to get more details


Comments:
  • I don't believe it's an Outlook termination issue as I have a line that kills the process, and have tried it with Outlook both open and closed. I'm interested what you mean by run it as system... I thought "local system" was the best way to run it as it would ensure all accounts would have Admin privileges to install programs? I'm working on getting a log in there that I can show you shortly. - JTaff 7 years ago
    • I have run into programs that needed a logged on user due to they used the temp folder for some of the processes and system does not have this. you can try to run it as administrator via the credentials user choice to see what that does - SMal.tmcc 7 years ago
      • Interesting. For various other reasons I really wanted to do this, but I get worried about permissions with my users that aren't admins. - JTaff 7 years ago
      • you go into credential manager and create an admin credential and use that. under settings-credentials - SMal.tmcc 7 years ago
    • system is the preferred method but some software does not like it - SMal.tmcc 7 years ago
Posted by: anonymous_9363 7 years ago
Red Belt
1

I really only use process killers for persistent offenders, those who refuse multiple times to close down their applications. If the process won't close, then the machine gets restarted. It makes scripting somewhat more involved, of course, in that it has to count how many requests have been refused.

Previous to that drastic action, though, users get emailed with a notice that 'Application Y' is going to be upgraded on date X so they will need to log off. A series of reminders then goes out before date X. On the day, the final email outlines what's going to happen and the consequences if they fail to log off.

It's a well-proven process.

I can't imagine that using the System account would prove to be the bugbear here - it should be able to kill any process - but it'd be child's play to eliminate that possibility by creating an 'Installer' account which you would make a member of the local 'Administrators' group and then use that account.

Lastly, I'd probably build a "proper" script, in the language of your choice. That will give you much more control: from the output shown, it seems to me that the script you have is unable to act upon error conditions, blindly continuing when at least one condition (Outlook not running) is False. You'd also be able to add much finer detail in your logging.

Posted by: JTaff 7 years ago
Senior White Belt
0
Here is the code I use for both systems. Both are x64, the only difference is the one that fails runs Office x86. I just change the dependencies on each to match whether I'll deploy the x86 or x64 script. Also, I don't know if you saw you other thread I posted the way I configured the bitness CIR, and I'm getting really incorrect readings from it overall. For some reason I think it's putting all computers that match the bitness rule in there even though I had a line that said AND contains software title Microsoft CRM. Check out my code:

<?xml version="1.0" encoding="utf-8" ?>
<kbots xmlns="http://kace.com/Kbots.xsd">
<kbot>

<config name="*|Outlook CRM 2016 Outlook 32 bit Upgrade TEST|*" type="policy" id="374" version="1475779531" description="Test only. DO NOT RUN this outside of test environment!!">

  <dependencies>
    <dependency name="/packages/kbots/374/CRM2016x86.exe" checksum="54c0268fdb59776c96dd75888e036fe5"  />
    <dependency name="/packages/kbots/374/Update1x86.exe" checksum="e318df7de947a25b2c87ff31232b934a"  />
  </dependencies>

  <execute disconnected="false" logged_off="false">
  </execute>

</config>

<compliance>

  <verify on_failure="continue" attempts="1">


    <on_verify_success>
      <create_message_window name="IT" title="CRM Upgrade" message="The IT Team is now beginning your upgrade of Microsoft CRM. Please do not open Microsoft Outlook during this process." timeout="86400" />
      <launch_program path="$(KACE_DEPENDENCY_DIR)" program="CRM2016x86.exe" wait="true" parms="/quiet /extract:&quot;C:\CRM Upgrade 2016&quot;" />
    </on_verify_success>

    <on_verify_failure>
      <create_message_window name="IT" title="CRM Upgrade" message="The IT Team is now beginning your upgrade of Microsoft CRM. Please do not open Microsoft Outlook during this process." timeout="86400" />

      <on_remediation_success>
      </on_remediation_success>

      <on_remediation_failure>
      </on_remediation_failure>

    </on_verify_failure>

  </verify>

  <verify on_failure="break" attempts="1">


    <on_verify_success>
      <launch_program path="C:\CRM Upgrade 2016" program="SetupClient.exe" wait="true" parms="/quiet" />
    </on_verify_success>

    <on_verify_failure>

      <on_remediation_success>
      </on_remediation_success>

      <on_remediation_failure>
      </on_remediation_failure>

    </on_verify_failure>

  </verify>

  <verify on_failure="break" attempts="1">


    <on_verify_success>
      <launch_program path="$(KACE_DEPENDENCY_DIR)" program="Update1x86.exe" wait="true" parms="/quiet /extract:&quot;C:\CRM Upgrade 2016\Service Pack 1" />
    </on_verify_success>

    <on_verify_failure>

      <on_remediation_success>
      </on_remediation_success>

      <on_remediation_failure>
      </on_remediation_failure>

    </on_verify_failure>

  </verify>

  <verify on_failure="break" attempts="1">


    <on_verify_success>
      <launch_program path="C:\CRM Upgrade 2016\Service Pack 1" program="CRMUpdateWrapper.exe" wait="true" parms="/q" />
    </on_verify_success>

    <on_verify_failure>

      <on_remediation_success>
      </on_remediation_success>

      <on_remediation_failure>
      </on_remediation_failure>

    </on_verify_failure>

  </verify>

  <verify on_failure="break" attempts="1">


    <on_verify_success>
      <create_message_window name="IT Message" title="Upgrade Complete" message="Your upgrade of Microsoft CRM 2016 has been successfully completed. You may now open Microsoft Outlook. NOTE: Keep in mind the first time you open Outlook, the start up may be a bit slower as the program will synchronize." timeout="86400" />
    </on_verify_success>

    <on_verify_failure>

      <on_remediation_success>
      </on_remediation_success>

      <on_remediation_failure>
      </on_remediation_failure>

    </on_verify_failure>

  </verify>

</compliance>

</kbot>
</kbots>

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ