Cara cepat akses .NET SDK Command Prompt

Posted at : Feb/16/2007
4078 Views

Kadang kala kita direpotkan dengan penggunaan SDK Command Prompt ketika kita harus melocate lokasi direktori yang akan kita tuju, apalagi kalau projectnya banyak. Bisa dibayangkan setiap akan menggunakan SDK Command Prompt harus selalu merubah lokasinya kalau lokasi direktori tsb berbeda dan kedalaman sub foldernya panjang sekali. Ada trik yang bisa dilakukan untuk menyikapi 'kekesalan' tsb. Jadi nantinya kita tinggal buka explorer, tuju direktori yang akan kita gunakan, kemudian klik kanan dan dari menu tersebut tinggak pilih menu yang sudah dibuat, maka SDK Command Prompt tsb akan secara otomatis melocate ke direktori tsb. Dibawah ini diberikan langkah-langkahnya (untuk SDK Command Prompt versi 1.1 dan versi 2.0)

1.Buat code seperti ini (C#) (SDK Command Prompt v 1.1) :

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Text;
   4:   
   5:  namespace SDKv1._CommandPrompt
   6:  {
   7:      class Program
   8:      {
   9:          static void Main(string[] args)
  10:          {
  11:              System.Diagnostics.Process procSetPath =
  12:                  new System.Diagnostics.Process();
  13:   
  14:              procSetPath.StartInfo.FileName =
  15:                  "C:\\WINDOWS\\system32\\cmd.exe";
  16:   
  17:              string strArgs = @"/k ""C:\Program Files\" +
  18:                  @"Microsoft Visual Studio .NET 2003\" +
  19:                  @"Common7\Tools\vsvars32.bat""";
  20:  
  21:              procSetPath.StartInfo.Arguments = strArgs;
  22:              try
  23:              {
  24:                  procSetPath.Start();
  25:              }
  26:              catch (Exception ex)
  27:              {
  28:                  Console.WriteLine("Error occured : {0}", ex.Message);
  29:                  Console.ReadLine();
  30:              }
  31:          }
  32:      }
  33:  }

2. Buat code seperti ini (C#) (SDK Command Prompt v 2.0) :

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Text;
   4:   
   5:  namespace SDKv2._CommandPrompt
   6:  {
   7:      class Program
   8:      {
   9:          static void Main(string[] args)
  10:          {
  11:              System.Diagnostics.Process procSetPath =
  12:                  new System.Diagnostics.Process();
  13:   
  14:              procSetPath.StartInfo.FileName =
  15:                  "C:\\WINDOWS\\system32\\cmd.exe";
  16:   
  17:              string strArgs = @"/k ""C:\Program Files\" +
  18:                  @"Microsoft Visual Studio 8\SDK\" +
  19:                  @"v2.0\Bin\sdkvars.bat""";
  20:  
  21:              procSetPath.StartInfo.Arguments = strArgs;
  22:              try
  23:              {
  24:                  procSetPath.Start();
  25:              }
  26:              catch (Exception ex)
  27:              {
  28:                  Console.WriteLine("Error occured : {0}", ex.Message);
  29:                  Console.ReadLine();
  30:              }
  31:          }
  32:      }
  33:  }

3. Setelah dibuat kedua program diatas, buka windows explorer. Pilih menu Tools-Folder Options. Kemudian di tab File Types pilih file types Folder-Klik button Advanced-Klik button New-Beri Nama menu yang akan muncul nantinya pada textbox action-kemudian browse ke file exe yang sudah dibuat diatas (per versi)-klik button OK-klik button OK-Klik button OK.

4. Coba locate ke direktori yang akan anda tuju lewat explorer, klik kanan dan pilih menu yang sudah dibuat tadi.


ABOUT ME

Rully Yulian MF
Rully Yulian Muhammad Firmansyah | Co-Founder & IT Trainer at Native Enterprise | Microsoft Azure Data Scientist | IBM RAG & Agentic AI | IBM Data Science & Data Analyst | Python Certified (PCEP, PCAP) | MOS, MTA, Xamarin Certified, ex MCT | ex MVP

CERTIFICATIONS

Microsoft Certified Associate
IBM RAG and Agentic AI Professional
IBM Data Science Professional IBM Data Analyst Professional
PCAP Associate Python Programmer Certified PCEP Entry Level Python Programmer Certified
Xamarin Certified
MOS 2007
MCPD MCTS
MCAD.NET

NATIVE ENTERPRISE

Native Enterprise - IT Training

FOLLOW ME

Youtube  X Twitter Facebook  Instagram  LinkedIn

RSS


NATIVE ENTERPRISE NEWS

© Copyright 2006 - 2026   Rully Yulian MF   All rights reserved.