Standardize License information
[openafs.git] / src / WINNT / afs_setup_utils / afsrm.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /* Utility to forcibly remove AFS software without using InstallShield */
11
12 #include <afs/param.h>
13 #include <afs/stds.h>
14 #include <afs/cmd.h>
15
16 #include <windows.h>
17 #include <stddef.h>
18 #include <stdlib.h>
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22
23 #include "forceremove.h"
24
25
26 static int DoClient34(struct cmd_syndesc *as, char *arock)
27 {
28     DWORD status = Client34Eradicate(FALSE);
29
30     if (status == ERROR_SUCCESS) {
31         printf("Client 3.4a removal succeeded\n");
32     } else {
33         printf("Client 3.4a removal failed (%d)\n", (int)status);
34     }
35     return 0;
36 }
37
38 static void
39 SetupCmd(void)
40 {
41     struct cmd_syndesc  *ts;
42
43     ts = cmd_CreateSyntax("client34", DoClient34, 0,
44                           "remove AFS 3.4a client");
45 }
46
47
48 int main(int argc, char *argv[])
49 {
50     int code;
51
52     /* initialize command syntax */
53     initialize_cmd_error_table();
54     SetupCmd();
55
56     /* execute command */
57     code = cmd_Dispatch(argc, argv);
58
59     return (code);
60 }