Projekt neu angelegt.

This commit is contained in:
Eugen Höglinger 2020-02-27 16:13:11 +01:00
commit f453fd52b0
2 changed files with 156 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/

124
drive_mappings.cmd Normal file
View File

@ -0,0 +1,124 @@
@ECHO OFF
REM +++++++++++++++++++++++++ Check System / Run as Administrator +++++++++++++++++++++++++++++++++++++
rem FSUTIL dirty query %SystemDrive% >nul
whoami /groups | find "S-1-16-12288" > nul
if %errorlevel% EQU 0 goto start
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin_%~n0.vbs"
echo UAC.ShellExecute "%~s0", "", "%~dp0", "runas", 1 >> "%temp%\getadmin_%~n0.vbs"
cscript "%temp%\getadmin_%~n0.vbs"
exit /B
:start
del "%temp%\getadmin_%~n0.vbs" >nul 2>&1
cd /d %~dp0
set admuser=ENGEL\%USERNAME%.adm
set admpwd=H2eug4V18c3x
set svcuser=ENGEL\tc_svc_adm
set svcpwd=TC_29411
ipconfig /release >nul
ipconfig /renew
echo.
FOR %%i IN ( G H I J K L M N O P Q R S T U V W X Y Z ) DO call :unlink %%i:
echo.
call :unlink engel.int
call :unlink emstcfile.engel.int
call :unlink emsfile1.engel.int
call :unlink emsfile2.engel.int
rem call :unlink win0011115
rem call :unlink win0011149
rem call :unlink win0011150
rem call :unlink win0011155
rem call :unlink win0011157
rem call :unlink win0011158
rem call :unlink win0011159
rem call :unlink win0011160
rem call :unlink win0011161
@echo Alles geloescht.
@echo.
rem call :link_svc \\win0011115\IPC$
rem call :link_svc \\win0011149\ipc$
rem call :link_svc \\win0011150\ipc$
rem call :link_svc \\win0011155\ipc$
rem call :link_svc \\win0011157\ipc$
rem call :link_svc \\win0011158\ipc$
rem call :link_svc \\win0011159\ipc$
rem call :link_svc \\win0011160\ipc$
rem call :link_svc \\win0011161\ipc$
rem call :link_svc \\emstcfile.engel.int\ipc$
rem call :link_svc \\emstcfile.engel.int\tcdata
rem call :link_adm M: \\engel.int\nx\ea PERSIST
call :link_svc Q: \\emsfile2\archiv\vor_archiv\ems_emv\pdf\ideas PERSIST
call :link_svc Y: \\emstcfile.engel.int\ea_ideas_tc PERSIST
call :link_svc Z: \\emstcfile.engel.int\Setup PERSIST
call :link_usr G: \\emsfile1.engel.int\vol1\it-ec PERSIST
call :link_usr H: \\emsfile1.engel.int\vol1\it-ec\homedir\%USERNAME% PERSIST
call :link_usr I: \\emsfile1.engel.int\vol1 PERSIST
call :link_usr J: \\emsfile1.engel.int\vol2 PERSIST
call :link_usr K: \\emsfile2.engel.int\vol3 PERSIST
call :link_usr L: \\emsfile2.engel.int\vol4 PERSIST
call :link_usr M: \\engel.int\nx\ea PERSIST
call :link_usr N: \\engel.int\nx\cam\ems_nc PERSIST
call :link_usr P: \\emsfile1.engel.int\programs PERSIST
call :link_usr T: \\emsfile1.engel.int\temp PERSIST
echo.
echo.
echo.
wmic netuse get LocalName,RemoteName,UserName,Status
ping -n 5 127.0.0.1 >nul 2>&1
goto :eof
REM =============
REM = FUNCTIONS =
REM =============
:unlink
echo Unlinking %1 ...
IF "%1"=="%~d1" (
NET USE %1 /delete >nul 2>&1
) else (
NET USE \\%1\IPC$ /delete >nul 2>&1
)
goto :eof
:link_adm
set uarg=%admuser% %admpwd%
call :link %1 %2 %3
goto :eof
:link_svc
set uarg=%svcuser% %svcpwd%
call :link %1 %2 %3
goto :eof
:link_usr
set uarg=%userdomain%\%username%
call :link %1 %2 %3
goto :eof
:link
if "%3"=="" (
if "%2"=="" (
echo Linking %1 ...
NET USE %1 /user:%uarg% >nul
) else (
echo Linking %1 to %2 ...
NET USE %1 %2 /user:%uarg% >nul
)
) else (
echo Linking %1 to %2 ...
NET USE %1 %2 /PERSISTENT:YES /user:%uarg% >nul
)
goto :eof