Forums

Microsoft Office 2010 Volume Activation

Auteur Réponses
Jump to the page: 1 - 2
michsens Mardi 26 Juin 2012 à 20:39
michsensAnonymous

Okay, the installation in a new prefix was just an idea.

The thing with the "eval_gettext" I'll try to remember next time. So it was my first POL script and also my first thread.

The dirty code does create a .reg file. This file then is permanent created within the prefix and is used before one of the office executables is used.
With the "sed" command the variable "VLRenewalSchedule" of the user.reg should be copied and directly added into the new .reg file "VLRenew.reg". Since "sed" is directly included into the kernel and in the form I used it also completely usable in MAC-OS I thought this is a good idea. How else could this be done?
Quentin PÂRIS Mercredi 27 Juin 2012 à 0:19
Quentin PÂRISAnonymous

We could generate a .reg file and apply it each time before running Office 2k10 ?
michsens Mercredi 27 Juin 2012 à 8:25
michsensAnonymous

Why? Are there any advantages of this? This .reg file is always the same and by the way it does not hurt anybody I think.
Quentin PÂRIS Mercredi 27 Juin 2012 à 10:21
Quentin PÂRISAnonymous

This .reg file is always the same.

Quote from michsens

It's not proved.

Another issue is that sed does not really work so much on OSX, so we prefer avoid to use it.

Eventually, I can ask you the same question: Why using sed while there is a clean tool in wine to perform such a thing?
michsens Lundi 23 Juillet 2012 à 15:37
michsensAnonymous

Is there a clean POL function for removing prefix and all shortcuts?
michsens Lundi 23 Juillet 2012 à 16:29
michsensAnonymous

Hello.
Sorry for leaving the discussion for a while now, but I had plenty of stuff to do the last few weeks.

Well, I tried to insert all your comments in the MSO2010 installation script. I also noticed that the line to generate the .reg file we were discussing before is not necessary.
Here is the result of the new script:


#!/bin/bash
# Author : Tinou

## CHANGELOG
# (2012-05-05 - 14:45) Quentin PÂRIS - Wine version set to 1.5.3, Outlook 2010 compatiblity
# (2012-05-05 - 15:05) Quentin PÂRIS
#        Check winbind presence on Linux, required to install
#        Adding gettext support
# (2012-05-12 - 18:36) Quentin PÂRIS
#        Requires 4.0.18
# (2012-06-25 - 17:56) Robert Paulo
#        Adding activation procedure
#        Adding KMS activation

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

PREFIX="Office2010"
WINEVERSION="1.5.3"
TITLE="Microsoft Office 2010"

shortcutWord="Microsoft Word 2010"
shortcutExcel="Microsoft Excel 2010"
shortcutPowerpoint="Microsoft Powerpoint 2010"
shortcutOneNote="Microsoft OneNote 2010"
shortcutOutlook="Microsoft Outlook 2010"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/Office/top.jpg" "http://files.playonlinux.com/resources/setups/Office/left.png" "$TITLE"


POL_SetupWindow_Init

POL_SetupWindow_presentation "$TITLE" "Microsoft" "http://www.microsoft.com" "Quentin PÂRIS" "$PREFIX"

POL_RequiredVersion 4.0.18 || POL_Debug_Fatal "$TITLE won't work with $APPLICATION_TITLE $VERSION\\nPlease update"

if [ "$POL_OS" = "Linux" ]; then
        wbinfo -V || POL_Debug_Fatal "Please install winbind before installing $TITLE"
fi
POL_Debug_Init
POL_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"

if [ "$(POL_Wine_PrefixExists "$PREFIX")" == "True" ]; then
	POL_SetupWindow_menu "$(eval_gettext 'Wineprefix $PREFIX already exists!!!\\n\\nWhat would you prefer to do?')" "$TITLE" "Reinstall $TITLE~~~Activate installed $TITLE" "~~~"
	performAction="$APP_ANSWER"
else
	performAction="Install $TITLE in new wineprefix"
fi

if [ "$performAction" != "Activate installed $TITLE" ]; then

	if [ "$performAction" == "Reinstall $TITLE" ]; then
		POL_SetupWindow_question "$(eval_gettext 'Do you really want to delete wineprefix $PREFIX?\\n')" "$TITLE"
		if [ "$APP_ANSWER" == "TRUE" ]; then
			rm -Rf "$POL_USER_ROOT//wineprefix/$PREFIX/"
			rm "$POL_USER_ROOT//shortcuts//$shortcutWord"
			rm "$POL_USER_ROOT//shortcuts//$shortcutExcel"
			rm "$POL_USER_ROOT//shortcuts//$shortcutPowerpoint"
			rm "$POL_USER_ROOT//shortcuts//$shortcutOneNote"
			rm "$POL_USER_ROOT//shortcuts//$shortcutOutlook"
		fi
	fi


	POL_Wine_PrefixCreate "$WINEVERSION"
	POL_SetupWindow_cdrom

	POL_SetupWindow_check_cdrom "x86/setup.exe" "setup.exe"

	cd "$CDROM"

	Set_OS win7

	POL_Call POL_Install_dotnet20

	POL_Wine_WaitBefore "$TITLE"
	cd "$CDROM"
	POL_Wine "$CDROM_SETUP"
	POL_Wine_WaitExit "$TITLE"
	sleep 10

	POL_Call POL_Install_msxml6
	POL_Call POL_Function_OverrideDLL native riched20 msxml6
	POL_Call POL_Function_OverrideDLL native,builtin urlmon

	POL_Shortcut "WINWORD.EXE" "$shortcutWord"
	POL_Shortcut "EXCEL.EXE" "$shortcutExcel"
	POL_Shortcut "POWERPNT.EXE" "$shortcutPowerpoint"
	POL_Shortcut "ONENOTE.EXE" "$shortcutOneNote"
	POL_Shortcut "OUTLOOK.EXE" "$shortcutOutlook"

 	POL_Extension_Write doc "$shortcutWord"
 	POL_Extension_Write docx "$shortcutWord"
 	POL_Extension_Write xls "$shortcutExcel"
 	POL_Extension_Write xlsx "$shortcutExcel"
 	POL_Extension_Write ppt "$shortcutPowerpoint"
 	POL_Extension_Write pptx "$shortcutPowerpoint"

	POL_SetupWindow_message "$(eval_gettext '$TITLE has been installed successfully\\n\\nIf an installation Windows prevent your programs from running, restart the script and choose option "Reinstall $TITLE"!')" "$TITLE"

	POL_SetupWindow_question "$(eval_gettext 'Do you want to activate your $TITLE?\\n\\nYou can also skip this step and activate $TITLE\\nlater by restarting this script.')" "$TITLE"
	activateMSOffice="$APP_ANSWER"
else
	activateMSOffice="TRUE"
fi

if [ "$activateMSOffice" == "TRUE" ]; then
	POL_Wine_SelectPrefix "$PREFIX"
	POL_SetupWindow_menu "$(eval_gettext 'Which type of activation?')" "$TITLE" "Volume Activation (KMS)~~~Skip activation" "~~~"
	if [ "$APP_ANSWER" == "Volume Activation (KMS)" ]; then
		dataCorrect="FALSE"
		while [ "$dataCorrect" != "TRUE" ]; do
			licenseServerName=""
			POL_SetupWindow_textbox "$(eval_gettext 'Insert address of license server!')" "$TITLE"
			licenseServerName=$APP_ANSWER
			POL_SetupWindow_textbox "$(eval_gettext 'Insert port of license server!')" "$TITLE"
			licenseServerPort=$APP_ANSWER

			POL_SetupWindow_question "$(eval_gettext 'Are the data for the license server correct?\\nCan these values be added to the registry?\\n\\nLicense server name: $licenseServerName\\nLicense server port: $licenseServerPort')" "$TITLE"
			dataCorrect=$APP_ANSWER
		done
		cd "$POL_USER_ROOT//wineprefix/$PREFIX/"
		# copy registry value from user.reg
		echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Microsoft\\\\OfficeSoftwareProtectionPlatform]" > VLKMSServ.reg
		echo "\\"KeyManagementServiceName\\"=\\"$licenseServerName\\"" >> VLKMSServ.reg
		echo "\\"KeyManagementServicePort\\"=\\"$licenseServerPort\\"" >> VLKMSServ.reg

		POL_Wine regedit VLKMSServ.reg
		sleep 2
		rm VLKMSServ.reg
		POL_SetupWindow_message "$(eval_gettext '$TITLE should be activated now.\\nMaybe two starts of $TITLE are necessary:\\nOne for initialising and one for registration.\\n\\nJust start, close and restart $TITLE!')" "$TITLE"
	elif [ "$APP_ANSWER" == "Volume Activation (MAK)" ]; then
		echo
	fi
fi

POL_SetupWindow_Close
exit



I made all possible tests and found no further problems.
But please, tell me if modification has to be done.

Greetings,

Robert.

Edité par michsens

Quentin PÂRIS Lundi 23 Juillet 2012 à 16:43
Quentin PÂRISAnonymous

Be careful, I've changed things in the script since the last post :)
michsens Lundi 23 Juillet 2012 à 19:00
michsensAnonymous

Okay, inserted your changes. Further remarks?
Quentin PÂRIS Lundi 23 Juillet 2012 à 20:12
Quentin PÂRISAnonymous

Another idea (sorry for always changing my mind)

Why not making a separate script for activation? So that people could see directly it
michsens Mardi 24 Juillet 2012 à 8:31
michsensAnonymous

Hm, yes this might help people to find the activation easier. But then we should also find people who have time to extend this script for different other activation procedures. I can prepare this script and give possibilities to extend it. If only KMS volume activation is possible the script should only get this name.
If someone who read this threat know some activation procedures beside KMS volume activation, please let me know!
I only need to know what has to be done. Programming then is not a big deal.
michsens Mardi 24 Juillet 2012 à 8:45
michsensAnonymous

Kicked out everything that does not belong to activation the script looks like following:



#!/bin/bash
# Author : Robert Paulo

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

PREFIX="Office2010"
WINEVERSION="1.5.3"
TITLE="Microsoft Office 2010"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/Office/top.jpg" "http://files.playonlinux.com/resources/setups/Office/left.png" "$TITLE"

POL_SetupWindow_Init

POL_SetupWindow_presentation "$TITLE" "Microsoft" "http://www.microsoft.com" "Quentin PÂRIS" "$PREFIX"

POL_RequiredVersion 4.0.18 || POL_Debug_Fatal "$TITLE won't work with $APPLICATION_TITLE $VERSION\\nPlease update"

if [ "$POL_OS" = "Linux" ]; then
        wbinfo -V || POL_Debug_Fatal "Please install winbind before installing $TITLE"
fi
POL_Debug_Init
POL_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"

if [ "$(POL_Wine_PrefixExists "$PREFIX")" == "True" ]; then
	POL_SetupWindow_menu "$(eval_gettext 'Which type of activation?')" "$TITLE" "Volume Activation (KMS)~~~Skip activation" "~~~"
	if [ "$APP_ANSWER" == "Volume Activation (KMS)" ]; then
		dataCorrect="FALSE"
		while [ "$dataCorrect" != "TRUE" ]; do
			licenseServerName=""
			POL_SetupWindow_textbox "$(eval_gettext 'Insert address of license server!')" "$TITLE"
			licenseServerName=$APP_ANSWER
			POL_SetupWindow_textbox "$(eval_gettext 'Insert port of license server!')" "$TITLE"
			licenseServerPort=$APP_ANSWER

			POL_SetupWindow_question "$(eval_gettext 'Are the data for the license server correct?\\nCan these values be added to the registry?\\n\\nLicense server name: $licenseServerName\\nLicense server port: $licenseServerPort')" "$TITLE"
			dataCorrect=$APP_ANSWER
		done
		cd "$POL_USER_ROOT//wineprefix/$PREFIX/"
		# copy registry value from user.reg
		echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Microsoft\\\\OfficeSoftwareProtectionPlatform]" > VLKMSServ.reg
		echo "\\"KeyManagementServiceName\\"=\\"$licenseServerName\\"" >> VLKMSServ.reg
		echo "\\"KeyManagementServicePort\\"=\\"$licenseServerPort\\"" >> VLKMSServ.reg

		POL_Wine regedit VLKMSServ.reg
		sleep 2
		rm VLKMSServ.reg
		POL_SetupWindow_message "$(eval_gettext '$TITLE should be activated now.\\nMaybe two starts of $TITLE are necessary:\\nOne for initialising and one for registration.\\n\\nJust start, close and restart $TITLE!')" "$TITLE"
	elif [ "$APP_ANSWER" == "Volume Activation (MAK)" ]; then
		echo
	fi
else
	POL_SetupWindow_message "$(eval_gettext 'No $TTILE installation found.\\n\\nPlease use the $TITLE installation script!')" "$TITLE"
fi	

POL_SetupWindow_Close
exit


Edité par michsens

Quentin PÂRIS Mardi 24 Juillet 2012 à 9:16
Quentin PÂRISAnonymous

Ok it looks good! Just check that office 2k10 is installed and then you can send it to validation :)
michsens Mardi 24 Juillet 2012 à 9:53
michsensAnonymous

Oh, right. I deleted too much. How can I send it to validation?
michsens Mardi 24 Juillet 2012 à 9:59
michsensAnonymous

Okay. Changed it.
Quentin PÂRIS Mardi 24 Juillet 2012 à 10:16
Quentin PÂRISAnonymous

http://www.playonmac.com/repository
michsens Mardi 24 Juillet 2012 à 10:17
michsensAnonymous

Thanks.
Quentin PÂRIS Mardi 24 Juillet 2012 à 10:26
Quentin PÂRISAnonymous

Thank you for your work :)
sonigajanand Jeudi 26 September 2013 à 12:54
sonigajanandAnonymous

Since MS Office deletes the key "[HKEY_USERS\S-1-5-20\Software\Microsoft\OfficeSoftwareProtectionPlatform]" after every shutdown I modified the Shortcut of each Office 2010 Product that can be run under Wine:

#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/paulo/.PlayOnLinux//wineprefix/Office2010"
export WINEDEBUG="-all"
#POL_Log=Microsoft Office 2010

cd "/home/paulo/.PlayOnLinux//wineprefix/Office2010/"
echo "[HKEY_USERS\\S-1-5-20\\Software\\Microsoft\\OfficeSoftwareProtection]" > VLRenew.regedit
sed -n -e '/VLRenewalSchedule/,/^$/p' user.reg >> VLRenew.reg
echo "\"Enable\"=\"Y\"" >> VLRenew.reg
POL_Wine regedit.exe VLRenew.reg
sleep 2

cd "/home/paulo/.PlayOnLinux//wineprefix/Office2010/drive_c/./Program Files/Microsoft Office/Office14"
if [ -z "$@" ]; then
     POL_Wine "WINWORD.EXE"
else
     POL_Wine "WINWORD.EXE" z:"${@//\//\\}"
fi


For running Excel, Outlook, OneNote, and Powerpoint change the last lines to the specific executables. By the way, the last lines are very helpful when you want to start Office files out of any linux file browser. Otherwise in my case some errors were prompted by MS Office 2010.

Quote from michsens
edersongs Samedi 5 Octobre 2013 à 12:49
edersongsAnonymous

Since MS Office deletes the key "[HKEY_USERSS-1-5-20SoftwareMicrosoftOfficeSoftwareProtectionPlatform]" after every shutdown I modified the Shortcut of each Office 2010 Product that can be run under Wine:

#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/paulo/.PlayOnLinux//wineprefix/Office2010"
export WINEDEBUG="-all"
#POL_Log=Microsoft Office 2010

cd "/home/paulo/.PlayOnLinux//wineprefix/Office2010/"
echo "[HKEY_USERS\S-1-5-20\Software\Microsoft\OfficeSoftwareProtection]" > VLRenew.regedit
sed -n -e '/VLRenewalSchedule/,/^$/p' user.reg >> VLRenew.reg
echo ""Enable"="Y"" >> VLRenew.reg
POL_Wine regedit.exe VLRenew.reg
sleep 2

cd "/home/paulo/.PlayOnLinux//wineprefix/Office2010/drive_c/./Program Files/Microsoft Office/Office14"
if [ -z "$@" ]; then
     POL_Wine "WINWORD.EXE"
else
     POL_Wine "WINWORD.EXE" z:"${@////\}"
fi


For running Excel, Outlook, OneNote, and Powerpoint change the last lines to the specific executables. By the way, the last lines are very helpful when you want to start Office files out of any linux file browser. Otherwise in my case some errors were prompted by MS Office 2010.

Quote from sonigajanand

Quote from michsens



I Was thinking about how can I use this script to start Office 2010 I have under wine without POL. My Office 2010 works nice but I can't activate it. It's installed in a wineprefix at: $HOME/.local/share/wineprefixes/office2010pro/
I call it with this script:

#!/bin/bash
# Word 2010
env WINEPREFIX="$HOME/.local/share/wineprefixes/office2010pro" wine C:\\windows\\command\\start.exe /Unix $HOME/.local/share/wineprefixes/office2010pro/dosdevices/c:/Program\ Files/Microsoft\ Office/Office14/WINWORD.EXE
#
done
exit 0;

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com