Code: Alles auswählen
DefVar $ProgramFiles32DirCustom$
Set $ProgramFiles32DirCustom$ = "%ProgramFiles32Dir%"
Set $ProgramFiles32DirCustom$ = StringReplace($ProgramFiles32DirCustom$,"(","")
Set $ProgramFiles32DirCustom$ = StringReplace($ProgramFiles32DirCustom$,")","")
Files_link
[Files_link]
SymLink "%ProgramFiles32Dir%\" "$ProgramFiles32DirCustom$"
Code: Alles auswählen
SymLink "%ProgramFiles32Dir%" "$ProgramFiles32DirCustom$" -> C:\Program Files (x86) is no existing file or directory
Das Verzeichnis existiert auf dem Client.
Wenn ich den Symlink mit "mklink /D" in einer DosBatch-Sektion erstelle, funktioniert es.
Edith meint: Muss mich korrigieren, es hat mal funktioniert - im Moment scheitert es weil mir die Berechtigung fehlt:
Code: Alles auswählen
C:\Windows\system32>SET SRC=C:\Program Files (x86)
C:\Windows\system32>SET DST=C:\Program Files (x86)
C:\Windows\system32>SET DST=C:\Program Files x86)
C:\Windows\system32>SET DST=C:\Program Files x86
C:\Windows\system32>MKLink /D "C:\Program Files x86" "C:\Program Files (x86)"
Ihre Berechtigungen reichen nicht aus, um diesen Vorgang auszuführen.
Aber RunElevated gibt es ja leider nicht für DosBatch.
Edith wieder: Mit WinBatch /runelevated geht es:
Code: Alles auswählen
DefVar $ProgramFiles32DirCustom$
Set $ProgramFiles32DirCustom$ = "%ProgramFiles32Dir%"
Set $ProgramFiles32DirCustom$ = StringReplace($ProgramFiles32DirCustom$,"(","")
Set $ProgramFiles32DirCustom$ = StringReplace($ProgramFiles32DirCustom$,")","")
WinBatch_add_link_programfiles /WaitOnClose /RunElevated
[WinBatch_add_link_programfiles]
CMD /C MKLink /D "$ProgramFiles32DirCustom$" "%ProgramFiles32Dir%"