cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to uninstall /all on "On installation Start" from SAP Installation server?

havder
Explorer

Hi,

I'm trying to add a script that uninstalls all old SAP components before installing a new.

I've added a script to "On installation Start" that in essence boils down to this:

strCmdLine = strAppPath + "NwSapSetup.exe /uninstall /all /nodlg /Force /ForceWindowsRestart"

NwEngine.Shell.Execute strCmdLine, vbFalse

This returns error: "An instance of NwSapSetup with Admin rights is already running, going to EXIT"

Any ideas if this is possible and what the script should look like?

boermanjs
Discoverer
0 Kudos

Hi Sam,

I know this is an older question, but I have a similar problem.

Whenever we update the installation server to deploy the latest versions of the SAP GUI and the SAP Business Client, the older version of the Business Client remains and the new one just gets added additionally. I understand that this is by design but it is causing problems with our deployments and we want to simplify the process.

I was experimenting with VBS scripts on the "On Installation Start" section of the Installation Server to to call the silent uninstall command for the older Business Client versions, and like you have run into the "An instance of NwSapSetup with Admin rights is already running, going to EXIT" error.

Have you or perhaps anyone else been successful with perfoming an uninstall this way?

Thank you and regards,

Stephan

havder
Explorer
0 Kudos

Hi boermanjs

I wish I had an answer for you but I think in the end we had to go for a different solution pushing updates via MS Intune. But I can't say for sure, I haven't worked with this in several years so I must admit my memory comes up a bit short.

I hope you figure it out, kind regards,
Sam

Accepted Solutions (0)

Answers (1)

Answers (1)

brian_crane2
Explorer

Realize this is an old post, but to execute an external program, you have to use NwEngine.Shell.ExecuteEx


Sub execApp(cmdLine)
NwEngine.Shell.ExecuteEx "cmd.exe /C """ & cmdLine & """", vbFalse, vbTrue
End Sub