cancel
Showing results for 
Search instead for 
Did you mean: 

SAPGUI 7.10 uninstall issue

Former Member
0 Kudos

I am trying to create a scripted install for the sapgui 7.10.

Currently we have a mixture of previous sapgui versions rolled out and I need to be able to script an uninstall of those prior to installing the 7.10 Gui.

Is there a way to instruct nwsapsetup.exe to remove all previous versions of the application without having to specify package or product details?

With several hundred PC's to upgrade, I think that using the control panel add and remove programs process as indicated in the guide is not really a viable option.

Any Ideas would be gratefully recieved.

Ian

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

We had one of our SMS administrations come up with this solution. for 6.xx use the SapSetup.exe /uninstall required mixing some DLL's to our front-end package and we didn't want to do that. Don't forget to reward points.

item: Set Variable

Variable=ROOTC

Value=C:

end

item: Set Variable

Variable=SAPVERSION

end

'Check for SAP 6.20 Installed

item: Get Registry Key Value

Variable=SAPVERSION

Key=Software\Microsoft\Windows\CurrentVersion\Uninstall\SAPFrontend

Default=Not Found

Value Name=DisplayVersion

Flags=00000100

end

item: If/While Statement

Variable=SAPVERSION

Value=6.20

Flags=00000010

end

item: Display Message

Title English=CenterPoint Energy SAP 710 Installation

Text English=The setup program has detected that your workstation has SAP version 6.20 client installed.

Text English=

Text English=All previous clients must be Uninstalled and your workstation rebooted prior to the Installation of the new client.

Text English=

Text English=Select Yes below to Uninstall the existing client and install the newer 7.10 SAP Client.

Text English=

Text English=NOTE: Your workstation may reboot automatically following the Uninstall (SAPSWEEP) process. If so, rerun the SAP 7.10 Menu pick following your login to Install the new client.

Text English=

Flags=00000100

end

item: Execute Program

Pathname=%INST%\custom\sapsweep.exe

Command Line=/all /y /nocancel /delregkeys

Flags=00000010

end

item: Sleep

Sleep=30000

end

item: Display Message

Title English=CenterPoint Energy SAP 710 Installation

Text English=Your previous SAP client has been Uninstalled.

Text English=

Text English=You MUST reboot your workstation prior to the installation of the new client. Failure to reboot may cause the Installation of the new client to fail.

Text English=

Text English=Please reboot and rerun this setup to Install the new client.

Flags=00000100

end

item: Exit Installation

Variable=0

Flags=0

end

item: End Block

end

'End of SAP 6.20 Installed

'Check for SAP 6.40 Installed

item: Get Registry Key Value

Variable=SAPVERSION

Key=Software\Microsoft\Windows\CurrentVersion\Uninstall\SAPFrontend

Default=Not Found

Value Name=DisplayVersion

Flags=00000100

end

item: If/While Statement

Variable=SAPVERSION

Value=6.40

Flags=00000010

end

item: Display Message

Title English=CenterPoint Energy SAP 710 Installation

Text English=The setup program has detected that your workstation has SAP version 6.40 client installed.

Text English=

Text English=All previous clients must be Uninstalled and your workstation rebooted prior to the Installation of the new client.

Text English=

Text English=Select Yes below to Uninstall the existing client and install the newer 7.10 SAP Client.

Text English=

Text English=NOTE: Your workstation may reboot automatically following the Uninstall (SAPSWEEP) process. If so, rerun the SAP 7.10 Menu pick following your login to Install the new client.

Text English=

Flags=00000100

end

item: Execute Program

Pathname=%INST%\custom\sapsweep.exe

Command Line=/all /y /nocancel /delregkeys

Flags=00000010

end

item: Sleep

Sleep=30000

end

item: Display Message

Title English=CenterPoint Energy SAP 710 Installation

Text English=Your previous SAP client has been Uninstalled.

Text English=

Text English=You MUST reboot your workstation prior to the installation of the new client. Failure to reboot may cause the Installation of the new client to fail.

Text English=

Text English=Please reboot and rerun this setup to Install the new client.

Flags=00000100

end

item: Exit Installation

Variable=0

Flags=0

end

item: End Block

end

'End of SAP 6.40 Installed

'Start SAP 7.10 Installation

item: Display Message

Title English=CenterPoint Energy SAP 710 Installation

Text English=Select Yes below to begin the SAP 710 GUI client installation.

Text English=

Text English=You will be notified when setup is complete.

Text English=

Text English=NOTE: Please exit all SAP applications before proceeding.

Flags=00000101

end

item: Check if File/Dir Exists

Pathname=%ROOTC%\Documents and Settings\All Users\Start Menu\Programs\SAP Front End\SAP Patch Update.lnk

Flags=00000100

end

item: Delete File

Pathname=%ROOTC%\Documents and Settings\All Users\Start Menu\Programs\SAP Front End\SAP Patch Update.lnk

end

item: End Block

end

item: Check if File/Dir Exists

Pathname=%ROOTC%\Documents and Settings\All Users\Start Menu\Programs\SAP Front End\SAP Configuration Update.url

Flags=00000100

end

item: Delete File

Pathname=%ROOTC%\Documents and Settings\All Users\Start Menu\Programs\SAP Front End\SAP Configuration Update.url

end

item: End Block

end

item: Execute Program

Pathname=%INST%\setup\nwsapsetup.exe

Command Line=/NoDlg /Package="CNP"

Flags=00000010

end

item: Copy Local File

Source=%INST%\custom\saplogon.ini

Destination=%WIN%\saplogon.ini

Flags=0000000001100010

end

item: Copy Local File

Source=%INST%\custom\sapmsg.ini

Destination=%WIN%\sapmsg.ini

Flags=0000000001100010

end

item: Copy Local File

Source=%INST%\custom\sapdoccd.ini

Destination=%WIN%\sapdoccd.ini

Flags=0000000001100010

end

item: Sleep

Sleep=10000

end

item: Set Variable

Variable=LINEVAR

end

item: Set Variable

Variable=SAPPORT

end

item: Set Variable

Variable=SAPNAME

end

item: Read/Update Text File

Variable=LINEVAR

Pathname=%INST%\custom\services

end

item: If/While Statement

Variable=LINEVAR

Value=sap

Flags=00000010

end

item: Parse String

Source=%LINEVAR%

Pattern=

Variable1=SAPNAME

Variable2=SAPPORT

end

item: Insert Line into Text File

Pathname=%SYS32%\drivers\etc\services.tp2

New Text=%LINEVAR%

Search Text=%SAPNAME%

Line Number=0

Flags=00001000

end

item: End Block

end

item: End Block

end

item: Delete File

Pathname=%SYS32%\drivers\etc\services

end

item: Rename File/Directory

Old Pathname=%SYS32%\drivers\etc\services.tp2

New Filename=services

end

item: Copy Local File

Source=%INST%\patches\sapbex.xla

Destination=%PROGRAM_FILES%\Common Files\SAP Shared\BW\sapbex.xla

Flags=0000000001100010

end

item: Display Message

Title English=CenterPoint Energy SAP 7.10 Installation

Text English=The SAP 7.10 GUI client installation is now complete.

Flags=00100100

end

item: Self-Register OCXs/DLLs

Description English=Updating System Configuration, Please Wait...

end

item: End Block

end

'End of SAP 7.10 Install

Former Member
0 Kudos

Hi Dan,

I seem to have the same problem. Just wanted a few clarifications.

1. where sis u guys put the script? is a batch file or on the instalation server "On Begin Install" for the package

2. I am trying to copy a custom saplogon.ini file to my user machines when they either do a new installtion or an upgrade and am using

strSrcFile = NwEngine.Variables.ResolveString("%SapSrcDir%\custom\saplogon.ini")

strDstFile = "%WINDIR%\saplogon.ini"

NwEngine.Shell.CopyFileEx szSrcFile, szDstFile, vbTrue

but this does not work, here I assume %SapSrcDir% is the directory where NwSapSetup.exe is in.

Thanks

Cedric

Former Member
0 Kudos

Looks like this thread is pretty old, but I think you would find the result you are looking for by creating the directory "custom" in the same level as the "setup" directory which contains the NwSapSetup.exe.

I use the same script (using the directory "Files" instead of "custom") , plus the additional for adding the services file.

NwEngine.Context.Log.Write "Event: Copying customized SapLogon.ini"

strSrcFile = NwEngine.Variables.ResolveString("%SapSrcDir%\Files\SapLogon.ini")

strDstFile = NwEngine.Variables.ResolveString("%WinDir%\SapLogon.ini")

If NwEngine.Shell.FileExist( strSrcFile ) Then

NwEngine.Shell.CopyFile strSrcFile, strDstFile

End If

NwEngine.Context.Log.Write "Event: Copying customized services file"

If NwEngine.Shell.FileExist("%SAPSrcDir%\Files\services") Then

NwEngine.Shell.CopyFile "%SAPSrcDir%\Files\services", "%WinSysDir%\drivers\etc\services"

End If

Former Member
0 Kudos

Hi Ian,

the 7.10 setup removes previous installations of SAP GUI by itself. No need for any scripting...

Peter

Former Member
0 Kudos

The folders and files are still there from previous installations. On our test PC we end up with a 6.20 folder, a 6.40 folder and a 7.10 folder all containing the previous installed files. Unfortunately this is not acceptable.

I'm sure with previous versions of sapsetup using the /uninstall /silent would strip out all previous versions but the nwsapsetup delivered with sapgui 7.10 does not appear to do this on our testbed. Reading the guide it suggests you must supplu the package or product details specifically to remove a sapgui installation which does not work so well when we have multiple versions installed.

Ian

Former Member
0 Kudos

Hi Ian,

strange...for us it worked flawless on 500+ upgrades (mainly from 6.20 but some 6.40 too). Must have to do with your environment.

I never used it, but did you look at 'sapsweep'? Should be on the 6.40 installation DVD.

Peter

Former Member
0 Kudos

I think we have sussed it. We installed the 7.10 gui without first removing the previous version. If we run the uninstaller first it removed the previoue version. If we dont then it doesn't.

Thanks for all the help. We are looking at the sapsweep option as well as we have asmall number of machines with failed installs that might be cleaned up ready for the new roll out.

Many thanks

Ian

Former Member
0 Kudos

Hello Ian,

we did use sapsweep in setup script for rolling out sapgui 620. We had GUI46, GUI610 and sapsweep was good at getting rid of those. But take care, because as far as I remember it may also delete your saplogon.ini file.

The script was a Windows CMD.exe script, which we put in the logon script for the affected users.

I have tried sapsweep on a GUI710. That leaves a lot of things behind, so I wouldnt recommend that.

We plan to roll out GUI710 using Microsoft SMS, trying it just now. All GUIs are 620 now so it should be OK.

regards

BennyA

Former Member
0 Kudos

Hello Ian,

Sorry for getting into this conversation, i need help with some other thing

there's a template for SAP B1 addons Documentation

i don't realy understan how to use it

could u please help me?

best regards,

Gabriela