Batch, Link verteilen
Hallo zusammen,
ich hab hier eine bat mit folgenden Inhalt.
@echo off
if not exist "%HOMEPATH%\desktop\RSKT.lnk" copy "\\ads\netlogon\RSKT.lnk" "%HOMEPATH%\desktop\RSKT.lnk"
Mein Problem ist jetzt, dass sich der Pfad zum RSKT Ordner geändert hat. Ich habe einen neuen Link erstellt ihn gleich benannt. Er wird jedoch aktualisiert.
Eigentlich klar weil ja if not exist ...
Jetzt würde ich gerne den Link aktualisieren. Gibts nen Befehl, der das möglich macht. Oder wäre die bessere alternative erst Löschen und dann neu kopieren.
Für Hilfe wäre ich dankbar
Viele Grüße
Andreas Scillar
ich hab hier eine bat mit folgenden Inhalt.
@echo off
if not exist "%HOMEPATH%\desktop\RSKT.lnk" copy "\\ads\netlogon\RSKT.lnk" "%HOMEPATH%\desktop\RSKT.lnk"
Mein Problem ist jetzt, dass sich der Pfad zum RSKT Ordner geändert hat. Ich habe einen neuen Link erstellt ihn gleich benannt. Er wird jedoch aktualisiert.
Eigentlich klar weil ja if not exist ...
Jetzt würde ich gerne den Link aktualisieren. Gibts nen Befehl, der das möglich macht. Oder wäre die bessere alternative erst Löschen und dann neu kopieren.
Für Hilfe wäre ich dankbar
Viele Grüße
Andreas Scillar
Please also mark the comments that contributed to the solution of the article
Content-Key: 315366
Url: https://administrator.de/contentid/315366
Printed on: April 25, 2024 at 17:04 o'clock
3 Comments
Latest comment
Oder wäre die bessere alternative erst Löschen und dann neu kopieren.
Bretter would be to use GPP to push links to the users desktop.https://blogs.technet.microsoft.com/askds/2014/02/17/adding-shortcuts-on ...
Regards
Batch for links is so old school
The following is enough, if you copy in a batch file, files are always replaced without prompt you don't need /y.
But you should use the %userprofile% variable instead
Regards
The following is enough, if you copy in a batch file, files are always replaced without prompt you don't need /y.
But you should use the %userprofile% variable instead
copy "\\ads\netlogon\RSKT.lnk" "%USERPROFILE%\desktop"
Regards