While trying to deploy several kinds of packages silently I get an error: Failed (Bad Environment).
While trying to deploy several kinds of packages silently I get an error: Failed (Bad Environment). I can install the packages fine with the same switches I specified in
March 18th, 2015 1:45pm

Depending on the program options, ConfigMgr uses the SYSTEM account for installation.  Try using psexec -s -i cmd.exe.  Then run your command line from that new command window that will be running in the SYSTEM context.  Do you get the error there?

Jeff

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 1:52pm

It's usually something like "download & execute" and "requires drive letter". Please post the corresponding lines from the log.
March 18th, 2015 2:42pm

I think I'm interpreting what you are saying wrong. Also, the program is set to install with admin rights.
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 2:42pm

Not sure if my post was unclear, but check out this: http://blogs.technet.com/b/configurationmgr/archive/2011/10/13/how-to-quickly-and-easily-test-your-configmgr-packages.aspx

If you get the same error using the process I mentioned and that the link above mentions, then it is related to how ConfigMgr is running the command line.

Jeff

March 18th, 2015 2:50pm

Not sure if my post was unclear, but check out this: http://blogs.technet.com/b/configurationmgr/archive/2011/10/13/how-to-quickly-and-easily-test-your-configmgr-packages.aspx

If you get the same error using the process I mentioned and that the link above mentions, then it is related to how ConfigMgr is running the command line.

Jeff

Hi Jeff,

That is for 2012. It looks to be a little different.

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 3:25pm

Yes, the article is for ConfigMgr 2007 but the process for how ConfigMgr installs programs and for troubleshooting are the same in 2012.  My point is that you need to use psexec to run the command line so you can determine if it is an issue running in the SYSTEM context.

Jeff


March 18th, 2015 3:35pm

whats in the execmgr.log file?

This is on the client Windows\CCM\logs

  • Edited by -Richk- 12 hours 6 minutes ago
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 3:38pm

I assume I can do this from CCMCache.

March 18th, 2015 3:41pm

whats in the execmgr.log file?

This is on the client Windows\CCM\logs


Just a 1603 error. The install log for the program just shows it failed with no detail.
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 3:45pm

Yes, provided the folder has the files in it
March 18th, 2015 3:46pm

To add, if this is an MSI being installed, you can add logging to the command line with /l*v <path to log file>.  Then, in the resulting log file, search for Return Value 3.  Just before that it should give you the specifics of what failed.

Jeff

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 3:46pm

It's not an MSI.
March 18th, 2015 3:48pm

A 1603 is an MSI exit code.

So if you are running an exe it has an MSI embedded and it probably extracted to the temp directory.

Grab Pstools and run psexec -i -s cmd.exe

browse to your install dir and run the same command line to install it

before you do that do a whoami and make sure it shows the system account.

http://richardbalsley.com/a-simple-tip-to-test-software-installation-using-the-local-system-account

As Jeff said add logging to the installation and post the log file.

If you search the log for 'Value 3' then just above should be the reason why it fails. 90 % of the time its a custom action.


  • Edited by -Richk- 11 hours 52 minutes ago
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 3:51pm

Yes, the article is for ConfigMgr 2007 but the process for how ConfigMgr installs programs and for troubleshooting are the same in 2012.  My point is that you need to use psexec to run the command line so you can determine if it is an issue running in the SYSTEM context.

Jeff



I can't take a snapshot of my machine. I ran it and it ran fine. I used PSexec and don't see how that helped. Now I have a product installed on my machine manually when I wanted SCCM to install it. By using PSExec.exe the product installed... That's not a very
March 18th, 2015 3:57pm

Using PSexec is a troubleshooting/testing step.  If you used the -s -i parameters for psexec, then the install happened exactly as it does when ConfigMgr runs the program.  The next step is to add the logging to the installation.  Rich's description of the process a few minutes ago is very good.

Also, you could post the command line so we can see what you are actually trying to accomplish. 

Jeff

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 4:01pm

Here is another option.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer]
"Logging"="voicewarmup"

Copy the above into a text file. Rename the file extension to .reg.

Run the .reg file on a new machine.

Clear out the contents of Windows\Temp on new machine.

Deploy the application through SCCM to the new machine.

Retrieve the log file created in Windows\Temp on new machine.

March 18th, 2015 4:01pm

search your log (install log or msi log) for AppData. (I was not able to include the percent symbols). That environment variable is a user path and you will see errors when an installer calls that variable with no user logged in while running your install as SYSTEM. We have seen some installer that call that environment variable fail when this situation occurs. You could test by making sure you are logged in to a machine that failed, and rerunning the advertisement.


  • Edited by mdkelley 11 hours 10 minutes ago
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 4:31pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics