/build/static/layout/Breadcrumb_cap_w.png

Issue with 1605 error in SCCM causing programs to stop

Hi all

i am trying to uninstall 3 previous versions of a program which could be on machines prior to installing a new one

i have one program created in sccm 2007 which is the new install, before that runs it is set to run a bat file which simply executes

msiexec.exe /x {1110000-111000--11100011---} /qn
msiexec.exe /x {1110000-111000--11100011---} /qn
msiexec.exe /x {1110000-111000--11100011---} /qn

they are just example codes

 

the issue i am getting is im not worried if they arent installed i just want them to skip and continue and remove them if they are present, but non of the old versions are present on my test machine and when deploying in sccm its failing at the uninstall.bat phase with 1605 - only valid for products installed and not running the install.

can anyone suggest a way to skip these processes only if they are installed and still run the other program as im stumped with this?

thanks

 


0 Comments   [ + ] Show comments

Answers (4)

Posted by: jaybee96 12 years ago
Red Belt
2

populate the Upgrade table of the new version and that installation will take care of the uninstall's of any previous version.

 

http://msdn.microsoft.com/en-us/library/windows/desktop/aa369786(v=vs.85).aspx 

 


Comments:
  • When futzing with upgrades, be mindful of where the RemoveExistingProduct standard action is positioned. - anonymous_9363 12 years ago
Posted by: piyushnasa 12 years ago
Red Belt
2

You can first check for the products uninstall registry key and if present, only then run the uninstall command.. This can be easily done in batch or vbscript.

Posted by: jagadeish 12 years ago
Red Belt
2

Can you try this..

CLS

GoTo CheckPreviousVersion01

:CheckPreviousVersion01
Reg Query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\{1110000-111000-11100011---}"
CLS
If %ErrorLevel%==0 GoTo UninstallPreviousVersion01
GoTo CheckPreviousVersion02

:UninstallPreviousVersion01
REM Uninstalling ........
Start /Wait msiexec.exe /x {1110000-111000--11100011---} /qb!


:CheckPreviousVersion02
Reg Query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\{1110000-111000-11100011---}"
CLS
If %ErrorLevel%==0 GoTo UninstallPreviousVersion02
GoTo CheckPreviousVersion03

:UninstallPreviousVersion02

REM Uninstalling ........

Start /Wait msiexec.exe /x {1110000-111000--11100011---} /qb!


:CheckPreviousVersion03
Reg Query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\{1110000-111000--11100011---}"
CLS
If %ErrorLevel%==0 GoTo UninstallPreviousVersion03
GoTo InstallNewVersion

:UninstallPreviousVersion03

REM Uninstalling .......

Start /Wait msiexec.exe /x {1110000-111000--11100011---} /qb!
 

:InstallNewVersion
Echo Uninstall is Complete.
Echo Installing the new version...
Start /Wait msiexec.exe /i "%~dp0LatestVersion.msi" /qb!


Comments:
  • hi thanks for this
    found something similar
    but sccm still reported and error
    way round it to add exit to my bat file with the parameters /b 0 - keane2012 12 years ago
Posted by: dunnpy 12 years ago
Red Belt
1

From an SCCM point of view (not the MSI package) you could create a task sequence to run all your items. Remove the 3 uninstalls from the batch file, and add each one as a task in the sequence along with your install.

You could then set continue on error on the steps that may cause problems, so the sequence will run and result in the new product installed, after removing all previous - if present.

The MSI upgrade method is the best approach, but my suggestion is another approach that may work for your situation.

Hope that helps,

Dunnpy


Comments:
  • Hi Dunpy
    the above doesnt work already tried that, it errored with 1605 "only valid for products installed"
    the way i got it to work was to run the batch file with a check and force the error code using exit /b o
    that way sccm pushed onto the next program

    its the first time i have come across programs not moving on and running the next, it should have ran through the batch file and just not uninstalled it, but was producing an error 1605
    forcing 0 let it then run the next bit - keane2012 12 years ago
    • In the Task Sequence for each Run Command line, add 1605 to the list of Success Codes. You can also check the box to Continue on Error - theChad 10 years ago
 
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