cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1532
Views
0
Helpful
3
Replies

how to cretae batch file to run sacmd through c# application

hi guys ,

 i want to create a batch file to run sacmd command prompt from c# application  , is this possible create batch file to run sacmd

please anyone  help me

1 Accepted Solution

Accepted Solutions

Yes, certainly. Refer to commandline guide provided with the product. You should have all the information inside that

View solution in original post

3 Replies 3

Yes, certainly. Refer to commandline guide provided with the product. You should have all the information inside that

dinesh ,

i'm new to the cisco tidal , i gone through the command line guide but i doesn't fine how to write bat file and run using c# , will please send me one example for that 

thanks in advance 

There are two parts to this.

  1. To create a batch script to run sacmd. 
    • Make sure you have installed TESCommandLine on your Tidal environment
    • Then make sure you have activated the CommandLine, as given in the guide. You should also see how you can save the user credentials using -persist option in the user guide. The below example assumes the credentials are saved. If not you have to use -pass parameter for the user's password
    • Create batch script. Sample for getting job alias for a given job name. 
      • ::listrule +i ->It is used the get the job ID. '+i' will contain the output.
        ::-n ->Here we pass the job name for which we need Job ID.
        :: %1 -> Job Name
        :: %2 -> URL to invoke sacmd scripts. Generally points to CM. It's different than the CM URL
        :: %3 -> User name
        cd C:\Program Files\TIDAL\TESCmdLine\bin\
        sacmd -cmdspurl %2 -user domain\%3 listrule +i -n %1

  2. How to call the batch script from C#.

For this, you will need to refer to MSDN or other forums like stackoverflow. There are several examples on the web. For example, http://stackoverflow.com/questions/5519328/executing-batch-file-in-c-sharp

- Dinesh

Review Cisco Networking for a $25 gift card