วันอาทิตย์ที่ 10 พฤษภาคม พ.ศ. 2563

Vmware-OVF convert

Deploy OVA file to VMware ESXi 5.5
https://felixcentmerino.wordpress.com/virtualization/migrate-virtual-machine-from-oracle-virtualbox-to-esxi-5-5/


1.download ovftool 3.5

C:\Program Files\VMware\VMware OVF Tool> ovftool.exe --shaAlgorithm=SHA1 c:\vmbox\aa.ova  c:\vmbox\bb.ovf


2.edit c:\vmbox\bb.ovf

Before


After




3. Microsoft File Checksum Integrity Verifier

fciv.exe -sha1 c:\odoo.ovf
copy sha1 to c:\vmbox\bb.mf




Bitnami

#Network

cd /etc/systemd/network
sudo cp 99-dhcp.network 25-wired.network


[Match]
Name=ens160

[Network]
Address=10.1.10.9/24
Gateway=10.1.10.1
DNS=10.1.10.1


#User login

cat /home/bitnami/bitnami_credentials

วันพุธที่ 6 พฤษภาคม พ.ศ. 2563

SAP 760

@echo off

set wdf="C:\Users\Default\AppData\Roaming"
set wcf="%AppData%"
set host1=%C:\Windows\System32\drivers\etc\hosts%
set host2=%C:\Windows\System32\drivers\etc\hosts_"%date:~10,4%.%date:~7,2%.%date:~4,2%-%time:~1,1%h%time:~3,2%m%time:~6,2%s"%

REM  #Config_Service_File
echo sapmsMH2 3600/tcp >>C:\Windows\System32\drivers\etc\services

REM #Config_Host_file
    ren %host1% %host2%
    del C:\Windows\System32\drivers\etc\hosts
echo 10.61.10.27 mhpfs >>C:\Windows\System32\drivers\etc\hosts
echo 10.61.10.81 homail1 >>C:\Windows\System32\drivers\etc\hosts
echo 10.61.10.82 hofax1 >>C:\Windows\System32\drivers\etc\hosts
echo 10.61.20.81 mf12mail >>C:\Windows\System32\drivers\etc\hosts
echo 10.61.30.81 mf13mail >>C:\Windows\System32\drivers\etc\hosts

del /q %wdf%\SAP\Common
del /q %wcf%\SAP\Common
mkdir %wdf%\SAP\Common
mkdir %wcf%\SAP\Common

REM #Create_SAPUILandscape.xml_on_%temp%
Type Nul >"%TEMP%"\SAPUILandscape.xml
echo ^<^?xml version="1.0" encoding="utf-8"^?^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Landscape updated="2019-08-22T06:18:28Z" version="1" generator="SAP GUI for Windows v7600.1.2.149"^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Workspaces^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Workspace uuid="6a4d9ada-fe04-433e-8add-1d608fe40580" name="Local"^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Item uuid="9d6ad04b-e5ca-48ae-a37a-536cd51e7c3b" serviceid="a8f71781-ac36-49e7-a433-6b58797a27f2"/^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Item uuid="0d64788e-96e1-45e3-9cac-ff94c7c97a31" serviceid="edc1f359-df3f-4577-85ad-ade6abe44954"/^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Item uuid="e9cd0bc8-8f57-4d93-9201-7f8c4577de5e" serviceid="f6130feb-f311-4039-880e-c5aa71268a0c"/^> >>"%TEMP%"\SAPUILandscape.xml
echo ^</Workspace^> >>"%TEMP%"\SAPUILandscape.xml
echo ^</Workspaces^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Services^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Service type="SAPGUI" uuid="a8f71781-ac36-49e7-a433-6b58797a27f2" name="SAP .DEV" systemid="MH2" mode="1" server="10.30.2.104:3200" sncop="-1" sapcpg="8600" dcpg="8604" clocale="TH"/^>  >>"%TEMP%"\SAPUILandscape.xml
    echo ^<Service type="SAPGUI" uuid="5f11af05-d005-4d70-bae2-469daecf3441" name="SAP .RQA" systemid="MH2" mode="1" server="10.50.2.104:3200" sncop="-1" sapcpg="1100" dcpg="8604" clocale="TH"/^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Service type="SAPGUI" uuid="edc1f359-df3f-4577-85ad-ade6abe44954" name="SAP Production 2" systemid="MH2" mode="1" server="10.50.2.102:3200" sncop="-1" sapcpg="8600" dcpg="8604" clocale="TH"/^>  >>"%TEMP%"\SAPUILandscape.xml
echo ^<Service type="SAPGUI" uuid="f6130feb-f311-4039-880e-c5aa71268a0c" name="SAP Production 1" systemid="MH2" msid="014d41e4-f609-4997-9889-e7da68091764" server="MHP" sncop="-1" sapcpg="8600" clocale="TH" dcpg="8604"/^> >>"%TEMP%"\SAPUILandscape.xml
echo ^</Services^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Messageservers^> >>"%TEMP%"\SAPUILandscape.xml
echo ^<Messageserver uuid="014d41e4-f609-4997-9889-e7da68091764" name="MH2" host="10.50.2.102"/^> >>"%TEMP%"\SAPUILandscape.xml
echo ^</Messageservers^> >>"%TEMP%"\SAPUILandscape.xml
echo ^</Landscape^> >>"%TEMP%"\SAPUILandscape.xml

REM #Create_SAPUILandscapeGlobal_on_%temp%
Type Nul >"%TEMP%"\SAPUILandscapeGlobal.xml
echo ^<^?xml version="1.0" encoding="utf-8"^?^> >>"%TEMP%"\SAPUILandscapeGlobal.xml
        echo ^<Landscape^> >>"%TEMP%"\SAPUILandscapeGlobal.xml
echo ^<Messageservers/^> >>"%TEMP%"\SAPUILandscapeGlobal.xml
echo ^</Landscape^> >>"%TEMP%"\SAPUILandscapeGlobal.xml

copy /y "%TEMP%"\SAPUILandscape.xml %wcf%\SAP\Common
copy /y "%TEMP%"\SAPUILandscape.xml %wdf%\SAP\Common
copy /y "%TEMP%"\SAPUILandscapeGlobal.xml %wcf%\SAP\Common
copy /y "%TEMP%"\SAPUILandscapeGlobal.xml %wdf%\SAP\Common

REM #Create_Script_ResetPritner
REM echo. >c:\Reset_Printer.cmd
REM echo net stop "print spooler" >>C:\Reset_Printer.cmd
REM echo Del C:\WINDOWS\system32\spool\PRINTERS\*.* /q >>C:\Reset_Printer.cmd
REM echo net start "print spooler" >>C:\Reset_Printer.cmd
REM echo exit >>C:\Reset_Printer.cmd

REM #Create_Shortcut_Printer
REM     echo [InternetShortcut] >> "%PUBLIC%\desktop\Reset_Printer.url"
REM     echo URL="C:\Reset_Printer.cmd" >> "%PUBLIC%\desktop\Reset_Printer.url"
REM     echo IconFile=C:\WINDOWS\system32\SHELL32.dll >> "%PUBLIC%\desktop\Reset_Printer.url"
REM     echo IconIndex=222 >> "%PUBLIC%\desktop\Reset_Printer.url"

REM #Create_Shortcut_SAP
REM copy /y "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\SAP Front End\SAP Logon.lnk" "%PUBLIC%\desktop\"

REM #SAP_GUI
REG ADD "HKCU\Software\SAP\General\Appearance" /v "SelectedTheme"    /t REG_DWORD /d 1 /f
REG ADD "HKCU\Software\SAP\General\Appearance" /v "CorbuIcon" /t REG_DWORD /d 0 /f
REG ADD "HKCU\Software\SAP\General\Appearance" /v "ShowShadowBorder"    /t REG_DWORD /d 1 /f
REG ADD "HKCU\Software\SAP\General\Appearance" /v "Sound"    /t REG_SZ    /d "off" /f
REG ADD "HKLM\Software\Wow6432Node\SAP\SAPLogon" /v "ShowExplorerView"  /t REG_DWORD /d 0 /f
REG ADD "HKLM\Software\Wow6432Node\SAP\SAPLogon" /v "ShowTreeView" /t REG_DWORD /d 0 /f
REG ADD "HKLM\Software\Wow6432Node\SAP\SAPLogon" /v "ShowWorkspaceView" /t REG_DWORD /d 0 /f
REG ADD "HKLM\Software\Wow6432Node\SAP\General\Appearance\Themes" /v "SelectableThemes" /t REG_DWORD /d 1 /f

echo.
echo.
echo.
Echo Please Run Script 2 Times Admin_Normal mode
echo.
echo.
pause > Nul

วันจันทร์ที่ 4 พฤษภาคม พ.ศ. 2563

keybord thai

@echo off

::Thai(Thailand) / Language for non-Unicode program
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage" /v "ACP" /t REG_SZ /d 874 /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage" /v "MACCP" /t REG_SZ /d 10021 /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage" /v "OEMCP" /t REG_SZ /d 874 /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language" /v "Default" /t REG_SZ /d 041e /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\Nls\Locale" /v "(Default)" /t REG_SZ /d 0000041e /f

::TimeZone(UTC+07.00) Bangkok,Hanoi,Jakarta
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v "Bias" /t REG_DWORD /d 0xfffffe5c /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v "DaylightBias" /t REG_DWORD /d 0x0 /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v "DaylightName" /t REG_SZ /d "@tzres.dll,-561" /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v "DaylightStart" /t REG_BINARY /d 00000000000000000000000000000000 /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v "StandardName" /t REG_SZ /d "@tzres.dll,-562" /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v "StandardStart" /t REG_BINARY /d 00000000000000000000000000000000 /f
::reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v "TimeZoneKeyName" /t REG_SZ /d "SE Asia Standard Time" /f

::Disable_firewall
reg add "HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\PublicProfile" /v "EnableFirewall" /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile" /v "EnableFirewall" /t REG_DWORD /d 0 /f

::Disable_IP6
::netsh int ipv6 isatap set state disabled
::netsh int teredo set state disabled
::netsh interface ipv6 6to4 set state state=disabled undoonstop=disabled
::reg add "HKLM\System\CurrentControlSet\Services\Tcpip6\Parameters" /v "DisabledComponents" /t REG_DWORD /d "255" /f

::Disable-privacy-settings
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OOBE" /v "DisablePrivacyExperience" /t REG_DWORD /d 1 /f
::Disable_suggested_apps
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f
::Minimize SearchIcon on task-bar
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 1 /f
::Remove WinStoreIcon on task-bar
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoPinningStoreToTaskbar" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v "NoPinningStoreToTaskbar" /t REG_DWORD /d 1 /f
::Remove MailIcon on task-bar
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband\AuxilliaryPins" /v "MailPin" /t REG_DWORD /d 0 /f

::Location and Thai-Language
::reg add "HKCU\Control Panel\International" /v "sShortDate" /t REG_SZ /d "dd/MM/yyyy" /f
::reg add "HKCU\Control Panel\International\Geo" /v "Nation" /t REG_SZ /d 227 /f
::reg add "HKCU\Keyboard Layout\Preload" /v "2" /t REG_SZ /d 0000041e /f
::reg add "HKCU\Keyboard Layout\Toggle" /v "Hotkey" /t REG_SZ /d 4 /f
::reg add "HKCU\Keyboard Layout\Toggle" /v "Language Hotkey" /t REG_SZ /d 4 /f
::reg add "HKCU\Keyboard Layout\Toggle" /v "Layout Hotkey" /t REG_SZ /d 3 /f

::ForNew User
reg load "HKU\tmp" "C:\Users\Default\NTUSER.DAT"
reg add "HKU\tmp\Software\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 1 /f
reg add "HKCU\tmp\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband\AuxilliaryPins" /v "MailPin" /t REG_DWORD /d 0 /f
reg add "HKU\tmp\Control Panel\International" /v "sShortDate" /t REG_SZ /d "dd/MM/yyyy" /f
::reg add "HKU\tmp\Control Panel\International\Geo" /v "Nation" /t REG_SZ /d 227 /f
::reg add "HKU\tmp\Keyboard Layout\Preload" /v "2" /t REG_SZ /d 0000041e /f
::reg add "HKU\tmp\Keyboard Layout\Toggle" /v "Hotkey" /t REG_SZ /d 4 /f
::reg add "HKU\tmp\Keyboard Layout\Toggle" /v "Language Hotkey" /t REG_SZ /d 4 /f
::reg add "HKU\tmp\Keyboard Layout\Toggle" /v "Layout Hotkey" /t REG_SZ /d 3 /f
reg unload "HKU\tmp"

echo.
echo.
echo "Please Enter for reboot you computer."
Pause >NUL
shutdown -r -f -t 00
exit


:: To kill and restart explorer
::taskkill /f /im explorer.exe
::start explorer.exe