Hello. I created a package that will be distributed through SCCM and needs to have some files copied to the user's profile, therefore I created an active setup to perform that action. I'm having an issue however, after installing my package and rebooting, the active setup runs(the keys for active setup under HKCU are created) but the files are not copied. now, if I just delete the active setup keys from HKCU and reboot again, the files are copied successfully this second time, even though I didn't change anything in the active setup commands. do you have any ideas why this might be happening?
thank you in advance
Answer Summary:
Cancel
1 Comment   [ + ] Show Comment

Comments

  • these are pretty much the keys I used for the active setup:

    REG ADD "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\remfiles" /v StubPath /t REG_SZ /d "cmd.exe /C del /s /q /f %userprofile%\AppData\Roaming\SAP\Common\*" /f

    REG ADD "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\remfiles" /v Version /t REG_SZ /d "1.0" /f

    REG ADD "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\mkdir" /v StubPath /t REG_SZ /d "cmd.exe /C mkdir %userprofile%\AppData\Roaming\SAP\Common" /f

    REG ADD "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\mkdir" /v Version /t REG_SZ /d "1.0" /f

    REG ADD "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\copyfile1" /v StubPath /t REG_SZ /d "cmd.exe /C copy /Y C:\temp\SAPUILandscape.xml %userprofile%\AppData\Roaming\SAP\Common\SAPUILandscape.xml" /f

    REG ADD "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\copyfile1" /v Version /t REG_SZ /d "1.0" /f

    REG ADD "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\copyfile2" /v StubPath /t REG_SZ /d "cmd.exe /C copy /Y C:\temp\SAPUILandscapeGlobal.xml %userprofile%\AppData\Roaming\SAP\Common\SAPUILandscapeGlobal.xml" /f

    REG ADD "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\copyfile2" /v Version /t REG_SZ /d "1.0" /f
    • Don't do in this way.. Why do you need 4 ActiveSetup? Put everything in one script and call that script via one ActiveSetup..
Please log in to comment

Answer Chosen by the Author

1
Though you have created 4 ActiveSetup keys one after another, it will not be executed in the same order.

Create a single .vbs or .cmd file which perform all your tasks and then call that .vbs/.cmd file though single ActiveSetup key..

First manually check whether your script is working as expected when you execute it for the first time (before executing it just ensure taht there no application specific folders are created under userprofile, when you launch the shortcut, some application creates it's folder structure under userprofile. So, you have to check whether your script is working as expected before those folder structures are getting created)


Answered 08/17/2015 by: jagadeish
Red Belt

  • between.. you don't have to reboot the machine to check whether Active Setup is executed or not.. Just a log off is enough (infact restarting explorer.exe is enough).. don't do switch user... you have to log off and log in (explorer.exe has to be restarted)
    • thank you so much jagadeish. I will try to create a single active setup that runs everything then. appreciate it!
Please log in to comment

Community Chosen Answer

2
No! *Don't* create a VBS or CMD! Do the job properly instead!

Create a feature called...oooh, I don't know...'CurrentUser'. Create components for that feature which contains the user-level folders & files.

Make the new feature the parent of the feature which contains the HKLM Active Setup (AS) stuff.

Change your AS stub path so that it runs a repair: MSIEXEC /fup {ProductCode}

I think that's everything.
Answered 08/18/2015 by: VBScab
Red Belt

  • Thank you VBScab! I have tried to just fix the msi before, but there are a lot of permissions issues in this account, so for a standard user the fix just won´t happen :S
Please log in to comment

Answers

1
Hi,
do not use a repackaging tool for SAP GUI. Use the inbuilt tools, i.e. the SAP deployment server to create an installation package, which in turn can be created as a standalone installer (exe). Using the the SAP package designer you can even add the various pre-post installation actions that are normally required.
See http://scn.sap.com/docs/DOC-29257 for more info (might be for the 7.3x but the principle remains the same)
Answered 08/18/2015 by: Pressanykey
Red Belt

  • awesome! thank you so much Pressanykey. I used NwSapSetupAdmin.exe to create a package and the installation using NwSapSetup.exe with the package and the silent command is working great for me. great document!
Please log in to comment
0
A single script launched by ONE active setup key is the only reliable solution. It is possible to set an order for the execution of active setup keys but why expose yourself to all that pain.

Answered 08/18/2015 by: EdT
Red Belt

Please log in to comment
0
Permissions issues? What do you mean?!?

You cannot package with a standard account, period. If you're trying, stop.

If you mean that there are permissions issues when the package repairs, then you clearly have machine-level stuff mixed in with user-level stuff. Your ICE validation would've shown you that, though.
Answered 08/18/2015 by: VBScab
Red Belt

  • no, we do package with admin accounts. for this package I didn't create a MSI installation, it just couldn't be done, I tried to perform a capture with repackager but when trying to install the MSI I just got a bunch of errors. it's for SAP GUI 74 and I read in a SAP forum that this installer cannot be captured, so I just went with the commands for the silent install.
Please log in to comment
0
The Repackager - with all due respect - isn't designed for heavy-duty work and SAP GUI is a monster.

Get a proper packaging tool. These days, that means InstallShield.
Answered 08/18/2015 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share