Last active
August 29, 2015 14:03
-
-
Save pichuang/443dad98baf2908c282b to your computer and use it in GitHub Desktop.
wioski
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
whoami /groups |find "S-1-16-12288" | |
if %errorlevel%==1 goto nouac | |
bcdedit.exe /enum %GUID_ORIG% /v |find "win7.vhd" | |
if %errorlevel%==1 goto vhd | |
bcdedit /set %GUID_ORIG% device vhd=[D:]\diff1.vhd | |
bcdedit /set %GUID_ORIG% osdevice vhd=[D:]\diff1.vhd | |
bcdedit /default %GUID% | |
bcdedit /export d:\boot\BCDMALLI.bcd | |
attrib -r d:\tausta.jpg | |
copy /y "D:\Boot\bg_kiosk.jpg" "D:\tausta.jpg" | |
del "c:\Users\Public\Desktop\YOU ARE IN MAINTENANCEMODE.lnk" | |
shutdown /r /t 0 | |
goto end | |
:vhd | |
echo You are already in Kiosk Mode! | |
pause | |
goto end | |
:nouac | |
echo Please use Run as Admin! | |
pause | |
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
whoami /groups |find "S-1-16-12288" | |
if %errorlevel%==1 goto nouac | |
bcdedit.exe /enum %GUID_ORIG% /v |find "win7.vhd" | |
if %errorlevel%==0 goto vhd | |
bcdedit /set %GUID_ORIG% device vhd=[D:]\win7.vhd | |
bcdedit /set %GUID_ORIG% osdevice vhd=[D:]\win7.vhd | |
bcdedit /export d:\boot\BCDMALLI.bcd | |
attrib -r d:\tausta.jpg | |
copy /y "D:\Boot\bg_maintenance.jpg" "D:\tausta.jpg" | |
shutdown /r /t 0 | |
goto end | |
:vhd | |
cls | |
echo You are already in Maintenance Mode! | |
pause | |
goto end | |
:nouac | |
cls | |
echo Please use Run as Admin! | |
pause | |
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
whoami /groups |find "S-1-16-12288" | |
if %errorlevel%==1 goto nouac | |
bcdedit.exe /enum %GUID_ORIG% /v |find "win7.vhd" | |
if %errorlevel%==0 goto vhd | |
cls | |
echo You need to be in Maintenance mode to run this! | |
pause | |
goto end | |
:vhd | |
schtasks /change /tn WioskiWinPE /DISABLE | |
bcdedit /default %GUID_ORIG% | |
cls | |
Echo AUTOMATIC RESETS DISABLED! | |
Pause | |
goto end | |
:nouac | |
echo Please use Run as Admin! | |
pause | |
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
whoami /groups |find "S-1-16-12288" | |
if %errorlevel%==1 goto nouac | |
bcdedit.exe /enum %GUID_ORIG% /v |find "win7.vhd" | |
if %errorlevel%==0 goto vhd | |
cls | |
echo You need to be in Maintenance mode to run this! | |
pause | |
goto end | |
:vhd | |
schtasks /change /tn WioskiWinPE /ENABLE | |
bcdedit.exe /default %GUID_ORIG% | |
bcdedit.exe /export d:\boot\temp.bcd | |
bcdedit.exe /import d:\boot\temp.bcd | |
cls | |
Echo AUTOMATIC RESETS ENABLED! | |
Pause | |
goto end | |
:nouac | |
echo Please use Run as Admin! | |
pause | |
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
whoami /groups |find "S-1-16-12288" | |
if %errorlevel%==1 goto nouac | |
bcdedit.exe /enum %GUID_ORIG% /v |find "win7.vhd" | |
if %errorlevel%==0 goto vhd | |
bcdedit.exe /enum %GUID_ORIG% /v |find "diff1.vhd" | |
if %errorlevel%==0 goto diff1inuse | |
bcdedit.exe /enum %GUID_ORIG% /v |find "diff2.vhd" | |
if %errorlevel%==0 goto diff2inuse | |
:diff1inuse | |
del d:\diff2.vhd | |
diskpart /s d:\boot\diff2.txt | |
bcdedit /set %GUID_ORIG% device vhd=[D:]\diff2.vhd | |
bcdedit /set %GUID_ORIG% osdevice vhd=[D:]\diff2.vhd | |
bcdedit.exe /export d:\boot\temp.bcd | |
bcdedit.exe /import d:\boot\temp.bcd | |
shutdown /r /t 0 | |
goto end | |
:diff2inuse | |
del d:\diff1.vhd | |
diskpart /s d:\boot\diff1.txt | |
bcdedit /set %GUID_ORIG% device vhd=[D:]\diff1.vhd | |
bcdedit /set %GUID_ORIG% osdevice vhd=[D:]\diff1.vhd | |
bcdedit.exe /export d:\boot\temp.bcd | |
bcdedit.exe /import d:\boot\temp.bcd | |
shutdown /r /t 0 | |
goto end | |
:vhd | |
cls | |
echo You need to be in Kiosk mode to run this! | |
pause | |
goto end | |
:nouac | |
echo Please use Run as Admin! | |
pause | |
:end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment