CabMaker v1.0 (Command Line Tool)

If you have ever need explore or change a file content inside of wsp file,  you already know that changing extention and rename it as “Cab” file , you can open or extract contained files by using well know compress programs like zip or rar openers. But what if after you change some file for example after fixing an element.xml file , if you  need to make again a wsp , this very simple tool can help make cab(or wsp) files.

Usage: cabmaker <source folder> <cab file name>
Examples :
cabmaker c:\mySolution c:\mysolution.wsp
cabmaker c:\mySolution c:\mysolution.cab

Download:
For 64 bit systems:
https://spstools.codeplex.com/releases/view/86657#DownloadId=371493
For 32 bit systems:
https://spstools.codeplex.com/releases/view/86657#DownloadId=371494

 

 

 

Advertisements

c# FileLock – If you need to lock a file for temporary purpose.

Hi Everyone ,

FileLock is vey simple tool that locking defined file in given path. This tool can be used acting as AV programs , troublesoothing or reproduce error when a file is locked scenarios .
You can download binaries or source from :

http://spstools.codeplex.com/releases/view/80978

FileLock.cs
  1. class Program
  2.  {
  3.      static void Main(string[] args)
  4.      {
  5.          if (args.Length != 1)
  6.          {
  7.              Console.WriteLine(“FileLock v1.0”);
  8.              Console.WriteLine(“Usage: FileLock <path>”);
  9.          }
  10.          else
  11.          {
  12.              Console.WriteLine(args[0] + ” is Locked” + Environment.NewLine + “Press any key to relase!”);
  13.              using (FileStream fs = new FileStream(args[0], FileMode.Open, FileAccess.Write, FileShare.Write))
  14.              {
  15.                  fs.Lock(0, fs.Length);
  16.                  Console.ReadKey();
  17.                  fs.Unlock(0, fs.Length);
  18.              }
  19.          }
  20.      }
  21.  }