Projekt neu angelegt.

This commit is contained in:
Eugen Höglinger 2020-02-27 15:09:36 +01:00
commit d06a68c6b2
43 changed files with 20957 additions and 0 deletions

32
.gitignore vendored Normal file
View File

@ -0,0 +1,32 @@
#Ignore thumbnails created by Windows
Thumbs.db
#Ignore files built by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.vs/
#Nuget packages folder
packages/

BIN
Daten/FrmSplash.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 KiB

419
Daten/Install_NX.cmd Normal file
View File

@ -0,0 +1,419 @@
@echo off
rem ****************************************************************************
rem ** **
rem **** Install_NX ****
rem ** **
rem ****************************************************************************
rem * V 1.1 *
rem ****************************************************************************
rem * (C) 2011 by Eugen Hoeglinger *
rem ****************************************************************************
rem * Installs the select NX version, the NX help and the NX-Portal with the *
rem * user group user for the select location. *
rem ****************************************************************************
rem * init 2011-02-21 E. Hoeglinger
rem * Arguments can be used. Calling from NX-Portal is
rem * possible. 2011-03-22 E. Hoeglinger
rem *
rem ****************************************************************************
rem --- Find out the Strtup folder, from which the script was called ---
set STARTUP_FOLDER=%~dp0%
set STARTUP_FOLDER=%STARTUP_FOLDER:~0,-1%
rem --- NX Version -------------------------------------------------------------
rem --- Evaluating transfer parameters if available ---
set NX_LONG_VERSION=%1
echo NX_LONG_VERSION: %NX_LONG_VERSION%
if [%NX_LONG_VERSION%]==[] goto START_NXVERSION_MENU
if %NX_LONG_VERSION%==7 goto NXVERSION1
if %NX_LONG_VERSION%==8 goto NXVERSION2
if %NX_LONG_VERSION%==9 goto NXVERSION3
if %NX_LONG_VERSION%==10 goto NXVERSION4
:START_NXVERSION_MENU
cls
echo. & echo.
echo ***********************************************
echo * *
echo * Which NX version do you want to install? *
echo * *
echo * 1 - NX 7.5 *
echo * 2 - NX 8.0 (for beta testing only) *
rem echo * 3 - NX 9.0 *
rem echo * 4 - NX 10.0 *
echo * *
echo ***********************************************
echo * Please enter the desired number *
echo ***********************************************
echo.
set /p Input=">>>>>> "
if /i "%Input%"=="1" goto NXVERSION1
if /i "%Input%"=="2" goto NXVERSION2
rem if /i "%Input%"=="3" goto NXVERSION3
rem if /i "%Input%"=="4" goto NXVERSION4
rem --- Adjusting value to the number of menu entries ---
echo. & echo Only values of 1 - 2 permitted
echo.
pause
goto START_NXVERSION_MENU
:NXVERSION1
rem echo. & echo Not released for the installation yet! & echo.
rem pause
rem goto START_NXVERSION_MENU
set NX_LONG_VERSION=7.5
goto START_NXDOKU
:NXVERSION2
echo. & echo Not released for the installation yet! & echo.
pause
goto START_NXVERSION_MENU
set NX_LONG_VERSION=8.0
goto START_NXDOKU
:NXVERSION3
echo echo. & echo Not released for the installation yet! & echo.
pause
goto START_NXVERSION_MENU
set NX_LONG_VERSION=9.0
goto START_NXDOKU
:NXVERSION4
echo echo. & echo Not released for the installation yet! & echo.
pause
goto START_NXVERSION_MENU
set NX_LONG_VERSION=10.0
goto START_NXDOKU
rem --- Dokumentation ----------------------------------------------------------
rem --- Evaluating transfer parameters if available ---
:START_NXDOKU
set DOKUMENTATION=%2
echo DOKUMENTATION: %DOKUMENTATION%
if [%DOKUMENTATION%]==[] goto START_NXDOKU_MENU
if %DOKUMENTATION%==STANDALONE goto NXDOKU1
if %DOKUMENTATION%==NETWORK goto NXDOKU2
:START_NXDOKU_MENU
cls
echo. & echo.
echo ***********************************************
echo * *
echo * NX "add on" installation: *
echo * *
echo * 1 - With documentation (recommend) *
echo * 2 - Without documentation *
echo * *
echo ***********************************************
echo * Please enter the desired number *
echo ***********************************************
echo.
set /p Input=">>>>>> "
if /i "%Input%"=="1" goto NXDOKU1
if /i "%Input%"=="2" goto NXDOKU2
rem --- Adjusting value to the number of menu entries ---
echo. & echo Only values of 1 - 2 permitted
echo.
pause
goto START_NXDOKU_MENU
:NXDOKU1
set DOKUMENTATION=STANDALONE
goto START_LOCATION
:NXDOKU2
set DOKUMENTATION=NETWORK
goto START_LOCATION
rem --- Location ---------------------------------------------------------------
:START_LOCATION
rem --- Evaluating transfer parameters if available ---
set LOCATION=%3
if [%LOCATION%]==[] goto START_LOCATION_MENU
rem --- Replace the number through the location name ---
if %LOCATION%==Canonsburg goto LOCATION1
if %LOCATION%==Kolkata goto LOCATION2
if %LOCATION%==Kosice goto LOCATION3
if %LOCATION%==Legelshurst goto LOCATION4
if %LOCATION%==Linz goto LOCATION5
if %LOCATION%==Marnate goto LOCATION6
if %LOCATION%==Montbrison goto LOCATION7
if %LOCATION%==Ostrava goto LOCATION8
if %LOCATION%==Prague goto LOCATION9
if %LOCATION%==Russia goto LOCATION10
if %LOCATION%==Shanghai_PEC goto LOCATION11
if %LOCATION%==Sheffield goto LOCATION12
if %LOCATION%==Stockton goto LOCATION13
if %LOCATION%==Worcester goto LOCATION14
if %LOCATION%==Zdar goto LOCATION15
if %LOCATION%==16 goto LOCATION16
if %LOCATION%==17 goto LOCATION17
if %LOCATION%==18 goto LOCATION18
if %LOCATION%==19 goto LOCATION19
if %LOCATION%==20 goto LOCATION20
:START_LOCATION_MENU
cls
echo. & echo.
echo ***********************************************
echo * *
echo * 1 - Canonsburg *
echo * 2 - Kolkata *
echo * 3 - Kosice *
echo * 4 - Legelshurst *
echo * 5 - Linz *
echo * 6 - Marnate *
echo * 7 - Montbrison *
echo * 8 - Ostrava *
echo * 9 - Prague *
echo * 10 - Russia *
echo * 11 - Shanghai_PEC *
echo * 12 - Sheffield *
echo * 13 - Stockton *
echo * 14 - Worcester *
echo * 15 - Zdar *
rem echo * 15 - *
rem echo * 16 - *
rem echo * 17 - *
rem echo * 18 - *
rem echo * 19 - *
rem echo * 20 - *
echo * *
echo ***********************************************
echo * Please enter the desired number *
echo ***********************************************
echo.
set /p Input=">>>>>> "
if /i "%Input%"=="1" goto LOCATION1
if /i "%Input%"=="2" goto LOCATION2
if /i "%Input%"=="3" goto LOCATION3
if /i "%Input%"=="4" goto LOCATION4
if /i "%Input%"=="5" goto LOCATION5
if /i "%Input%"=="6" goto LOCATION6
if /i "%Input%"=="7" goto LOCATION7
if /i "%Input%"=="8" goto LOCATION8
if /i "%Input%"=="9" goto LOCATION9
if /i "%Input%"=="10" goto LOCATION10
if /i "%Input%"=="11" goto LOCATION11
if /i "%Input%"=="12" goto LOCATION12
if /i "%Input%"=="13" goto LOCATION13
if /i "%Input%"=="14" goto LOCATION14
if /i "%Input%"=="15" goto LOCATION15
rem if /i "%Input%"=="16" goto LOCATION16
rem if /i "%Input%"=="17" goto LOCATION17
rem if /i "%Input%"=="18" goto LOCATION18
rem if /i "%Input%"=="19" goto LOCATION19
rem if /i "%Input%"=="20" goto LOCATION20
rem --- Adjusting value to the number of menu entries ---
echo. & echo Only values of 1 - 15 permitted
echo.
pause
goto START_COMPUTERTYPE
:LOCATION1
set LOCATION=Canonsburg
goto START_COMPUTERTYPE
:LOCATION2
set LOCATION=Kolkata
goto START_COMPUTERTYPE
:LOCATION3
set LOCATION=Kosice
goto START_COMPUTERTYPE
:LOCATION4
set LOCATION=Legelshurst
goto START_COMPUTERTYPE
:LOCATION5
set LOCATION=Linz
goto START_COMPUTERTYPE
:LOCATION6
set LOCATION=Marnate
goto START_COMPUTERTYPE
:LOCATION7
set LOCATION=Montbrison
goto START_COMPUTERTYPE
:LOCATION8
set LOCATION=Ostrava
goto START_COMPUTERTYPE
:LOCATION9
set LOCATION=Prague
goto START_COMPUTERTYPE
:LOCATION10
set LOCATION=Russia
goto START_COMPUTERTYPE
:LOCATION11
set LOCATION=Shanghai_PEC
goto START_COMPUTERTYPE
:LOCATION12
set LOCATION=Sheffield
goto START_COMPUTERTYPE
:LOCATION13
set LOCATION=Stockton
goto START_COMPUTERTYPE
:LOCATION14
set LOCATION=Worcester
goto START_COMPUTERTYPE
:LOCATION15
set LOCATION=Zdar
goto START_COMPUTERTYPE
:LOCATION16
set LOCATION=
goto START_COMPUTERTYPE
:LOCATION17
set LOCATION=
goto START_COMPUTERTYPE
:LOCATION18
set LOCATION=
goto START_COMPUTERTYPE
:LOCATION19
set LOCATION=
goto START_COMPUTERTYPE
:LOCATION20
set LOCATION=
goto START_COMPUTERTYPE
rem --- Computertype -------------------------------------------------------------
rem --- Evaluating transfer parameters if available ---
:START_COMPUTERTYPE
set COMPUTER_TYPE=
:START_COMPUTERTYPE_MENU
cls
echo. & echo.
echo ***********************************************
echo * *
echo * Choose your Computer: *
echo * *
echo * 1 - Desktop *
echo * 2 - Laptop (connected to VAI network) *
rem echo * 3 - Laptop (not connected to VAI network) *
echo * *
echo ***********************************************
echo * Please enter the desired number *
echo ***********************************************
echo.
set /p Input=">>>>>> "
if /i "%Input%"=="1" goto COMPUTERTYPE1
if /i "%Input%"=="2" goto COMPUTERTYPE2
rem if /i "%Input%"=="3" goto COMPUTERTYPE3
rem --- Adjusting value to the number of menu entries ---
echo. & echo Only values of 1 - 2 permitted
echo.
pause
goto START_COMPUTERTYPE_MENU
:COMPUTERTYPE1
set COMPUTER_TYPE=desktop
set CONNECTION_TYPE=
goto SELECTION_CHECK
:COMPUTERTYPE2
set COMPUTER_TYPE=laptop
set CONNECTION_TYPE=internal
goto SELECTION_CHECK
:COMPUTERTYPE3
set COMPUTER_TYPE=laptop
set CONNECTION_TYPE=external
goto SELECTION_CHECK
rem --- Installation -----------------------------------------------------------
:SELECTION_CHECK
if /i "%5" NEQ "" set STARTUP_FOLDER=%5
if /i "%5" NEQ "" goto START_INSTALLATION
cls
echo. & echo.
echo ***********************************************
echo * You selected following configuration: *
echo ***********************************************
echo *
echo * Version: NX%NX_LONG_VERSION%
if /I [%DOKUMENTATION%]==[STANDALONE] (echo * Dokumentation: Yes) else (echo * Dokumentation: No)
echo * Location: %LOCATION%
if /I [%COMPUTER_TYPE%]==[desktop] (echo * Computertype: Desktop)
if /I [%CONNECTION_TYPE%]==[internal] (echo * Computertype: Laptop & echo * connected to VAI)
if /I [%CONNECTION_TYPE%]==[external] (echo * Computertype: Laptop & echo * not conn. to VAI)
rem echo * Computertype: %COMPUTER_TYPE% %CONNECTION_TYPE%
echo *
echo ***********************************************
echo * Is your choice right? Y/N (Yes/No) *
echo ***********************************************
echo.
set /p Input=">>>>>> "
if /i "%Input%"=="Y" goto START_INSTALLATION
if /i "%Input%"=="Yes" goto START_INSTALLATION
if /i "%Input%"=="J" goto START_INSTALLATION
if /i "%Input%"=="Ja" goto START_INSTALLATION
goto START_NXVERSION_MENU
rem --- Installation -----------------------------------------------------------
:START_INSTALLATION
rem --- Read location specific datas ---
if /i "%4" NEQ "" set NXPortalGroup=%4
set NX_VERSION=%NX_LONG_VERSION:~0,-2%
set LOCATION_SPECIFIC_DATAS=%STARTUP_FOLDER%\LocationSpecificDatas\_LocationSpecificDatas_%LOCATION%.cmd
call "%LOCATION_SPECIFIC_DATAS%"
rem --- Start LocalSynchronizationSetup ---
set LOCAL_SYNCHRONIZATION_SETUP=%STARTUP_FOLDER%\NX-Portal\tools\LocalSynchronizationSetup\LocalSynchronizationSetup.exe
if defined CONNECTION_TYPE (
call "%LOCAL_SYNCHRONIZATION_SETUP%" "%STARTUP_FOLDER%\NX-Portal\tools\LocalSynchronizationSetup" "-%COMPUTER_TYPE%" "-%CONNECTION_TYPE%"
) else (
call "%LOCAL_SYNCHRONIZATION_SETUP%" "%STARTUP_FOLDER%\NX-Portal\tools\LocalSynchronizationSetup" "-%COMPUTER_TYPE%"
)
rem --- Start installation ---
cls
echo. &echo Installation is started! & echo.
set START_INSTALLATION=%STARTUP_FOLDER%\_InstallNX.cmd
call "%START_INSTALLATION%" "%STARTUP_FOLDER%" "%NXPortalGroup%"
rem --- Registry Werte wieder zurücksetzen ---
regedit.exe /s UNCdisable.reg
rem --- End --------------------------------------------------------------------

BIN
Daten/NX-Logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
Daten/NX.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
Daten/NXinstall.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

26
Daten/RechteSetzen.bat Normal file
View File

@ -0,0 +1,26 @@
@echo off
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if not "%errorlevel%"=="0" goto UACPrompt
goto HAVEadmin
:UACPrompt
echo Requesting administrative privileges...
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
if "%1" == "" echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
if "%1" == "/u" echo UAC.ShellExecute "%~s0", "/u", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:HAVEadmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%~dp0"
set root=%CD%
cls
:init
rem ******************************************************************************************
rem * Your script goes here *
rem ******************************************************************************************

BIN
Daten/Splash-Screen.psp Normal file

Binary file not shown.

Binary file not shown.

285
Daten/_InstallNX.cmd Normal file
View File

@ -0,0 +1,285 @@
@echo OFF
echo.
echo ******************************************************************
echo ** **
echo **** Install NX ****
echo ** **
echo ******************************************************************
echo * V 1.0 *
echo ******************************************************************
echo * (C) 2011 by Eugen HOEGLINGER *
echo ******************************************************************
echo * Installation of NX including newest Release- and Maintenance- *
echo * Packs. Set default Open-Type of NX-Part Files to open with *
echo * this NX version. *
echo ******************************************************************
echo * init 2011-02-23 E. Hoeglinger
echo *
echo ******************************************************************
echo. & echo.
if not exist "C:\TMP" (mkdir "C:\TMP")
rem --- Set NX Variables -------------------------------------------------------
set UGII_BASE_DIR=%ProgramFiles%\UGS\NX %NX_LONG_VERSION%
set UGII_ROOT_DIR=%UGII_BASE_DIR%\UGII\
set UGII_LANG=ENGLISH
set UGII_TMP_DIR=C:\TMP
set NX_INSTALL_LOGFILE=%ProgramFiles%\UGS\Logfiles\NX%NX_VERSION%_Install.log
set NX_INSTALL_DOC_LOGFILE=%ProgramFiles%\UGS\Logfiles\NX%NX_VERSION%_Doc_Install.log
set UGTOOLS_INSTALL_DIR="%ProgramFiles%\UGS"
rem ** Converted Variables **
set NX_VERSION=%NX_LONG_VERSION:~0,-2%
set NX_SHORT_VERSION=%NX_LONG_VERSION:.=%
if /I %NX_VERSION% LSS 10 (set NX_SHORT0_VERSION=0%NX_SHORT_VERSION%) else (set NX_SHORT0_VERSION=%NX_SHORT_VERSION%)
rem echo NX Version: %NX_LONG_VERSION%
rem echo NX Version (Base version): %NX_VERSION%
rem echo NX Verson (Short version): %NX_SHORT_VERSION%
rem echo NX Version (Short 0 version): %NX_SHORT0_VERSION%
rem echo Location: %LOCATION%
rem echo NX_VAI folder location: %NX_VAI_ONLINE%
rem echo License server: %UGS_LICENSE_SERVER%
rem echo License bundle: %UGS_LICENSE_BUNDLE%
rem echo Default Regfile: %DEFAULT_REGFILE%
rem echo UGII_BASE_DIR: %UGII_BASE_DIR%
rem echo UGII_ROOT_DIR; %UGII_ROOT_DIR%
rem echo Language: %UGII_LANG%
rem echo UGII_TMP_DIR: %UGII_TMP_DIR%
rem echo NX Installation Logfile: %NX_INSTALL_LOGFILE%
rem echo NX Doc Installation Logfile: %NX_INSTALL_DOC_LOGFILE%
rem echo UG Tools Installation directory: %UGTOOLS_INSTALL_DIR%
pause
rem --- Create logfile folders, if they does not exist ---
if not exist "%ProgramFiles%\UGS" (mkdir "%ProgramFiles%\UGS")
if not exist "%ProgramFiles%\UGS\Logfiles" (mkdir "%ProgramFiles%\UGS\Logfiles")
rem --- Dokumentation ----------------------------------------------------------
rem --- STANDALONE = With Dokumentation ---
rem --- NETWORK = Without Dokumentation --- **
if /I [%DOKUMENTATION%]==[STANDALONE] goto set_INSTALLTYPE_STANDALONE
if /I [%DOKUMENTATION%]==[NETWORK] goto set_INSTALLTYPE_NETWORK
goto set_INSTALLTYPE_STANDALONE
:set_INSTALLTYPE_NETWORK
set INSTALLATION_TYPE=NETWORK
set INSTALL_DOCUMENTATION=FALSE
set COPY_UGTOOLS=FALSE
echo Doku wird nicht installiert
goto set_INSTALL_PATHS
:set_INSTALLTYPE_STANDALONE
set INSTALLATION_TYPE=STANDALONE
set INSTALL_DOCUMENTATION=TRUE
set COPY_UGTOOLS=FALSE
echo Doku wird installiert
goto set_INSTALL_PATHS
rem ---Installation Paths ------------------------------------------------------
:set_INSTALL_PATHS
set NXUpdateApp=%STARTUP_FOLDER%\NXupdate\NXupdate.exe
rem --- set installed NX to default open type ---
set set_NX_TO_DEFAULT=TRUE
set DefaultOpenTypeReg=%DEFAULT_REGFILE%
rem *******************************************************************
rem ** set NX-Portal Installation **
rem ** **
rem ** Group: 1 - Gast 3 - Hauptanwender **
rem ** 2 - Anwender 4 - Administrator **
rem ** **
set INSTALL_NX_PORTAL=TRUE
if /i "%NXPortalGroup%" == "" set NXPortalGroup=2
set NXPortalInstaller=%STARTUP_FOLDER%\NX-Portal\%LOCATION%\Install_NX-Portal.bat
rem --- In Linz create an installation logfile ---
if /I [%LOCATION%]==[Linz] set NX_INSTALLSCRIPT_LOG=\\atlnztfile01.ww300.siemens.net\ber600\ISS4\NX_Installation\NX%NX_VERSION%\InstallationNX%NX_VERSION%.txt
rem --- Get Mode and set paths (32bit or 64bit) ---
if /I %PROCESSOR_ARCHITECTURE%==x86 (goto set_32BIT)
if /I %PROCESSOR_ARCHITECTURE%==AMD64 (goto set_64BIT) else (goto ARCHITECTURE_DETECTION_FAILED)
:set_32BIT
rem --- If the script on a 64 bit machine are started from a 32 bit application,
rem than the 64 bit environments are not recognized correctly. To be sure,
rem questioning a special Windows system variable. ---
if /I [%PROCESSOR_ARCHITEW6432%]==[AMD64] (goto set_64BIT)
set MACHINE=32BIT
set COMPSOLV_MACHINE=32bit
set NX_MSI=%STARTUP_FOLDER%\NXupdate\NX%NX_VERSION%_32bit-updates\basis_nx%NX_SHORT_VERSION%-32bit\nx%NX_SHORT0_VERSION%\UGS NX %NX_LONG_VERSION%.msi
set NX_DOC_MSI=%STARTUP_FOLDER%\NXupdate\NX%NX_VERSION%_64bit-updates\basis_nx%NX_SHORT_VERSION%-ugdoc\win32\ugdoc%NX_SHORT0_VERSION%\UGS NX %NX_LONG_VERSION% Documentation.msi
set UGTools_Dir=%STARTUP_FOLDER%\UGTools\NX%NX_VERSION%_32bit
goto CHECK_FILES
:set_64BIT
set MACHINE=64BIT
set COMPSOLV_MACHINE=64bit
set NX_MSI=%STARTUP_FOLDER%\NXupdate\NX%NX_VERSION%_64bit-updates\basis_nx%NX_SHORT_VERSION%-64bit\nx%NX_SHORT0_VERSION%\UGS NX %NX_LONG_VERSION%.msi
set NX_DOC_MSI=%STARTUP_FOLDER%\NXupdate\NX%NX_VERSION%_64bit-updates\basis_nx%NX_SHORT_VERSION%-ugdoc\win64\ugdoc%NX_SHORT0_VERSION%\UGS NX %NX_LONG_VERSION% Documentation.msi
set UGTools_Dir=%STARTUP_FOLDER%\UGTools\NX%NX_VERSION%_64bit
goto CHECK_FILES
rem --- Consistency Check ------------------------------------------------------
:CHECK_FILES
set CONTINUE=TRUE
:CHECK_NX_DEFAULT_REG
if /I not %set_NX_TO_DEFAULT%==TRUE (goto CHECK_NX_MSI_EXIST)
goto CHECK_NX_DEFAULT_REG_EXIST
:CHECK_NX_DEFAULT_REG_EXIST
if exist "%DefaultOpenTypeReg%" (goto CHECK_NX_MSI_EXIST)
echo Unable to access DefaultOpenTypeReg: %DefaultOpenTypeReg%
set CONTINUE=FALSE
:CHECK_NX_MSI_EXIST
if exist "%NX_MSI%" (goto CHECK_INSTALL_DOC)
echo Unable to access NX_MSI-Installer: %NX_MSI%
set CONTINUE=FALSE
:CHECK_INSTALL_DOC
if /I not %INSTALL_DOCUMENTATION%==TRUE (goto CHECK_NXUPDATE_EXIST)
:CHECK_NX_DOC_MSI_EXIST
if exist "%NX_DOC_MSI%" (goto CHECK_NXUPDATE_EXIST)
echo Unable to access NX %NX_LONG_VERSION% Documentation Msi-Installer: %NX_DOC_MSI%
set CONTINUE=FALSE
:CHECK_NXUPDATE_EXIST
if exist "%NXUpdateApp%" (goto CHECK_INSTALL_PORTAL)
echo Unable to access NXUpdate Application: %NXUpdateApp%
set CONTINUE=FALSE
:CHECK_INSTALL_PORTAL
if /I not %INSTALL_NX_PORTAL%==TRUE (goto CHECK_COPY_UGTOOLS)
:CHECK_PORTAL_INSTALL_EXIST
if exist "%NXPortalInstaller%" (goto CHECK_COPY_UGTOOLS)
echo Unable to access NX-Portal Installer: %NXPortalInstaller%
set CONTINUE=FALSE
:CHECK_COPY_UGTOOLS
if /I not "%COPY_UGTOOLS%"==TRUE (goto CHECK_CONTINUE)
:CHECK_UGTOOLS_EXIST
if exist "%UGTools_Dir%" (goto CHECK_CONTINUE)
echo Unable to access directory of UGTools: %UGTools_Dir%
set CONTINUE=FALSE
:CHECK_CONTINUE
if /I not %CONTINUE%==TRUE (goto END_WITHOUT_SUCCESS)
rem --- Summary ----------------------------------------------------------------
rem --- Print Summary of selected files ---
:PRINT_SUMMARY
echo.
echo Configuration-Type:
echo -------------------
echo Detected System: %MACHINE%
echo Installation-Type: %INSTALLATION_TYPE%
echo.
echo NX-Installation:
echo -----------------
echo NX Installer: %NX_MSI%
if /I %INSTALL_DOCUMENTATION%==TRUE (echo NX Documentation Installer: %NX_DOC_MSI%)
echo NX Update: %NXUpdateApp%
echo.
if /I [%set_NX_TO_DEFAULT%]==[TRUE] (
echo set default Open-Type:
echo ----------------------
echo set NX %NX_LONG_VERSION% as Default: %set_NX_TO_DEFAULT%
echo Add registry file: %DefaultOpenTypeReg%
echo.
)
if /I not %INSTALL_NX_PORTAL%==TRUE (goto SKIP_PORTAL_SUMMARY)
echo Install NX-Portal:
echo ------------------
if %NXPortalGroup%==1 echo Group: %NXPortalGroup% - GUEST
if %NXPortalGroup%==2 echo Group: %NXPortalGroup% - USER
if %NXPortalGroup%==3 echo Group: %NXPortalGroup% - KEYUSER
if %NXPortalGroup%==4 echo Group: %NXPortalGroup% - ADMINISTRATOR
echo Installation File: %NXPortalInstaller%
echo.
:SKIP_PORTAL_SUMMARY
if /I not %COPY_UGTOOLS%==TRUE (goto SKIP_UGTOOLS_SUMMARY)
echo NX UGTools:
echo -----------
echo UG Tools Directory: %UGTools_Dir%
echo Copy Tools to Directory: %UGTools_Install_Dir%
echo.
:SKIP_UGTOOLS_SUMMARY
rem pause
echo.
rem --- Install Routines -------------------------------------------------------
rem --- Install NX ---
:INSTALL_NX
echo Installing NX %NX_LONG_VERSION%...
msiexec.exe /i "%NX_MSI%" /passive /norestart /log "%NX_INSTALL_LOGFILE%" ADDLOCAL="all" setUPTYPE="typical" LICENSESERVER=%UGS_LICENSE_SERVER% LANGUAGE=%UGII_LANG% INSTALLDIR="%UGII_BASE_DIR%"
rem --- Install Dokumentation --- **
:INSTALL_NX_DOCUMENTATION
if not %INSTALL_DOCUMENTATION%==TRUE (goto UPDATE_NX)
echo Installing NX %NX_LONG_VERSION% Documentation...
msiexec.exe /i "%NX_DOC_MSI%" /passive /norestart /log "%NX_INSTALL_DOC_LOGFILE%" INSTALLDIR="%UGII_BASE_DIR%"
rem --- Start NX Update ---
:UPDATE_NX
echo Updating NX %NX_LONG_VERSION% with Release and Maintenance Pack...
CALL "%NXUpdateApp%" -autorun -ugii_base_dir="%UGII_BASE_DIR%"
rem --- set default Open-Type of NX-Part Files to open with the installed
rem NX Version ---
:set_DEFAULT_OPENTYPE
if /I not %set_NX_TO_DEFAULT%==TRUE (goto COPY_UGTOOLS_DIRECTORY)
echo set default Open-Type of Part files to open with NX %NX_LONG_VERSION%...
regedit.exe /s "%DefaultOpenTypeReg%"
rem --- Copy UGTools ---
:COPY_UGTOOLS_DIRECTORY
if /I not %COPY_UGTOOLS%==TRUE (goto INSTALL_NXPORTAL)
xcopy "%UGTOOLS_DIR%" "%UGTools_Install_Dir%" /E /Y
rem --- Install NX-Portal ---
:INSTALL_NXPORTAL
if /I not %INSTALL_NX_PORTAL%==TRUE (goto END_WITH_SUCCESS)
echo Installing NX-Portal...
CALL "%NXPortalInstaller%" %NXPortalGroup% /d
echo OFF
rem --- Additional NX Tools ---
rem Create a Shortcut for 'Zip Assembly' in 'NX Tools' Startmenu
if /I not exist %NX_VAI_ONLINE%\NX_VAI\NX_ENVIRONMENT\NX7\NX_APPS\COMPSOLV_TOOLS\tools\ZipAssembly (goto END_WITH_SUCCESS)
xcopy "%NX_VAI_ONLINE%\NX_VAI\NX_ENVIRONMENT\NX7\NX_APPS\COMPSOLV_TOOLS\tools\ZipAssembly\Zip Assembly.lnk" "%ALLUSERSPROFILE%\Start Menu\Programs\UGS NX %NX_LONG_VERSION%\NX Tools" /E /Y
goto END_WITH_SUCCESS
rem --- Errorhandling ----------------------------------------------------------
:ARCHITECTURE_DETECTION_FAILED
echo.
echo Unable to detect weather your system is running in 32bit or 64bit mode.
echo Installation abbortet without success.
goto END_WITHOUT_SUCCESS
:END_WITHOUT_SUCCESS
echo.
if /I [%LOCATION%]==[Linz] echo %USERNAME%;%COMPUTERNAME%;%PROCESSOR_ARCHITECTURE%;%USERDNSDOMAIN%;%TIME%;FAILED >> %NX_INSTALLSCRIPT_LOG%
echo Some errors occured during installation.
echo INSTALLATION FINISHED WITHOUT SUCCESS!
echo.
goto END
:END_WITH_SUCCESS
echo.
if /I [%LOCATION%]==[Linz] echo %USERNAME%;%COMPUTERNAME%;%PROCESSOR_ARCHITECTURE%;%USERDNSDOMAIN%;%TIME%;SUCCESS >> %NX_INSTALLSCRIPT_LOG%
echo INSTALLATION FINISHED SUCCESSFULLY!
echo.
goto END
:END
pause
rem --- End --------------------------------------------------------------------

View File

@ -0,0 +1 @@
7 STANDALONE Linz 0 "D:\Eigene Dateien\Daten\Programmieren\Programme\C#2008\Start_NX-Installation\Start_NX-Installation\Start_NX-Installation\bin\Debug" Laptop internal Arg8

25
NX-Installation.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NX-Installation", "NX-Installation\NX-Installation.csproj", "{D3490F7D-C5CB-4769-8710-7DDB4232A945}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D3490F7D-C5CB-4769-8710-7DDB4232A945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3490F7D-C5CB-4769-8710-7DDB4232A945}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3490F7D-C5CB-4769-8710-7DDB4232A945}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3490F7D-C5CB-4769-8710-7DDB4232A945}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {384E0249-69B5-4188-9D77-F067EB618829}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

View File

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;
namespace NX_Installation
{
class CreateReadWriteDeleteRegistry
{
// Create a Subkey
public string MainKey { get; set; }
public string SubKey { get; set; }
public string Key { get; set; }
public string Value { get; set; }
public bool Error { get; set; }
public void WriteSubkey()
{
// Write Values to the Subkey
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(SubKey);
newKey.SetValue(Key, Value);
}
public string ReadSubkey()
{
// Read Values from the Subkey
if (SubKeyExist(SubKey))
{
RegistryKey myKey = Registry.CurrentUser.OpenSubKey(SubKey);
return (string)myKey.GetValue(Key);
}
else
{
throw new Exception("Subkey does not exist!");
}
}
public void DeleteSubkey()
{
// Delete the Subkey
MainKey = SubKey.Remove(SubKey.LastIndexOf('\\'));
if (SubKeyExist(MainKey))
{
Registry.CurrentUser.DeleteSubKeyTree(MainKey);
}
else
{
throw new Exception("Subkey does not exist!");
}
}
public bool SubKeyExist(string Subkey)
{
// Check if a Subkey exist
RegistryKey myKey = Registry.CurrentUser.OpenSubKey(Subkey);
if (myKey == null)
{
return false;
}
else
{
return true;
}
}
}
}

80
NX-Installation/Disclaimer.Designer.cs generated Normal file
View File

@ -0,0 +1,80 @@
namespace NX_Installation
{
partial class Disclaimer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Disclaimer));
this.btnDisclaimer = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btnDisclaimer
//
this.btnDisclaimer.Location = new System.Drawing.Point(154, 396);
this.btnDisclaimer.Name = "btnDisclaimer";
this.btnDisclaimer.Size = new System.Drawing.Size(75, 23);
this.btnDisclaimer.TabIndex = 0;
this.btnDisclaimer.Text = "Close";
this.btnDisclaimer.UseVisualStyleBackColor = true;
this.btnDisclaimer.Click += new System.EventHandler(this.btnDisclaimer_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.label1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(16, 16);
this.label1.TabIndex = 1;
this.label1.Text = resources.GetString("label1.Text");
//
// Disclaimer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(383, 431);
this.ControlBox = false;
this.Controls.Add(this.label1);
this.Controls.Add(this.btnDisclaimer);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Name = "Disclaimer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Disclaimer";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnDisclaimer;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NX_Installation
{
public partial class Disclaimer : Form
{
public Disclaimer(string filename)
{
InitializeComponent();
FileName = filename;
}
private string FileName { set; get; }
private void btnDisclaimer_Click(object sender, EventArgs e)
{
Logfile log = new Logfile(FileName);
log.Info("Disclaimer was read");
this.Close();
}
}
}

View File

@ -0,0 +1,225 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label1.Text" xml:space="preserve">
<value>DISCLAIMER / VERZICHTSERKLÄRUNG:
DIE SOFTWARE WIRD BIS AUF WIDERRUF ZUR VERFÜGUNG
GESTELLT, WIE SIE IST, OHNE JEGLICHE HAFTUNG
IRGENDEINER ART. BIS ZUM MAXIMAL, IN DIESEM FALL
GESETZLICH ERLAUBTEN, LEHNT DER AUTOR WEITERHIN
JEDE HAFTUNG AB, EINGESCHLOSSEN JEDE GARANTIE
UNTER KAUFLEUTEN, DIE GARANTIE FÜR DEN EINSATZ ZU
BESTIMMTEN ZWECKEN UND NICHTEINSETZBARKEIT. DIE
GESAMTE GEFAHR, DIE AUS DEM GEBRAUCH ODER DER
LEISTUNG VON DEM PRODUKT UND DEN UNTERLAGEN HER-
AUS ENTSTEHT, BLEIBT BEI DEM BENUTZER DIESER
SOFTWARE. SOWEIT GESETZLICH ZULÄSSIG, IST DER
AUTOR IN KEINEM FALL HAFTBAR FÜR IRGENDWELCHE
FOLGE-, ZUFÄLLIGEN, INDIREKTEN ODER ANDEREN
SCHÄDEN WELCHER ART AUCH IMMER (EINSCHLIESSLICH,
ABER NICHT BESCHRÄNKT AUF SCHÄDEN AUS ENTGANGENEN
GEWINN, GESCHÄFTSUNTERBRECHUNG, VERLUST VON GE-
SCHÄFTLICHEN INFORMATIONEN ODER VERMÖGENSSCHÄDEN),
DIE AUS DER VERWENDUNG ODER DER UNMÖGLICHKEIT DER
VERWENDUNG DES SOFTWAREPRODUKTS RESULTIEREN,
SELBST WENN DER AUTOR AUF DIE MÖGLICHKEIT SOLCHER
SCHÄDEN HINGEWIESEN WORDEN IST.
MIT DER INSTALLATION DER SOFTWARE, WIRD DIESE
VERZICHTSERKLÄRUNG VOM BENUTZER AKZEPTIERT.</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAgAAAAAACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJ7/IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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OvCP/ulQD/qZpv/zKy//8nrv//Qbb7/yWQz/8Adr6fAAAAAAAAAAAAAAAAAAAAAK81
AIHJQAD/9lgF//17Dv/+mhr//rYu//7QTv/+31v//upl//7yav/+92n//vtk//79Wf/+/U3//fxA//34
M//88Sn/++Yh//rZHf/3yh3/9bcd//GaCf/sfQD/o4pg/zGy//80s///WL/8/yOS0/8Ae8aQAAAAAAAA
AAAAAAAAsTUAgMdAAv/1Wgr//n0W//6dJv/+wVD//tZm//7kdv//7oP///SK///5if/++4H//vxz/8PB
VP/++1P//vdE//3wN//85yz/+9on//nLJf/2uSX/86Qi/46uDP+Jlwj/XJ10/yqv//9Pvf//bcX5/xuP
1P8Afs5AAAAAAAAAAACxNQCAw0AE//BZDv/+fR3//qZC//7GaP//2Xv//+eP///wof//9qv///mq///6
nv/SzIX/EgRJ/9bSVP/+9VP//e9E//3lOP/82TH/+sku//i5Lv+rxDP/o60j/1C6Df9viwj/Ro+//yyw
//9wyv//ccLz/wWI1b8AAAAAAAAAALI1AFC9Pwb/5lYR//55Iv/+sGD//8h3///ajf//6aX///K8///4
zf//+sv/08uq/yMPcf8TAGb/pJ9I//7xYP/+6lD//eFE//zVO//7xjf/2cI6/4fSQP+0sDv/VbsT/5Bn
BP90SiH/L6bt/1S///+K0///P6jn/wCK2TAAAAAApBIAHLg9B//XUhP/+346//+wbv//x4H//9mY///o
sv//887///vq//Ds3/80H4n/GgCM/xcAfP9VTTr//uxr//7lW//93E7//dBF//vCQf+e1kj/pMZH//OM
P/+xiCf/kF0E/2VgBf8lgrr/LrH//4bS//97yff/AI7ifwAAAAAAAAAAsjgFu8dME//xgEj//6x1///D
h///1pz//+W0///xzv/w6d7/Qy+T/xsAk/8pAtT/GQCK/zwzNP/Pu1z//t5j//7UV//9yU7//LxL/8DH
T/+wwlD/tK9O/9dpNf+PUwP/ki0A/xpnmMAssP//bcj//5HV/f8Akuq/AAAAAAAAAACqJgBXu0YQ/+KE
Wf/8p3n//7yJ///Pm///3q7//+n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AAAAMAAAADAAAAA4AAAAOAAAADwAAAB+AAAAfgA
AAfwAAB/4AAP/+AAf//AAH//+AB////8f/8=
</value>
</data>
</root>

View File

@ -0,0 +1,252 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NX_Installation
{
class EvaluateFreeDiskSpace
{
private string FileName { set; get; }
//Setzen des Logfile Dateinamens
/// <summary>
/// Sets the logfile filename
/// </summary>
/// <param name="filename">Path and filename. E.g.: "C:\TMP\NX-Installation.log"</param>
public EvaluateFreeDiskSpace(string filename)
{
FileName = filename;
}
const string laufwerk = "C";
//Evaluieren ob genügend Platz auf Laufwerk C:\ frei ist
/// <summary>
/// Evaluate whether enough free disk space is available.
/// </summary>
/// <param name="nxInstallFolder">This folder includes all NX installation files.</param>
/// <param name="nxDocInstallFolder">This folder includes all NX-Documentation installation files.</param>
/// <param name="NxDocumentation">Is <value>True</value> if doumentation will be installed. Is <value>False</value> if documentation will not be installed.</param>
/// <returns>If an error occurs or not enough free disk space is available, it is <value>True</value>, otherwise it is <value>False</value>.</returns>
public bool EvaluateDiskSpace(string nxInstallFolder, string nxDocInstallFolder, bool NxDocumentation)
{
Logfile log = new Logfile(FileName);
//log.Info("Evaluate free disk space on drive C:");
bool error = false;
//Freien Platz auf Laufwerk C:\ ermitteln
long free = DetermineFreeSpace(laufwerk);
if (free == -1)
{
error = true;
log.Error("Was not able to calculated free disk space on drive C:");
}
else
{
log.Info("Free disk space on drive C (calculated): " + free.ToString("#,####") + " Bytes");
}
//Größe des NX Installationsverzeichnisses ermitteln
long nxInstallSize = GetDirectorySize(nxInstallFolder);
if (nxInstallSize == -1)
{
error = true;
log.Error("Was not able to calculated NX installation file size");
}
else
{
log.Info("NX installation file size on disk (calculated): " + nxInstallSize.ToString("#,####") + " Bytes");
}
//Größe des NX Doc Installationsverzeichnisses ermitteln
long nxDocInstallSize;
if (NxDocumentation)
{
nxDocInstallSize = GetDirectorySize(nxDocInstallFolder);
if (nxDocInstallSize == -1)
{
error = true;
log.Error("Was not able to calculated NX documentation installation file size");
}
else
{
log.Info("NX documentation installation file size on disk (calculated): " + nxDocInstallSize.ToString("#,####") + " Bytes");
}
}
else
{
nxDocInstallSize = 0;
}
//NX Installationsfolder und NX Doc Installationsfolder addieren
long sizeInstallFolders = AddSizes(nxInstallSize, nxDocInstallSize);
if (sizeInstallFolders == -1)
{
error = true;
log.Error("Was not able to summarize NX installation file size and NX documentation installation file size");
}
else
{
log.Info("Total installation file size on disk (calculated): " + sizeInstallFolders.ToString("#,####") + " Bytes");
}
//Notwendigen Platzbedarf ermitteln = 4 mal die Summe aller Installationsdateien
long minSize = CalculateMinimumSize(sizeInstallFolders);
if (minSize == -4)
{
error = true; //Weil -1 in der Method mal 4 gerechnet wird
log.Error("Was not able to calculate the needed minimum free disk space");
}
else
{
log.Info("Minimum free disk space on drive C needed (calculated): " + minSize.ToString("#,####") + " Bytes");
}
//Differenz zwischen freiem und notwendigen Platz ermitteln und prüfen ob genug Platz frei ist
long diff = CalculateDifference(free, minSize);
if (diff < 0)
{
error = true; //Ist diff < 0, dann ist ein Fehler aufgetreten oder die Differenz ein Minusbtrag (zu wenig Platz)
if (diff == -1)
{
log.Error("Was not able to calculate the difference between free disk space and necessary disk space");
}
else
{
MessageBox.Show("Not enough disk space free!\nYou need at least\n" + minSize.ToString("#,####") + " Bytes\ndisk space free.\n\nPlease contact your\nlocal administrator.",
"Error!",
MessageBoxButtons.OK,
MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1);
log.Error("Not enough disk space free on drive C. At least " + sizeInstallFolders.ToString("#,####") + " Bytes additional free disk space on drice C will be needed.");
}
}
else
{
log.Info("Enough disk space free on drive C");
}
return error;
}
public long GetFreeSpace(string deviceName)
{
long frei = 0;
try
{
//Freien Speicherplatz ausgeben
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
if (d.IsReady)
{
if (d.Name == (deviceName + ":\\"))
{
frei = d.TotalFreeSpace;
}
}
}
}
catch
{
frei = -1;
}
return frei;
}
private long DetermineFreeSpace(string laufwerk)
{
// Alle Informationen eines bestimmten Laufwerks anzeigen
long value;
try
{
value = GetFreeSpace(laufwerk);
if (!(value >= 0)) value = -1;
}
catch
{
value = -1;
}
return value;
}
private long GetDirectorySize(string path)
{
long size = 0;
// get sub directories (recursive)
try
{
string[] subDirectories = Directory.GetDirectories(path);
foreach (string subDirectory in subDirectories)
size += GetDirectorySize(subDirectory);
}
catch
{
size = -1;
}
// get files and add size
try
{
string[] fileNames = Directory.GetFiles(path);
foreach (string fileName in fileNames)
{
FileInfo fileInfo = new FileInfo(fileName);
size += fileInfo.Length;
}
}
catch
{
size = -1;
}
return size;
}
private long AddSizes(long nxInstallSize, long nxDocInstallSize)
{
if (nxInstallSize != -1 & nxDocInstallSize != -1)
{
return nxInstallSize + nxDocInstallSize;
}
else
{
return -1;
}
}
private long CalculateMinimumSize(long sizeInstallFolders)
{
return sizeInstallFolders * 4;
}
private long CalculateDifference(long free, long sizeInstallFolders)
{
if (free != -1 & sizeInstallFolders != -1)
{
if ((free - sizeInstallFolders) == -1)
{
return -2;
}
else
{
return free - sizeInstallFolders;
}
}
else
{
return -1;
}
}
}
}

392
NX-Installation/FrmMain.Designer.cs generated Normal file
View File

@ -0,0 +1,392 @@
namespace NX_Installation
{
partial class FrmMain
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.btnInstall = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.gbxNxVersoin = new System.Windows.Forms.GroupBox();
this.rdbVersion3 = new System.Windows.Forms.RadioButton();
this.rdbVersion2 = new System.Windows.Forms.RadioButton();
this.rdbVersion1 = new System.Windows.Forms.RadioButton();
this.gbxLocation = new System.Windows.Forms.GroupBox();
this.cbxLocation = new System.Windows.Forms.ComboBox();
this.gbxDokumentation = new System.Windows.Forms.GroupBox();
this.rdbDocumentationNo = new System.Windows.Forms.RadioButton();
this.rdbDocumentationYes = new System.Windows.Forms.RadioButton();
this.gbxComputerType = new System.Windows.Forms.GroupBox();
this.rdbLaptop = new System.Windows.Forms.RadioButton();
this.rdbDesktop = new System.Windows.Forms.RadioButton();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.actionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.installToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cancelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.disclaimerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.gbxSystemMessage = new System.Windows.Forms.GroupBox();
this.lblSystemMessage = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.gbxNxVersoin.SuspendLayout();
this.gbxLocation.SuspendLayout();
this.gbxDokumentation.SuspendLayout();
this.gbxComputerType.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.gbxSystemMessage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// btnInstall
//
this.btnInstall.Location = new System.Drawing.Point(12, 333);
this.btnInstall.Name = "btnInstall";
this.btnInstall.Size = new System.Drawing.Size(75, 23);
this.btnInstall.TabIndex = 0;
this.btnInstall.Text = "&Install";
this.btnInstall.UseVisualStyleBackColor = true;
this.btnInstall.Click += new System.EventHandler(this.btnInstall_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(265, 333);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(83, 23);
this.btnCancel.TabIndex = 1;
this.btnCancel.Text = "&Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// gbxNxVersoin
//
this.gbxNxVersoin.Controls.Add(this.rdbVersion3);
this.gbxNxVersoin.Controls.Add(this.rdbVersion2);
this.gbxNxVersoin.Controls.Add(this.rdbVersion1);
this.gbxNxVersoin.Location = new System.Drawing.Point(12, 27);
this.gbxNxVersoin.Name = "gbxNxVersoin";
this.gbxNxVersoin.Size = new System.Drawing.Size(224, 88);
this.gbxNxVersoin.TabIndex = 2;
this.gbxNxVersoin.TabStop = false;
this.gbxNxVersoin.Text = "NX-Version";
//
// rdbVersion3
//
this.rdbVersion3.AutoSize = true;
this.rdbVersion3.Location = new System.Drawing.Point(6, 65);
this.rdbVersion3.Name = "rdbVersion3";
this.rdbVersion3.Size = new System.Drawing.Size(40, 17);
this.rdbVersion3.TabIndex = 2;
this.rdbVersion3.TabStop = true;
this.rdbVersion3.Text = "NX";
this.rdbVersion3.UseVisualStyleBackColor = true;
this.rdbVersion3.CheckedChanged += new System.EventHandler(this.rdbVersion3_CheckedChanged);
//
// rdbVersion2
//
this.rdbVersion2.AutoSize = true;
this.rdbVersion2.Location = new System.Drawing.Point(6, 42);
this.rdbVersion2.Name = "rdbVersion2";
this.rdbVersion2.Size = new System.Drawing.Size(40, 17);
this.rdbVersion2.TabIndex = 1;
this.rdbVersion2.TabStop = true;
this.rdbVersion2.Text = "NX";
this.rdbVersion2.UseVisualStyleBackColor = true;
this.rdbVersion2.CheckedChanged += new System.EventHandler(this.rdbVersion2_CheckedChanged);
//
// rdbVersion1
//
this.rdbVersion1.AutoSize = true;
this.rdbVersion1.Location = new System.Drawing.Point(6, 19);
this.rdbVersion1.Name = "rdbVersion1";
this.rdbVersion1.Size = new System.Drawing.Size(40, 17);
this.rdbVersion1.TabIndex = 0;
this.rdbVersion1.TabStop = true;
this.rdbVersion1.Text = "NX";
this.rdbVersion1.UseVisualStyleBackColor = true;
this.rdbVersion1.CheckedChanged += new System.EventHandler(this.rdbVersion1_CheckedChanged);
//
// gbxLocation
//
this.gbxLocation.Controls.Add(this.cbxLocation);
this.gbxLocation.Location = new System.Drawing.Point(12, 121);
this.gbxLocation.Name = "gbxLocation";
this.gbxLocation.Size = new System.Drawing.Size(336, 48);
this.gbxLocation.TabIndex = 3;
this.gbxLocation.TabStop = false;
this.gbxLocation.Text = "Location";
//
// cbxLocation
//
this.cbxLocation.FormattingEnabled = true;
this.cbxLocation.Location = new System.Drawing.Point(6, 19);
this.cbxLocation.Name = "cbxLocation";
this.cbxLocation.Size = new System.Drawing.Size(324, 21);
this.cbxLocation.TabIndex = 0;
this.cbxLocation.Text = "Please select your location";
this.cbxLocation.SelectedIndexChanged += new System.EventHandler(this.cbxLocation_SelectedIndexChanged);
//
// gbxDokumentation
//
this.gbxDokumentation.Controls.Add(this.rdbDocumentationNo);
this.gbxDokumentation.Controls.Add(this.rdbDocumentationYes);
this.gbxDokumentation.Location = new System.Drawing.Point(250, 74);
this.gbxDokumentation.Name = "gbxDokumentation";
this.gbxDokumentation.Size = new System.Drawing.Size(98, 41);
this.gbxDokumentation.TabIndex = 4;
this.gbxDokumentation.TabStop = false;
this.gbxDokumentation.Text = "Dokumentation";
//
// rdbDocumentationNo
//
this.rdbDocumentationNo.AutoSize = true;
this.rdbDocumentationNo.Location = new System.Drawing.Point(55, 19);
this.rdbDocumentationNo.Name = "rdbDocumentationNo";
this.rdbDocumentationNo.Size = new System.Drawing.Size(39, 17);
this.rdbDocumentationNo.TabIndex = 1;
this.rdbDocumentationNo.TabStop = true;
this.rdbDocumentationNo.Text = "No";
this.rdbDocumentationNo.UseVisualStyleBackColor = true;
this.rdbDocumentationNo.CheckedChanged += new System.EventHandler(this.rdbDocumentationNo_CheckedChanged);
//
// rdbDocumentationYes
//
this.rdbDocumentationYes.AutoSize = true;
this.rdbDocumentationYes.Location = new System.Drawing.Point(6, 19);
this.rdbDocumentationYes.Name = "rdbDocumentationYes";
this.rdbDocumentationYes.Size = new System.Drawing.Size(43, 17);
this.rdbDocumentationYes.TabIndex = 0;
this.rdbDocumentationYes.TabStop = true;
this.rdbDocumentationYes.Text = "Yes";
this.rdbDocumentationYes.UseVisualStyleBackColor = true;
this.rdbDocumentationYes.CheckedChanged += new System.EventHandler(this.rdbDocumentationYes_CheckedChanged);
//
// gbxComputerType
//
this.gbxComputerType.Controls.Add(this.rdbLaptop);
this.gbxComputerType.Controls.Add(this.rdbDesktop);
this.gbxComputerType.Location = new System.Drawing.Point(12, 175);
this.gbxComputerType.Name = "gbxComputerType";
this.gbxComputerType.Size = new System.Drawing.Size(336, 42);
this.gbxComputerType.TabIndex = 5;
this.gbxComputerType.TabStop = false;
this.gbxComputerType.Text = "Computer type";
//
// rdbLaptop
//
this.rdbLaptop.AutoSize = true;
this.rdbLaptop.Location = new System.Drawing.Point(266, 19);
this.rdbLaptop.Name = "rdbLaptop";
this.rdbLaptop.Size = new System.Drawing.Size(58, 17);
this.rdbLaptop.TabIndex = 2;
this.rdbLaptop.TabStop = true;
this.rdbLaptop.Text = "Laptop";
this.rdbLaptop.UseVisualStyleBackColor = true;
this.rdbLaptop.CheckedChanged += new System.EventHandler(this.rdbLaptop_CheckedChanged);
//
// rdbDesktop
//
this.rdbDesktop.AutoSize = true;
this.rdbDesktop.Location = new System.Drawing.Point(6, 19);
this.rdbDesktop.Name = "rdbDesktop";
this.rdbDesktop.Size = new System.Drawing.Size(65, 17);
this.rdbDesktop.TabIndex = 0;
this.rdbDesktop.TabStop = true;
this.rdbDesktop.Text = "Desktop";
this.rdbDesktop.UseVisualStyleBackColor = true;
this.rdbDesktop.CheckedChanged += new System.EventHandler(this.rdbDesktop_CheckedChanged);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.actionToolStripMenuItem,
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(360, 24);
this.menuStrip1.TabIndex = 6;
this.menuStrip1.Text = "menuStrip1";
//
// actionToolStripMenuItem
//
this.actionToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.installToolStripMenuItem,
this.cancelToolStripMenuItem});
this.actionToolStripMenuItem.Name = "actionToolStripMenuItem";
this.actionToolStripMenuItem.Size = new System.Drawing.Size(54, 20);
this.actionToolStripMenuItem.Text = "&Action";
//
// installToolStripMenuItem
//
this.installToolStripMenuItem.Name = "installToolStripMenuItem";
this.installToolStripMenuItem.Size = new System.Drawing.Size(110, 22);
this.installToolStripMenuItem.Text = "&Install";
this.installToolStripMenuItem.Click += new System.EventHandler(this.installToolStripMenuItem_Click);
//
// cancelToolStripMenuItem
//
this.cancelToolStripMenuItem.Name = "cancelToolStripMenuItem";
this.cancelToolStripMenuItem.Size = new System.Drawing.Size(110, 22);
this.cancelToolStripMenuItem.Text = "&Cancel";
this.cancelToolStripMenuItem.Click += new System.EventHandler(this.cancelToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.helpToolStripMenuItem1,
this.aboutToolStripMenuItem,
this.disclaimerToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.helpToolStripMenuItem.Text = "&Help";
//
// helpToolStripMenuItem1
//
this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(129, 22);
this.helpToolStripMenuItem1.Text = "&Help";
this.helpToolStripMenuItem1.Click += new System.EventHandler(this.helpToolStripMenuItem1_Click);
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(129, 22);
this.aboutToolStripMenuItem.Text = "&About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
// disclaimerToolStripMenuItem
//
this.disclaimerToolStripMenuItem.Name = "disclaimerToolStripMenuItem";
this.disclaimerToolStripMenuItem.Size = new System.Drawing.Size(129, 22);
this.disclaimerToolStripMenuItem.Text = "&Disclaimer";
this.disclaimerToolStripMenuItem.Click += new System.EventHandler(this.disclaimerToolStripMenuItem_Click);
//
// gbxSystemMessage
//
this.gbxSystemMessage.Controls.Add(this.lblSystemMessage);
this.gbxSystemMessage.Location = new System.Drawing.Point(12, 223);
this.gbxSystemMessage.Name = "gbxSystemMessage";
this.gbxSystemMessage.Size = new System.Drawing.Size(336, 104);
this.gbxSystemMessage.TabIndex = 7;
this.gbxSystemMessage.TabStop = false;
this.gbxSystemMessage.Text = "System message";
//
// lblSystemMessage
//
this.lblSystemMessage.AutoSize = true;
this.lblSystemMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblSystemMessage.ForeColor = System.Drawing.SystemColors.ControlText;
this.lblSystemMessage.Location = new System.Drawing.Point(6, 16);
this.lblSystemMessage.Name = "lblSystemMessage";
this.lblSystemMessage.Size = new System.Drawing.Size(124, 13);
this.lblSystemMessage.TabIndex = 0;
this.lblSystemMessage.Text = "Please choose an option";
//
// pictureBox1
//
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pictureBox1.Location = new System.Drawing.Point(270, 31);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(64, 41);
this.pictureBox1.TabIndex = 8;
this.pictureBox1.TabStop = false;
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(360, 368);
this.ControlBox = false;
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.gbxSystemMessage);
this.Controls.Add(this.gbxComputerType);
this.Controls.Add(this.gbxDokumentation);
this.Controls.Add(this.gbxLocation);
this.Controls.Add(this.gbxNxVersoin);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnInstall);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.MaximizeBox = false;
this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "NX-Installation";
this.Load += new System.EventHandler(this.FrmMain_Load);
this.gbxNxVersoin.ResumeLayout(false);
this.gbxNxVersoin.PerformLayout();
this.gbxLocation.ResumeLayout(false);
this.gbxDokumentation.ResumeLayout(false);
this.gbxDokumentation.PerformLayout();
this.gbxComputerType.ResumeLayout(false);
this.gbxComputerType.PerformLayout();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.gbxSystemMessage.ResumeLayout(false);
this.gbxSystemMessage.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnInstall;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.GroupBox gbxNxVersoin;
private System.Windows.Forms.RadioButton rdbVersion3;
private System.Windows.Forms.RadioButton rdbVersion2;
private System.Windows.Forms.RadioButton rdbVersion1;
private System.Windows.Forms.GroupBox gbxLocation;
private System.Windows.Forms.ComboBox cbxLocation;
private System.Windows.Forms.GroupBox gbxDokumentation;
private System.Windows.Forms.RadioButton rdbDocumentationNo;
private System.Windows.Forms.RadioButton rdbDocumentationYes;
private System.Windows.Forms.GroupBox gbxComputerType;
private System.Windows.Forms.RadioButton rdbLaptop;
private System.Windows.Forms.RadioButton rdbDesktop;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem actionToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem installToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem cancelToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.GroupBox gbxSystemMessage;
private System.Windows.Forms.Label lblSystemMessage;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.ToolStripMenuItem disclaimerToolStripMenuItem;
}
}

2050
NX-Installation/FrmMain.cs Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhNgAlAIcAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBmAABmMwBmZgBm
mQ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rQAUb
SpxIEWEpiBUzakz4EGLEjSAndgy06mPIkwoPCQqEyJRJlDCxsSo1ExHBmDixISplk+DNnCd9ErzGiqjB
VaZKlfKECVMpoA6Flkr2yRM0TJGyao0k7GVMgkqXNs1aa2s0a1jLRqqFyRRUgaXIbtUqKastgdc+Za37
9C3cSHXXAlabFRM2otdKSarV169AvWUDa7UVaZisaLOgzWLlyfFBznMjUc5aKtplWaygefXLKi3gucpO
s2ol1LPB1nK3amYVTSirlrYHYp0MGFor1EIFrTpkalXwUq4Ly1LtmzlLjLYVb+VFmzbBncqVB8s3GHdx
pE/IfUK0Od6iVpo+d65uj01vJJe16TP8VCv/wa0JAbhXVgECKJEnPxUYGEJaGRbaf4URCJNcWEFYlkCR
8DIghnZJOOFc/y3I4VrDDXdJJDm9tlZdBjUYIl1qSQIUWZKhiI1gNraYG4szZnVJYBWqWKCBMwa2i1yS
nAiYgoK9JZiMgSWJI4M4vgaVVpdgmFaUENY1nFY98njjl5FkOSJbJK6Y44cX6qjmiFbeWCNOe5nZYok3
DlYmhGnGFMlwAZp344lJBvhlQAA7
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAgAAAAAACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJ7/IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ6cgAGOcbwBgms8AWpHgAAAAAAAAAAAAAAAAeiUAMI9E
AHBuMAB/UFACf05QAn9OUAJ/gWEAT28fABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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wf/+/U3//fxA//34
M//88Sn/++Yh//rZHf/3yh3/9bcd//GaCf/sfQD/o4pg/zGy//80s///WL/8/yOS0/8Ae8aQAAAAAAAA
AAAAAAAAsTUAgMdAAv/1Wgr//n0W//6dJv/+wVD//tZm//7kdv//7oP///SK///5if/++4H//vxz/8PB
VP/++1P//vdE//3wN//85yz/+9on//nLJf/2uSX/86Qi/46uDP+Jlwj/XJ10/yqv//9Pvf//bcX5/xuP
1P8Afs5AAAAAAAAAAACxNQCAw0AE//BZDv/+fR3//qZC//7GaP//2Xv//+eP///wof//9qv///mq///6
nv/SzIX/EgRJ/9bSVP/+9VP//e9E//3lOP/82TH/+sku//i5Lv+rxDP/o60j/1C6Df9viwj/Ro+//yyw
//9wyv//ccLz/wWI1b8AAAAAAAAAALI1AFC9Pwb/5lYR//55Iv/+sGD//8h3///ajf//6aX///K8///4
zf//+sv/08uq/yMPcf8TAGb/pJ9I//7xYP/+6lD//eFE//zVO//7xjf/2cI6/4fSQP+0sDv/VbsT/5Bn
BP90SiH/L6bt/1S///+K0///P6jn/wCK2TAAAAAApBIAHLg9B//XUhP/+346//+wbv//x4H//9mY///o
sv//887///vq//Ds3/80H4n/GgCM/xcAfP9VTTr//uxr//7lW//93E7//dBF//vCQf+e1kj/pMZH//OM
P/+xiCf/kF0E/2VgBf8lgrr/LrH//4bS//97yff/AI7ifwAAAAAAAAAAsjgFu8dME//xgEj//6x1///D
h///1pz//+W0///xzv/w6d7/Qy+T/xsAk/8pAtT/GQCK/zwzNP/Pu1z//t5j//7UV//9yU7//LxL/8DH
T/+wwlD/tK9O/9dpNf+PUwP/ki0A/xpnmMAssP//bcj//5HV/f8Akuq/AAAAAAAAAACqJgBXu0YQ/+KE
Wf/8p3n//7yJ///Pm///3q7//+nB/1M8nf8bAJT/KwbO/zMM3f8cAJr/Nyo+/3KERP+i7nH//sxf//3B
WP/8tFX/otRc/5LTXP+8pFb/s38//25vBv+VLgDfAIrdny2w//9ryP//j9X//ymp9b8AAAAAAA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,0 +1,51 @@
namespace NX_Installation
{
partial class FrmSplash
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmSplash));
this.SuspendLayout();
//
// FrmSplash
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(1000, 300);
this.ControlBox = false;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "FrmSplash";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmSplash";
this.ResumeLayout(false);
}
#endregion
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NX_Installation
{
public partial class FrmSplash : Form
{
public FrmSplash()
{
InitializeComponent();
}
}
}

15126
NX-Installation/FrmSplash.resx Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NX_Installation
{
class GetPaths
{
private string FileName { set; get; }
public GetPaths(string filename)
{
FileName = filename;
}
/// <summary>
/// Gets the startup folder
/// </summary>
/// <returns></returns>
public string GetStartupFolder()
{
Logfile log = new Logfile(FileName);
log.Info("Determined startup folder: " + Application.StartupPath);
// Startuppfad auslesen
return Application.StartupPath;
}
}
}

View File

@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NX_Installation
{
class GetTransferParameters
{
private string FileName { set; get; }
public GetTransferParameters(string filename)
{
FileName = filename;
}
/// <summary>
/// Delivers the transfer parameters in a string array
/// </summary>
/// <param name="arrayNumber">Maximum numbers of values you want to get.</param>
/// <returns></returns>
public string[] GetTransferParameter(int arrayNumber)
{
Logfile log = new Logfile(FileName);
log.Info("Determine transfer parameters");
int arrayLenght = ArrayLenght();
string[] allParameter = new string[arrayLenght];
allParameter = ReadTransferParameter();
foreach (String s in allParameter) //Werte in die Logdatei schreiben
{
log.Info("Determined transfer parameters: " + s);
}
return ShortenPathParameter(allParameter, arrayNumber);
}
private string[] ReadTransferParameter()
{
return Environment.GetCommandLineArgs();
}
private string[] ShortenPathParameter(string[] allParameter, int arrayNumber)
{
//Den ersten Parameter (= Dateipfad) ausfiltern
int arrayLenght = allParameter.Length - 1;
if (arrayLenght > arrayNumber) arrayLenght = arrayNumber;
string[] parameter = new string[arrayLenght];
for (int i = 0; i < arrayLenght; i++)
{
parameter[i] = allParameter[i + 1];
}
return parameter;
}
/// <summary>
/// Returns the lenght of an Array
/// </summary>
/// <returns></returns>
public int ArrayLenght()
{
return ReadTransferParameter().Length;
}
/// <summary>
/// Check whether a arrayfield is empty
/// </summary>
/// <param name="transferParameter">Array you want to evaluate</param>
/// <param name="maxArrayLenght">Maximum array count</param>
/// <returns></returns>
public bool ParametersAreEmpty(string[] transferParameter, int maxArrayLenght)
{
Logfile log = new Logfile(FileName);
log.Info("Check whether transfer parameters are valid");
bool empty = false;
if (transferParameter.Length < maxArrayLenght) return empty = true;
for (int i = 0; i < maxArrayLenght; i++)
{
if (transferParameter[i] == "") empty = true;
}
if (empty)
{
log.Warn("Transfer parameter is empty");
}
else
{
log.Info("Transfer parameter has a value");
}
return empty;
}
}
}

View File

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NX_Installation
{
class GetWindowsInformation
{
/// <summary>
/// Returns Windows Informations
/// </summary>
/// <param name="arg">Valid arguments are 'MajorVersion', 'MinorVersion', 'Revision', 'Build' and 'PlatformId'.</param>
/// <returns></returns>
public string WindowsVersion(string arg)
{
Version version = Environment.OSVersion.Version;
PlatformID platformId = Environment.OSVersion.Platform;
switch (arg)
{
case "MajorVersion":
arg = Convert.ToString(version.Major);
break;
case "MinorVersion":
arg = Convert.ToString(version.Minor);
break;
case "Revision":
arg = Convert.ToString(version.Revision);
break;
case "Build":
arg = Convert.ToString(version.Build);
break;
case "PlatformId":
arg = Convert.ToString(platformId);
break;
}
return arg;
}
}
}

View File

@ -0,0 +1,256 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace NX_Installation
{
class GetWindowsMainVersionInfo
{
/* API-Deklarationen */
[StructLayout(LayoutKind.Sequential)]
private struct OSVERSIONINFOEX
{
public int dwOSVersionInfoSize;
public int dwMajorVersion;
public int dwMinorVersion;
public int dwBuildNumber;
public int dwPlatformId;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)]
public string szCSDVersion;
public Int16 wServicePackMajor;
public Int16 wServicePackMinor;
public Int16 wSuiteMask;
public Byte wProductType;
public Byte wReserved;
}
[DllImport("kernel32")]
static extern bool GetVersionEx(ref OSVERSIONINFOEX osvi);
private const int VER_NT_WORKSTATION = 0x0000001;
/* Aufzählung für die Windows-Hauptversion */
public enum WindowsMainVersion
{
WindowsXP,
WindowsServer2003,
WindowsXP_64,
WindowsVista,
WindowsVista_64,
WindowsServer2008,
Windows7,
Windows7_64,
WindowsServer2008R2,
Windows8,
Windows8_64,
Windows10,
Windows10_64,
WindowsServer2012,
Unknown
}
/* Ermittelt die Windows-Hauptversion */
/// <summary>
/// Returns the Windows Main Version
/// </summary>
/// <returns></returns>
public WindowsMainVersion GetWindowsMainVersion()
{
OSVERSIONINFOEX osVersionInfo = new OSVERSIONINFOEX();
osVersionInfo.dwOSVersionInfoSize = Marshal.SizeOf(osVersionInfo);
if (GetVersionEx(ref osVersionInfo))
{
switch (osVersionInfo.dwMajorVersion)
{
case 5:
if (Environment.OSVersion.Version.Minor == 1)
{
return WindowsMainVersion.WindowsXP;
}
else if (Environment.OSVersion.Version.Minor == 2)
{
if (osVersionInfo.wProductType == VER_NT_WORKSTATION)
{
return WindowsMainVersion.WindowsXP_64;
}
else
{
return WindowsMainVersion.WindowsServer2003;
}
}
else
{
return WindowsMainVersion.Unknown;
}
case 6:
if (Environment.OSVersion.Version.Minor == 0)
{
if (osVersionInfo.wProductType == VER_NT_WORKSTATION)
{
if (Convert.ToString(GetPlatform()) == "X86")
{
return WindowsMainVersion.WindowsVista;
}
if (Convert.ToString(GetPlatform()) == "X64")
{
return WindowsMainVersion.WindowsVista_64;
}
else
{
throw new Exception("GetPlatform has no valid value");
}
}
else
{
return WindowsMainVersion.WindowsServer2008;
}
}
else if (Environment.OSVersion.Version.Minor == 1)
{
if (osVersionInfo.wProductType == VER_NT_WORKSTATION)
{
if (Convert.ToString(GetPlatform()) == "X86")
{
return WindowsMainVersion.Windows7;
}
if (Convert.ToString(GetPlatform()) == "X64")
{
return WindowsMainVersion.Windows7_64;
}
else
{
throw new Exception("GetPlatform has no valid value");
}
}
else
{
return WindowsMainVersion.WindowsServer2008R2;
}
}
else if (Environment.OSVersion.Version.Minor == 2)
{
if (osVersionInfo.wProductType == VER_NT_WORKSTATION)
{
if (Convert.ToString(GetPlatform()) == "X86")
{
return WindowsMainVersion.Windows8;
}
if (Convert.ToString(GetPlatform()) == "X64")
{
return WindowsMainVersion.Windows8_64;
}
else
{
throw new Exception("GetPlatform has no valid value");
}
}
else
{
return WindowsMainVersion.WindowsServer2012;
}
}
return WindowsMainVersion.Unknown;
case 10:
if (Environment.OSVersion.Version.Minor == 0)
{
//return WindowsMainVersion.Windows10_64;
if (osVersionInfo.wProductType == VER_NT_WORKSTATION)
{
if (Convert.ToString(GetPlatform()) == "X86")
{
return WindowsMainVersion.Windows10;
}
if (Convert.ToString(GetPlatform()) == "X64")
{
return WindowsMainVersion.Windows10_64;
}
else
{
throw new Exception("GetPlatform has no valid value");
}
}
else
{
return WindowsMainVersion.WindowsServer2012;
}
}
else
{
return WindowsMainVersion.Unknown;
}
default:
return WindowsMainVersion.Unknown;
}
}
else
{
throw new Exception("GetVersionEx provides false back");
}
}
public enum Platform
{
X86,
X64,
Unknown
}
internal const ushort PROCESSOR_ARCHITECTURE_INTEL = 0;
internal const ushort PROCESSOR_ARCHITECTURE_IA64 = 6;
internal const ushort PROCESSOR_ARCHITECTURE_AMD64 = 9;
internal const ushort PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF;
[StructLayout(LayoutKind.Sequential)]
internal struct SYSTEM_INFO
{
public ushort wProcessorArchitecture;
public ushort wReserved;
public uint dwPageSize;
public IntPtr lpMinimumApplicationAddress;
public IntPtr lpMaximumApplicationAddress;
public UIntPtr dwActiveProcessorMask;
public uint dwNumberOfProcessors;
public uint dwProcessorType;
public uint dwAllocationGranularity;
public ushort wProcessorLevel;
public ushort wProcessorRevision;
};
[DllImport("kernel32.dll")]
internal static extern void GetNativeSystemInfo(ref SYSTEM_INFO lpSystemInfo);
[DllImport("kernel32.dll")]
internal static extern void GetSystemInfo(ref SYSTEM_INFO lpSystemInfo);
public static Platform GetPlatform()
{
SYSTEM_INFO sysInfo = new SYSTEM_INFO();
if (System.Environment.OSVersion.Version.Major > 5 ||
(System.Environment.OSVersion.Version.Major == 5 && System.Environment.OSVersion.Version.Minor >= 1))
{
GetNativeSystemInfo(ref sysInfo);
}
else
{
GetSystemInfo(ref sysInfo);
}
switch (sysInfo.wProcessorArchitecture)
{
case PROCESSOR_ARCHITECTURE_IA64:
case PROCESSOR_ARCHITECTURE_AMD64:
return Platform.X64;
case PROCESSOR_ARCHITECTURE_INTEL:
return Platform.X86;
default:
return Platform.Unknown;
}
}
}
}

View File

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NX_Installation
{
class Logfile
{
private string FileName { set; get; }
/// <summary>
/// Name of the logfile and path where the logfile will be located
/// </summary>
/// <param name="filename"></param>
public Logfile(string filename)
{
FileName = filename;
}
/// <summary>
/// Writes an info massage into the logfile
/// </summary>
/// <param name="message">This message will be write into the logfile</param>
public void Info(string message)
{
Logtext("INFO ", message);
}
/// <summary>
/// Writes a warn massage into the logfile
/// </summary>
/// <param name="message">This message will be write into the logfile</param>
public void Warn(string message)
{
Logtext("WARN ", message);
}
/// <summary>
/// Writes an error massage into the logfile
/// </summary>
/// <param name="message">This message will be write into the logfile</param>
public void Error(string message)
{
Logtext("ERROR", message);
}
/// <summary>
/// Writes a fatal error massage into the logfile
/// </summary>
/// <param name="message">This message will be write into the logfile</param>
public void Fatal(string message)
{
Logtext("FATAL", message);
}
private string Date()
{
return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
}
private void Logtext(string status, string message)
{
StreamWriter myFile = new StreamWriter(FileName, true);
myFile.Write(status + " - " + Date() + " - " + message + "\n");
myFile.Close();
}
}
}

View File

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D3490F7D-C5CB-4769-8710-7DDB4232A945}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>NX_Installation</RootNamespace>
<AssemblyName>NX-Installation</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>NXinstall.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CreateReadWriteDeleteRegistry.cs" />
<Compile Include="Disclaimer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Disclaimer.Designer.cs">
<DependentUpon>Disclaimer.cs</DependentUpon>
</Compile>
<Compile Include="EvaluateFreeDiscSpace.cs" />
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="FrmSplash.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmSplash.Designer.cs">
<DependentUpon>FrmSplash.cs</DependentUpon>
</Compile>
<Compile Include="GetPaths.cs" />
<Compile Include="GetTransferParameters.cs" />
<Compile Include="GetWindowsInformation.cs" />
<Compile Include="Logfile.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReadWriteINI.cs" />
<Compile Include="ReadWriteRegistry.cs" />
<Compile Include="Task.cs" />
<Compile Include="WindowsVersion.cs" />
<EmbeddedResource Include="Disclaimer.resx">
<DependentUpon>Disclaimer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmSplash.resx">
<DependentUpon>FrmSplash.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="NXinstall.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NX_Installation
{
static class Program
{
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmMain());
}
}
}

View File

@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("NX-Installation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NX-Installation")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("d3490f7d-c5cb-4769-8710-7ddb4232a945")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.*")]
// [assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion: 4.0.30319.42000
//
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
// der Code neu generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace NX_Installation.Properties
{
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NX_Installation.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace NX_Installation.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace NX_Installation
{
class ReadWriteINI
{
// --------------------------------------------------------------
// INI_Lesen schreiben
//
// V1.0 - 20090820
// Zum auslesen bzw. beschreiben von INI-Dateien
// --------------------------------------------------------------
// --------------------------------------------------------------
// Beispiel für den Aufruf der Funktion:
//
// - Wert auslesen:
// string ini_file = @"D:\Test.ini";
// string ini_section = "Sektion 1";
// string ini_key = "Wert 1";
// string ini_value = "";
// INI_LesenSchreiben INI_Lesen = new INI_LesenSchreiben();
// INI_Lesen.IniFile(ini_file);
// string ini_value = INI_Lesen.IniReadValue(ini_section, ini_key);
// // ini_value enthält den Wert der INI-Zelle
//
// - Wert schreiben:
// string ini_file = @"D:\Test.ini";
// string ini_section = "Sektion 1";
// string ini_key = "Wert 1";
// string ini_value = "";
// INI_LesenSchreiben INI_Schreiben = new INI_LesenSchreiben();
// INI_Schreiben.IniFile(ini_file);
// INI_Schreiben.IniWriteValue(ini_section, ini_key, ini_value);
//
// - Legende:
// ini_file --> Pfad und Dateiname der INI-Datei
// ini_section --> Die Gruppe aus der gelesen/in die geschrieben wird
// ini_key --> Schlüssel aus dem gelesen/in den geschrieben wird
// ini_value --> Wert der in der Zelle steht/in die Zelle geschrieben wird
// --------------------------------------------------------------
public string path;
[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section,
string key, string val, string filePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section,
string key, string def, StringBuilder retVal,
int size, string filePath);
public void IniFile(string INIPath)
{
path = INIPath;
}
public void IniWriteValue(string Section, string Key, string Value)
{
WritePrivateProfileString(Section, Key, " " + Value, this.path);
}
public string IniReadValue(string Section, string Key)
{
StringBuilder temp = new StringBuilder(255);
int i = GetPrivateProfileString(Section, Key, "", temp, 255, this.path);
return temp.ToString();
}
}
}

View File

@ -0,0 +1,277 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;
namespace NX_Installation
{
class ReadWriteRegistry
{
CreateReadWriteDeleteRegistry reg =
new CreateReadWriteDeleteRegistry();
public string ReadNxOnlineFromRegistry()
{
reg.SubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
reg.Key = "NX_VAI_ONLINE";
RegistryKey newKey = Registry.LocalMachine.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetNxOnlineToRegistry(string NxOnline)
{
reg.SubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
reg.Key = "NX_VAI_ONLINE";
reg.Value = NxOnline;
RegistryKey newKey = Registry.LocalMachine.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadNxOfflineFromRegistry()
{
reg.SubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
reg.Key = "NX_VAI_OFFLINE";
RegistryKey newKey = Registry.LocalMachine.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetNxOfflineToRegistry(string NxOffline)
{
reg.SubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
reg.Key = "NX_VAI_OFFLINE";
reg.Value = NxOffline;
RegistryKey newKey = Registry.LocalMachine.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadLocationFromRegistry()
{
reg.SubKey = @"SOFTWARE\NX-Portal";
reg.Key = "Location";
return reg.ReadSubkey();
}
public void SetLocationToRegistry(string Location)
{
reg.SubKey = @"SOFTWARE\NX-Portal";
reg.Key = "Location";
reg.Value = Location;
reg.WriteSubkey();
}
public string ReadUserprofileFromRegistry()
{
reg.SubKey = @"SOFTWARE\NX-Portal";
reg.Key = "Userprofile";
return reg.ReadSubkey();
}
public void SetUserprofileToRegistry(string Userprofile)
{
reg.SubKey = @"SOFTWARE\NX-Portal";
reg.Key = "Userprofile";
reg.Value = Userprofile;
reg.WriteSubkey();
}
public string ReadComputerTypeFromRegistry()
{
reg.SubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
reg.Key = "COMPUTER_TYPE";
RegistryKey newKey = Registry.LocalMachine.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetComputerTypeToRegistry(string ComputerType)
{
reg.SubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
reg.Key = "COMPUTER_TYPE";
reg.Value = ComputerType;
RegistryKey newKey = Registry.LocalMachine.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadConnectionTypeFromRegistry()
{
reg.SubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
reg.Key = "CONNECTION_TYPE";
RegistryKey newKey = Registry.LocalMachine.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetConnectionTypeToRegistry(string ConnectionType)
{
reg.SubKey = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
reg.Key = "CONNECTION_TYPE";
reg.Value = ConnectionType;
RegistryKey newKey = Registry.LocalMachine.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadUgiiBaseDirFromRegistry()
{
reg.SubKey = @"Environment";
reg.Key = "UGII_BASE_DIR";
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetUgiiBaseDirToRegistry(string UgiiBaseDir)
{
reg.SubKey = @"Environment";
reg.Key = "UGII_BASE_DIR";
reg.Value = UgiiBaseDir;
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadUgiiRootDirFromRegistry()
{
reg.SubKey = @"Environment";
reg.Key = "UGII_ROOT_DIR";
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetUgiiRootDirToRegistry(string UgiiRootDir)
{
reg.SubKey = @"Environment";
reg.Key = "UGII_ROOT_DIR";
reg.Value = UgiiRootDir;
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadUgiiLangFromRegistry()
{
reg.SubKey = @"Environment";
reg.Key = "UGII_LANG";
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetUgiiLangToRegistry(string UgiiLang)
{
reg.SubKey = @"Environment";
reg.Key = "UGII_LANG";
reg.Value = UgiiLang;
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadUgiiTmpDirFromRegistry()
{
reg.SubKey = @"Environment";
reg.Key = "UGII_TMP_DIR";
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetUgiiTmpDirToRegistry(string UgiiTmpDir)
{
reg.SubKey = @"Environment";
reg.Key = "UGII_TMP_DIR";
reg.Value = UgiiTmpDir;
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadUgsLicenseServerFromRegistry()
{
reg.SubKey = @"Environment";
reg.Key = "UGS_LICENSE_SERVER";
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetUgsLicenseServerToRegistry(string UgsLicenseServer)
{
reg.SubKey = @"Environment";
reg.Key = "UGS_LICENSE_SERVER";
reg.Value = UgsLicenseServer;
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadUgsLicenseBundleFromRegistry()
{
reg.SubKey = @"Environment";
reg.Key = "UGS_LICENSE_BUNDLE";
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetUgsLicenseBundleToRegistry(string UgsLicenseBundle)
{
reg.SubKey = @"Environment";
reg.Key = "UGS_LICENSE_BUNDLE";
reg.Value = UgsLicenseBundle;
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadMaxFitBoxSizeFromRegistry()
{
reg.SubKey = @"Environment";
reg.Key = "UGII_MAX_FIT_BOX_SIZE";
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetMaxFitBoxSizeToRegistry(string MaxFitBoxSize)
{
reg.SubKey = @"Environment";
reg.Key = "UGII_MAX_FIT_BOX_SIZE";
reg.Value = MaxFitBoxSize;
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
public string ReadJavaHomeFromRegistry()
{
reg.SubKey = @"Environment";
reg.Key = "JAVA_HOME";
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
return newKey.GetValue(reg.Key).ToString();
}
public void SetJavaHomeToRegistry(string JavaHome)
{
reg.SubKey = @"Environment";
reg.Key = "JAVA_HOME";
reg.Value = JavaHome;
RegistryKey newKey = Registry.CurrentUser.CreateSubKey(reg.SubKey);
newKey.SetValue(reg.Key, reg.Value);
}
}
}

77
NX-Installation/Task.cs Normal file
View File

@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NX_Installation
{
class Task
{
public void CreateLoginTask(string Platform)
{
//Abfragen ob Scheduled Task schon existiert
//bool taskAlreadyExist = TaskAlreadyExist("3DconnexionSkipUAC");
if (TaskAlreadyExist("3DconnexionSkipUAC"))
{
//Console.WriteLine("\nScheduled task already exists.");
}
else
{
CreateNewTask("3DconnexionSkipUAC", Platform);
}
}
//Abfragen ob Scheduled Task schon existiert
private bool TaskAlreadyExist(string taskname)
{
ProcessStartInfo start = new ProcessStartInfo();
start.FileName = "schtasks.exe"; // Specify exe name.
start.UseShellExecute = false;
start.CreateNoWindow = true;
start.WindowStyle = ProcessWindowStyle.Hidden;
start.Arguments = "/query /TN " + taskname;
start.RedirectStandardOutput = true;
// Start the process.
using (Process process = Process.Start(start))
{
// Read in all the text from the process with the StreamReader.
using (StreamReader reader = process.StandardOutput)
{
string stdout = reader.ReadToEnd();
if (stdout.Contains(taskname))
{
return true;
}
else
{
return false;
}
}
}
}
//Scheduled Task anlegen, welcher den Spacemouse Server beim Einloggen mit Administrator Rechten starten
private void CreateNewTask(string taskname, string Platform)
{
string program = Environment.GetEnvironmentVariable("ProgramFiles");
if (Platform == "64bit" & program.Contains("x86"))
{
program = program.Replace(" (x86)", "");
}
program = program + @"\3Dconnexion\3Dconnexion 3DxSoftware\3DxWare64\3dxsrv.exe";
ProcessStartInfo start = new ProcessStartInfo();
start.FileName = "schtasks.exe"; // Specify exe name.
start.UseShellExecute = false;
start.CreateNoWindow = true;
start.WindowStyle = ProcessWindowStyle.Hidden;
start.Arguments = "/create /TN " + taskname + " /TR '\"" + program + "\"' /RL highest /SC onlogon";
start.RedirectStandardOutput = true;
// Start the process.
Process process = Process.Start(start);
}
}
}

View File

@ -0,0 +1,201 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;
using System.Threading.Tasks;
namespace NX_Installation
{
class WindowsVersion
{
public enum WindowsMainVersion
{
WindowsXP,
WindowsServer2003,
WindowsXP_64,
WindowsVista,
WindowsVista_64,
WindowsServer2008,
Windows7,
Windows7_64,
WindowsServer2008R2,
Windows8,
Windows8_64,
Windows8_1,
Windows8_1_Update1,
Windows8_1_64,
Windows8_1_64_Update1,
Windows10,
Windows10_64,
WindowsServer2012,
WindowsServer2016,
Unknown
}
string MajorVersion { set; get; }
string MinorVersion { set; get; }
string Build { set; get; }
public WindowsVersion()
{
string osv = OSVersion.Version.ToString();
WinVersion(osv);
}
public WindowsMainVersion GetWindowsVersion()
{
if (Environment.Is64BitOperatingSystem)
{
//64bit
if (MajorVersion == "5" & MinorVersion == "1")
{
return WindowsMainVersion.WindowsXP_64;
}
else if (MajorVersion == "5" & MinorVersion == "2")
{
return WindowsMainVersion.WindowsServer2003;
}
else if (MajorVersion == "6" & MinorVersion == "0" & (Build == "6000" | Build == "6002"))
{
return WindowsMainVersion.WindowsVista_64;
}
else if (MajorVersion == "6" & MinorVersion == "0" & Build == "6001")
{
return WindowsMainVersion.WindowsServer2008R2;
}
else if (MajorVersion == "6" & MinorVersion == "1" & (Build == "7600" | Build == "7601"))
{
return WindowsMainVersion.Windows7_64;
}
else if (MajorVersion == "6" & MinorVersion == "1" & Build == "7600")
{
return WindowsMainVersion.WindowsServer2008R2;
}
else if (MajorVersion == "6" & MinorVersion == "2")
{
return WindowsMainVersion.Windows8_64;
}
else if (MajorVersion == "6" & MinorVersion == "3" & Build == "9200")
{
return WindowsMainVersion.Windows8_1_64;
}
else if (MajorVersion == "6" & MinorVersion == "3" & Build == "9600")
{
return WindowsMainVersion.Windows8_1_64_Update1;
}
else if (MajorVersion == "10" & MinorVersion == "0")
{
return WindowsMainVersion.Windows10_64;
}
else if (MajorVersion == "10" & MinorVersion == "0" & Build == "14393")
{
return WindowsMainVersion.WindowsServer2016;
}
else
{
return WindowsMainVersion.Unknown;
}
}
else
{
//32bit
if (MajorVersion == "5" & MinorVersion == "1")
{
return WindowsMainVersion.WindowsXP;
}
else if (MajorVersion == "6" & MinorVersion == "0" & (Build == "6000" | Build == "6002"))
{
return WindowsMainVersion.WindowsVista;
}
else if (MajorVersion == "6" & MinorVersion == "1" & (Build == "7600" | Build == "7601"))
{
return WindowsMainVersion.Windows7;
}
else if (MajorVersion == "6" & MinorVersion == "2")
{
return WindowsMainVersion.Windows8;
}
else if (MajorVersion == "6" & MinorVersion == "3" & Build == "9200")
{
return WindowsMainVersion.Windows8_1;
}
else if (MajorVersion == "6" & MinorVersion == "3" & Build == "9600")
{
return WindowsMainVersion.Windows8_1_Update1;
}
else if (MajorVersion == "10" & MinorVersion == "0")
{
return WindowsMainVersion.Windows10;
}
else
{
return WindowsMainVersion.Unknown;
}
}
}
private void WinVersion(string osv)
{
if (string.IsNullOrEmpty(osv))
{
MajorVersion = "Unknown";
}
else
{
MajorVersion = osv.Remove(osv.IndexOf("."));
osv = osv.Remove(0, osv.IndexOf(".") + 1);
MinorVersion = osv.Remove(osv.IndexOf("."));
Build = osv.Remove(0, osv.IndexOf(".") + 1);
}
}
}
/// <summary>
/// Stellt Informationen über das Betriebssystem Bereit.
/// </summary>
public static class OSVersion
{
/// <summary>
/// Initialisiert die Werte der Eigenschaften.
/// </summary>
static void init()
{
using (var mos = new ManagementObjectSearcher("SELECT Caption, Version FROM Win32_OperatingSystem"))
{
var attribs = mos.Get().OfType<ManagementObject>();
caption = attribs.FirstOrDefault().GetPropertyValue("Caption").ToString() ?? "Unknown";
version = new Version((attribs.FirstOrDefault().GetPropertyValue("Version") ?? "0.0.0.0").ToString());
}
}
static string caption = null;
static Version version = null;
/// <summary>
/// Ruft den Namen des Betriebssystems ab.
/// </summary>
public static string Caption
{
get
{
if (caption == null)
init();
return caption;
}
}
/// <summary>
/// Ruft die Versionsnummer des Betriebssystems ab.
/// </summary>
public static Version Version
{
get
{
if (version == null)
init();
return version;
}
}
}
}

View File

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;
using System.Threading.Tasks;
namespace NX_Installation
{
/// <summary>
/// Description of WindowsVersion.
/// </summary>
class WindowsVersions
{
// <summary>
/// Initialisiert die Werte der Eigenschaften.
/// </summary>
static void init()
{
using (var mos = new ManagementObjectSearcher("SELECT Caption, Version FROM Win32_OperatingSystem"))
{
var attribs = mos.Get().OfType<ManagementObject>();
caption = attribs.FirstOrDefault().GetPropertyValue("Caption").ToString() ?? "Unknown";
version = new Version((attribs.FirstOrDefault().GetPropertyValue("Version") ?? "0.0.0.0").ToString());
}
}
static string caption = null;
static Version version = null;
/// <summary>
/// Ruft den Namen des Betriebssystems ab.
/// </summary>
public static string Caption
{
get
{
if (caption == null)
init();
return caption;
}
}
/// <summary>
/// Ruft die Versionsnummer des Betriebssystems ab.
/// </summary>
public static Version Version
{
get
{
if (version == null)
init();
return version;
}
}
}
}

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC-Manifestoptionen
Wenn Sie die Zugangsebene für das Windows-Benutzerkonto ändern möchten, ersetzen Sie den
requestedExecutionLevel-Knoten durch eines der folgenden Elemente.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Durch Angeben des requestedExecutionLevel-Knotens wird die Datei- und Registrierungsvirtualisierung deaktiviert.
Wenn Sie Datei- und Registrierungsvirtualisierung für Abwärts-
kompatibilität verwenden möchten, löschen Sie den requestedExecutionLevel-Knoten.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Eine Liste aller Windows-Versionen, mit denen die Anwendung kompatibel ist. Windows wählt automatisch die am stärksten kompatible Umgebung aus.-->
<!-- Wenn die Anwendung mit Windows 7 kompatibel ist, heben Sie die Kommentierung des folgenden supportedOS-Knotens auf.-->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
</application>
</compatibility>
<!-- Designs für allgemeine Windows-Steuerelemente und -Dialogfelder (Windows XP und höher) aktivieren -->
<!-- <dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>-->
</asmv1:assembly>