Cara cepat akses .NET SDK Command Prompt

Created at : Feb/16/2007  
1468 Views   0 Comments

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...dan...


[Comments]

[Write your comment]
Name (required)
URL (optional)
Example : http://www.yulianmf.com  
Comment

KZMQ
Input code above below (Case Sensitif) :
About Me 
Rully Yulian MF
My Name is Rully Yulian Muhammad Firmansyah. I am an IT Trainer, IT Consultant and Application Developer spesializing in Microsoft .NET technology and SQL Server database. I live in Bandung, Indonesia. My hobby is to play Guitar. [Read More...]
Top Download 
Bagaimana caranya menginstal database ketika deploying sebuah aplikasi? : Downloaded 2235 times  
Change Group,Sort Order, Filtering By Date in Crystal Reports : Downloaded 2192 times  
Simple Voice Engine Application With Sound Player Class... : Downloaded 1523 times  
DataGridView Grouping : Downloaded 1243 times  
WinForms DataGrid Paging With SqlDataAdapter : Downloaded 1232 times  
Article Category 
Links 
Award 
Certifications 
MOS 2007
MCAS
MCT
MCPD
MCTS
MCAD.NET
ASP.NET Brainbench
Native Enterprise - IT Training 
Native Enterprise Facebook Group 
My Facebook 
My LinkedIn 
Syndication (RSS 2.0) 
Powered By 
Native Enterprise News