added scripts for usb sticke generation
This commit is contained in:
parent
edc363b672
commit
50bad7b9f0
59
CreateStick.cmd
Normal file
59
CreateStick.cmd
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
rem ===================
|
||||||
|
rem COMMANDLINE CHECKS
|
||||||
|
rem ===================
|
||||||
|
|
||||||
|
IF %1.==. GOTO USAGE
|
||||||
|
IF %2.==. GOTO USAGE
|
||||||
|
|
||||||
|
rem get fullpath of isofile ...
|
||||||
|
set USBDRIVE=%1
|
||||||
|
set ISOFILE=%~f2
|
||||||
|
|
||||||
|
if NOT EXIST %ISOFILE% (
|
||||||
|
echo ERROR: file %ISOFILE% not found!
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
if /I %USBDRIVE% == C: (
|
||||||
|
echo ERROR: cannot use drive %USBDRIVE% !
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT EXIST %USBDRIVE% (
|
||||||
|
echo ERROR: drive %USBDRIVE% not found!
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
rem =====
|
||||||
|
rem MAIN
|
||||||
|
rem =====
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ##########################################
|
||||||
|
echo using drive %USBDRIVE% ...
|
||||||
|
echo using image %ISOFILE% ...
|
||||||
|
|
||||||
|
echo mounting disk image (iso) with powershell ...
|
||||||
|
powershell Mount-DiskImage -ImagePath %ISOFILE%
|
||||||
|
|
||||||
|
echo copying files from image to targetpath %USBDRIVE% ...
|
||||||
|
robocopy \\.\CDROM0 %USBDRIVE% /MIR /256 /NFL /NDL
|
||||||
|
|
||||||
|
echo unmounting disk image (iso) ...
|
||||||
|
powershell Dismount-Diskimage -ImagePath %ISOFILE%
|
||||||
|
|
||||||
|
echo READY.
|
||||||
|
echo.
|
||||||
|
|
||||||
|
rem =====
|
||||||
|
rem END
|
||||||
|
rem =====
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
:USAGE
|
||||||
|
echo "usage: %0 <USBDRIVE> <ISOFILE>"
|
||||||
|
|
||||||
|
:END
|
||||||
|
|
89
FormatStick.cmd
Normal file
89
FormatStick.cmd
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
@echo off
|
||||||
|
set T=c:\TEMP
|
||||||
|
set DPARTSCRIPT=%T%\diskpart.txt
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ##########################################
|
||||||
|
|
||||||
|
rem create temp directory and cleanup ...
|
||||||
|
mkdir %T% 1>nul 2>nul
|
||||||
|
del /Y %DPARTSCRIPT% 1>nul 2>nul
|
||||||
|
|
||||||
|
rem =====
|
||||||
|
rem QUESTIONS
|
||||||
|
rem =====
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Showing disk list ...
|
||||||
|
> %DPARTSCRIPT% (
|
||||||
|
@echo.list disk
|
||||||
|
@echo.exit
|
||||||
|
@echo.
|
||||||
|
)
|
||||||
|
diskpart /s %DPARTSCRIPT% 2>nul
|
||||||
|
|
||||||
|
set DISK=
|
||||||
|
:askdisk
|
||||||
|
set /p DISK="Please select a disk: "
|
||||||
|
|
||||||
|
> %DPARTSCRIPT% (
|
||||||
|
@echo.select disk %DISK%
|
||||||
|
@echo.exit
|
||||||
|
@echo.
|
||||||
|
)
|
||||||
|
|
||||||
|
diskpart /s %DPARTSCRIPT% 1>nul 2>nul
|
||||||
|
if %errorlevel% EQU 0 (
|
||||||
|
echo OK using disk %DISK%
|
||||||
|
GOTO CONT1
|
||||||
|
) else (
|
||||||
|
echo ERROR: please select a valid disk number!
|
||||||
|
)
|
||||||
|
|
||||||
|
goto askdisk
|
||||||
|
:CONT1
|
||||||
|
|
||||||
|
set LABEL=
|
||||||
|
set /p LABEL="Please enter a label for the new disk: "
|
||||||
|
|
||||||
|
echo WARNING ! This will DELETE ALL data on disk number [ %DISK% ]
|
||||||
|
echo.
|
||||||
|
set answer=
|
||||||
|
:askyes
|
||||||
|
set /p answer="REALLY delete disk %DISK% (Y/N)? "
|
||||||
|
if /i "%answer:~,1%" EQU "Y" (
|
||||||
|
GOTO CONT2
|
||||||
|
)
|
||||||
|
if /i "%answer:~,1%" EQU "N" (
|
||||||
|
echo ABORT.
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
echo Please type Y or N.
|
||||||
|
goto askyes
|
||||||
|
:CONT2
|
||||||
|
|
||||||
|
rem =====
|
||||||
|
rem MAIN
|
||||||
|
rem =====
|
||||||
|
|
||||||
|
> %DPARTSCRIPT% (
|
||||||
|
@echo.select disk %DISK%
|
||||||
|
@echo.clean
|
||||||
|
@echo.create partition primary
|
||||||
|
@echo.select partition 1
|
||||||
|
@echo.format fs=fat32 LABEL="%LABEL%" quick
|
||||||
|
@echo.active
|
||||||
|
@echo.exit
|
||||||
|
@echo.
|
||||||
|
)
|
||||||
|
|
||||||
|
diskpart /s %DPARTSCRIPT% 1>nul 2>nul
|
||||||
|
if %errorlevel% NEQ 0 (
|
||||||
|
echo ERROR: while formatting the disk!
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
echo READY. USB stick formatted.
|
||||||
|
|
||||||
|
rem =====
|
||||||
|
rem END
|
||||||
|
rem =====
|
@ -1,11 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set SOURCES=c:\TEMP\W10\sources
|
set SOURCES=c:\TEMP\W10\sources
|
||||||
|
set IMAGE=install_FINAL.esd
|
||||||
|
set ALTIMAGE=install_FINAL_lastrun.esd
|
||||||
|
|
||||||
rem ===================
|
rem ===================
|
||||||
rem COMMANDLINE CHECKS
|
rem COMMANDLINE CHECKS
|
||||||
rem ===================
|
rem ===================
|
||||||
|
|
||||||
IF %1.==. GOTO USAGE
|
IF %1.==. GOTO USAGE
|
||||||
|
|
||||||
set USBDRIVE=%1
|
set USBDRIVE=%1
|
||||||
|
|
||||||
if /I %USBDRIVE% == C: (
|
if /I %USBDRIVE% == C: (
|
||||||
@ -13,13 +16,15 @@ if /I %USBDRIVE% == C: (
|
|||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
echo using drive %USBDRIVE% ...
|
|
||||||
|
|
||||||
if NOT EXIST %USBDRIVE% (
|
if NOT EXIST %USBDRIVE% (
|
||||||
echo ERROR: drive %USBDRIVE% not found!
|
echo ERROR: drive %USBDRIVE% not found!
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ##########################################
|
||||||
|
echo using drive %USBDRIVE% ...
|
||||||
|
|
||||||
rem =====
|
rem =====
|
||||||
rem MAIN
|
rem MAIN
|
||||||
rem =====
|
rem =====
|
||||||
@ -41,14 +46,32 @@ set answer=
|
|||||||
goto ask
|
goto ask
|
||||||
:CONT
|
:CONT
|
||||||
|
|
||||||
if EXIST %SOURCES%\install_FINAL.esd (
|
if EXIST %SOURCES%\%IMAGE% (
|
||||||
echo copying install.esd to drive %USBDRIVE% ...
|
|
||||||
robocopy %SOURCES% %USBDRIVE%\sources install_FINAL.esd /J /NJH
|
echo.
|
||||||
del /F %USBDRIVE%\sources\install.esd
|
echo copying [ %IMAGE ] to drive %USBDRIVE% ...
|
||||||
move /Y %USBDRIVE%\sources\install_FINAL.esd %USBDRIVE%\sources\install.esd
|
robocopy %SOURCES% %USBDRIVE%\sources %IMAGE% /J /NJH
|
||||||
move /Y %SOURCES%\install_FINAL.esd %SOURCES%\install_FINAL_lastrun.esd
|
|
||||||
|
rem move image in place ...
|
||||||
|
del /F %USBDRIVE%\sources\install.esd 2>nul
|
||||||
|
move /Y %USBDRIVE%\sources\%IMAGE% %USBDRIVE%\sources\install.esd
|
||||||
|
|
||||||
|
rem rename image in sources directory ...
|
||||||
|
move /Y %SOURCES%\%IMAGE% %SOURCES%\%ALTIMAGE%
|
||||||
|
|
||||||
|
) else (
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo INFO: NOT copying image!
|
||||||
|
echo.
|
||||||
|
echo HINT: please rename
|
||||||
|
echo [ %SOURCES%\%ALTIMAGE% ]
|
||||||
|
echo to [ %SOURCES%\%IMAGE% ]
|
||||||
|
echo for force copy of image.
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
:CONT
|
||||||
echo.
|
echo.
|
||||||
if EXIST tools (
|
if EXIST tools (
|
||||||
echo copying folder tools to drive %USBDRIVE% ...
|
echo copying folder tools to drive %USBDRIVE% ...
|
||||||
@ -66,6 +89,8 @@ for %%P in (software scripts source optional personal) do (
|
|||||||
echo.
|
echo.
|
||||||
echo copying custom setup script to %USBDRIVE% ...
|
echo copying custom setup script to %USBDRIVE% ...
|
||||||
copy /Y CustomSetup.cmd %USBDRIVE%\
|
copy /Y CustomSetup.cmd %USBDRIVE%\
|
||||||
|
echo READY.
|
||||||
|
echo.
|
||||||
|
|
||||||
rem =====
|
rem =====
|
||||||
rem END
|
rem END
|
||||||
|
@ -4,12 +4,16 @@
|
|||||||
" "
|
" "
|
||||||
"""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
set showmode
|
||||||
set history=700 "Sets how many lines of history VIM has to remember
|
set history=700 "Sets how many lines of history VIM has to remember
|
||||||
set ttimeoutlen=50 "Speed up O etc in the Terminal
|
set ttimeoutlen=50 "Speed up O etc in the Terminal
|
||||||
set autoread "Set to auto read when a file is changed from the outside
|
set autoread "Set to auto read when a file is changed from the outside
|
||||||
set bs=2 "allow backspace
|
set bs=2 "allow backspace
|
||||||
set scrolloff=6 "start scrolling 5 lines before edge of viewport
|
set scrolloff=6 "start scrolling 5 lines before edge of viewport
|
||||||
set pastetoggle=<f10> "Better paste behavior
|
|
||||||
|
"Better paste behavior
|
||||||
|
nnoremap <f10> :set invpaste paste?<CR>
|
||||||
|
set pastetoggle=<f10>
|
||||||
|
|
||||||
"Search Options
|
"Search Options
|
||||||
set ignorecase "Ignore case when searching
|
set ignorecase "Ignore case when searching
|
||||||
@ -27,8 +31,11 @@ set noswapfile
|
|||||||
" "
|
" "
|
||||||
"""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
"dont't show line numbers
|
"Show line numbers
|
||||||
set nonumber
|
set number
|
||||||
|
|
||||||
|
"Toggle line numbers on f9
|
||||||
|
nnoremap <f9> :set invnumber number?<CR>
|
||||||
|
|
||||||
"Transform tabs to spaces
|
"Transform tabs to spaces
|
||||||
set tabstop=8
|
set tabstop=8
|
||||||
@ -53,11 +60,36 @@ set noerrorbells visualbell t_vb=
|
|||||||
" Statusline "
|
" Statusline "
|
||||||
" "
|
" "
|
||||||
"""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
let g:currentmode={
|
||||||
|
\ 'n' : 'Normal',
|
||||||
|
\ 'no' : 'Normal Operator Pending',
|
||||||
|
\ 'v' : 'Visual',
|
||||||
|
\ 'V' : 'V-Line',
|
||||||
|
\ '^V' : 'V-Block',
|
||||||
|
\ 's' : 'Select',
|
||||||
|
\ 'S' : 'S-Line',
|
||||||
|
\ '^S' : 'S-Block',
|
||||||
|
\ 'i' : 'Insert',
|
||||||
|
\ 'R' : 'Replace',
|
||||||
|
\ 'Rv' : 'V-Replace',
|
||||||
|
\ 'c' : 'Command',
|
||||||
|
\ 'cv' : 'Vim Ex',
|
||||||
|
\ 'ce' : 'Ex',
|
||||||
|
\ 'r' : 'Prompt',
|
||||||
|
\ 'rm' : 'More',
|
||||||
|
\ 'r?' : 'Confirm',
|
||||||
|
\ '!' : 'Shell',
|
||||||
|
\ 't' : 'Terminal'
|
||||||
|
\}
|
||||||
|
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
|
||||||
hi User1 ctermbg=green ctermfg=red guibg=green guifg=red
|
hi User1 ctermbg=green ctermfg=red guibg=green guifg=red
|
||||||
hi User2 ctermbg=red ctermfg=white guibg=red guifg=blue
|
hi User2 ctermbg=red ctermfg=white guibg=red guifg=white
|
||||||
hi User3 ctermbg=blue ctermfg=green guibg=white guifg=green
|
hi User3 ctermbg=blue ctermfg=green guibg=blue guifg=green
|
||||||
|
hi User4 ctermbg=cyan ctermfg=black guibg=cyan guifg=black
|
||||||
|
hi User5 ctermbg=blue ctermfg=black guibg=blue guifg=black
|
||||||
|
|
||||||
set statusline=
|
set statusline=
|
||||||
set statusline+=%1* "switch to User1 highlight
|
set statusline+=%1* "switch to User1 highlight
|
||||||
@ -67,8 +99,15 @@ set statusline+=\ %-40F
|
|||||||
|
|
||||||
set statusline+=%= "move to right
|
set statusline+=%= "move to right
|
||||||
|
|
||||||
|
set statusline+=%5* "switch to User5 highlight
|
||||||
|
set statusline+=\ F9=linenumbers "user help
|
||||||
|
set statusline+=\ F10=pastemode\ "user help
|
||||||
|
|
||||||
set statusline+=%2* "switch to User2 highlight
|
set statusline+=%2* "switch to User2 highlight
|
||||||
set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
|
set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
|
||||||
set statusline+=\ [%{&fileformat}\]
|
set statusline+=\ [%{&fileformat}\]
|
||||||
set statusline+=\ %8((%l,%c)%)
|
set statusline+=\ %8((%l,%c)%)
|
||||||
set statusline+=\ %P
|
set statusline+=\ %P\ "percent and space at end off string
|
||||||
|
set statusline+=%4* "switch to User4 highlight
|
||||||
|
set statusline+=\ %{toupper(g:currentmode[mode()])}\ "The current mode
|
||||||
|
|
||||||
|
BIN
scripts/startmenu/WinSCP.lnk
Normal file
BIN
scripts/startmenu/WinSCP.lnk
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user