First committing
This commit is contained in:
35
Utilities/Windows/Create_Windows_shortcut.bat
Executable file
35
Utilities/Windows/Create_Windows_shortcut.bat
Executable file
@@ -0,0 +1,35 @@
|
||||
@echo off & setlocal
|
||||
|
||||
:: Source: http://www.administrator.de/forum/verkn%C3%BCpfung-auf-desktop-per-batch-anlegen-155061.html
|
||||
|
||||
:: Zielpfad
|
||||
set "zielpfad=%userprofile%\Desktop"
|
||||
|
||||
::Name der Verknüpfung (ohne ".lnk")
|
||||
set "progtitel=AFM_thumbs Starter"
|
||||
::Speicherort der Programmdatei (wird auch für "Ausführen in:" verwendet)
|
||||
set "progdir=%cd%"
|
||||
set "progexe=Windows Batch Starter.bat"
|
||||
::Kommentar
|
||||
set "beschreibung=Run AFM_thumbs.py"
|
||||
::Icon
|
||||
set "iconpath=%progdir%\AFM_thumbs Icon.ico"
|
||||
|
||||
::Bei Bedarf Ordner erstellen:
|
||||
md "%zielpfad%" 2>nul
|
||||
md "%progdir%" 2>nul
|
||||
|
||||
::temporäres VBScript erzeugen ...
|
||||
>%temp%\MakeShortCut.vbs echo Set objShell=WScript.CreateObject("Wscript.Shell")
|
||||
>>%temp%\MakeShortCut.vbs echo Set objShortcut=objShell.CreateShortcut("%zielpfad%\%progtitel%.lnk")
|
||||
>>%temp%\MakeShortCut.vbs echo objShortcut.TargetPath="%progdir%\%progexe%"
|
||||
>>%temp%\MakeShortCut.vbs echo objShortcut.Description="%beschreibung%"
|
||||
>>%temp%\MakeShortCut.vbs echo objShortcut.WorkingDirectory="%progdir%"
|
||||
>>%temp%\MakeShortCut.vbs echo objShortcut.IconLocation = "C:\Users\Niklas\Documents\Python Scripts\AFM_thumbs_v1.7x_04.10.14\AFM_thumbs Icon.ico"
|
||||
>>%temp%\MakeShortCut.vbs echo objShortcut.Save
|
||||
|
||||
::... ausführen ...
|
||||
cscript //nologo %temp%\MakeShortCut.vbs
|
||||
|
||||
::... und wieder löschen.
|
||||
del %temp%\MakeShortCut.vbs
|
||||
Reference in New Issue
Block a user