52634
Goto Top

per Batch Verknüpfung zu Opera unattended erstellen

Hallo erstmal,

ich habe eine Batch die installiert ein Programm (Opera 9.23) unbeaufsichtigt, das funktioniert auch. Aber es werden keine Verknüpfungen auf den Dektop und das Sartmenü angelegt.

Habe Verknüpfungen von hand erstellt und die sollen dann per copy/xcopy/(robocopy?) in dei entsprechenden Verzeichnisse kopiert werden.

Hier die Batch: (könnte einigen schon bekannt vorkommen...^^)

:anfang:
@echo OFF
echo Bitte auswaehlen!
echo Abmelden: 1
echo Neustarten: 2
echo Herunterfahren: 3
echo Rechner sperren: 4
echo RemoteDesktopGUI 5
echo CHKDSK/Defrag C: 6
echo CHKDSK/Defrag D: 7
echo SFC /scannow 8
echo Loesche Temporaere 9
echo Windows Resource Kit Tools installieren 10
echo Opera installieren 11
echo Thunderbird installieren 12
echo Gruppenrichtlinieneditor 13
echo Computerverwaltung oeffnen 14
echo Freigegeben Ordner 15
echo Ereignisanzeige 16
echo Zertifikatsmanager 17
echo CMD starten 18
echo pingen 19
echo Ordner kopieren 20
echo Programm schliessen 99

set /P zahl=Bitte Zahl eingeben:

For /F "tokens=* Delims=:" %%i in ("%0") do set appath=%%~di%%~pi

if "%zahl%" == "1" shutdown -l
if "%zahl%" == "2" shutdown -r
if "%zahl%" == "3" shutdown -s
if "%zahl%" == "4" rundll32.exe user32.dll LockWorkStation
if "%zahl%" == "5" mstsc
if "%zahl%" == "6" goto :causw:
if "%zahl%" == "7" goto :dausw:
if "%zahl%" == "8" sfc /scannow
if "%zahl%" == "9" del "%TEMP%" /S /Q del "%TMP%" /S /Q MORE
if "%zahl%" == "10" "%appath%\install\Windows Resource Kit.exe"
if "%zahl%" == "11" goto :opera:
if "%zahl%" == "12" "%appath%\install\Thunderbird.exe"
rem die noch unattended machen
if "%zahl%" == "13" start gpedit.msc
if "%zahl%" == "14" start compmgmt.msc
if "%zahl%" == "15" start fsmgmt.msc
if "%zahl%" == "16" start eventvwr.msc
if "%zahl%" == "17" start certmgr.msc
if "%zahl%" == "18" start cmd
if "%zahl%" == "19" goto :ping:
if "%zahl%" == "20" goto :kopieren:
if "%zahl%" == "99" taskkill /F /IM cmd.exe

:opera:
"%appath%\install\Opera\Opera.msi" /QN
copy "%appath%\install\Opera\Opera.exe.ink" "%USERPROFILE%\Desktop" /Y
copy "%appath%\install\Opera\Opera.exe.ink" "%USERPROFILE%\Startmen*" /Y
rem auf wenn ich die Datei umbennen in *,LNK; *.lnk; *.INK geht es nicht

echo Wiederholen?
set /p Wiederholen="Ja=j/Nein=n:"
if "%Wiederholen%" == "j" goto :anfang:
if "%wiederholen&" == "n" goto :schließen:
CLS

:causw:
echo CHKDSK oder Defrag HDD C:\? /
set /P hddc="CHKDSK=c/Defrag=d/Abrechen=a: "
if "%hddc%" == "c" chkdsk c: /F /R /V
if "%hddc%" == "d" defrag c:
if "%hddc%" == "a" goto :anfang:
CLS

:dausw:
echo CHKDSK oder Defrag HDD D:\?
set /P hddd="CHKDSK=c/Defrag=d/Abrechen=a : "
if "%hddd%" == "c" chkdsk d: /F /R /V
if "%hddd%" == "d" defrag d:
if "%hddd%" == "a" goto :anfang:
CLS

:ping:
set /P ip=IP eingeben:
ping "%ip%"
CLS
echo Nochmal?
set /P nochmal=Ja=j/Nein=n

if "%nochmal%" == "j" goto :ping:
if "%nochmal%" == "n" goto :anfang:
CLS

:kopieren:
echo xcopy(Dateien)/robocopy/Verzeichnisse)?
set /P auswcopy="xcopy=x/robocopy=r/abrechen=a:"
if "%auswcopy%" == "r" goto :robocopy:
if "%auswcopy%" == "a" goto :anfang:
if "%auswcopy%" == "x" goto :xcopy:

:xcopy:
set /P quellex=Quelle(kompletter Pfad)?
set /P zielx=Ziel(kompletter Pfad)?
xcopy "%quellex%" "%zielx%" /E /V /Q /G
goto :kopieren:

:robocopy:
set /P quellerobo=Quelle(kompletter Pfad)?
set /P zielrobo=Ziel(kompletter Pfad)?
robocopy "%quellerobo%" "%zielrobo%" /E /MIR
goto :kopieren:

:schließen:
taskkill /F /IM cmd.exe


rem Variablen:
rem "%Zahl%" auswaehlen funktion
rem "%wiederholen%" Programm nochmal oder schließen
rem "%hddc%" / "%hddd%" weche funktion bei platte c/d
rem "%ip%" Ip-adresse
rem "%nochmal%" nochmal pingen
rem "%kopieren%" was kopiert werden soll
rem
rem
rem

Content-Key: 67375

Url: https://administrator.de/contentid/67375

Printed on: April 20, 2024 at 01:04 o'clock