hispeedsurfer
Goto Top

cmd shortcut laufwerkwechsel

Hallo zusammen,

ich möchte gern einen Shortcut erstellen in dem die Windowskonsole aufgerufen, das laufwerk gewechselt und in ein bestimmtes Verzeichniss gesprungen wird.

Wie ich die einzelnen Schritte solo hinbekomme weiß ich schon:

1. Kontext -> New -> shortcut

2. %windir%system32cmd.exe /K v:

zum wechseln in ein anderes Verzeichniss wäre:

%windir%system32cmd.exe /K cd V:workspaces


aber was muss ich machen damit alles in einem rutscht?


Gruß
Feivel

Content-Key: 63730

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

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

Member: talkinghands
talkinghands Jul 13, 2007 at 07:20:39 (UTC)
Goto Top
hi,
du musst das via batchdatei realisieren
erstelle also eine z.B. cdlw.bat

darein schreibst du:
v:
cd \Workspaces

im shortcut steht dann folgendes unter Verknüpfung->Ziel
%SystemRoot%\system32\cmd.exe /K cdlw.bat

gruss
TH
Member: Xaero1982
Xaero1982 Jul 13, 2007 at 07:27:59 (UTC)
Goto Top
%windir%\system32\cmd.exe /K cd "c:\script"

Wenn ich dich richtig verstanden habe.

Oder willst du per one-klick ein Shortcut erstellen, mit den angegebenen Optionen?
Member: hispeedsurfer
hispeedsurfer Jul 13, 2007 at 07:34:35 (UTC)
Goto Top
@ Xaero1982
%windir%\system32\cmd.exe /K cd
"c:\script"

Wenn ich dich richtig verstanden habe.

hatte ich doch schon s.o. (%windir%system32cmd.exe /K cd V:workspaces)


@talkinghands
das wird wohl die Lösung sein, probiere ich gleich mal aus.


Vielen Dank zusammen

Gruß
Feivel
Mitglied: 50496
50496 Jul 13, 2007 at 07:49:12 (UTC)
Goto Top
cmd /K cd /d v:\workspaces
gehört in die Verknüpfung
Mitglied: 13100
13100 Jul 13, 2007 at 07:50:24 (UTC)
Goto Top
cmd.exe /K cd /d V:\workspaces
Member: hispeedsurfer
hispeedsurfer Jul 13, 2007 at 07:55:15 (UTC)
Goto Top
cmd.exe /K cd /d V:\workspaces


ja genau, das habe ich gesucht. Danke
Member: Xaero1982
Xaero1982 Jul 13, 2007 at 08:24:08 (UTC)
Goto Top
@ Xaero1982
> %windir%\system32\cmd.exe /K cd
> "c:\script"
>
> Wenn ich dich richtig verstanden habe.

hatte ich doch schon s.o.
(%windir%system32cmd.exe /K cd V:workspaces)


@talkinghands
das wird wohl die Lösung sein, probiere
ich gleich mal aus.


Vielen Dank zusammen

Gruß
Feivel

Sorry, mir war nicht klar, dass es dir nicht klar ist, dass das in die Verknüpfung muss...

Alternativ kannste auch mit dem Script:

Set Shell = CreateObject("WScript.Shell")  
DesktopPath = Shell.SpecialFolders("Desktop")  
Set link = Shell.CreateShortcut(DesktopPath & "\test.lnk")  
link.Arguments = "/K cd c:\script"  
link.Description = "test shortcut"  
link.HotKey = "CTRL+ALT+SHIFT+X"  
link.IconLocation = "%windir%\system32\cmd.exe"  
link.TargetPath = "%windir%\system32\cmd.exe"  
link.WindowStyle = 3
link.WorkingDirectory = "%windir%"  
link.Save
speichern unter *.vbs

ein shortcut erstellen und die entsprechenden parameter setzen.