Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.2 KiB

  1. /*************************************************************************
  2. *
  3. * NWSCRIPT.C
  4. *
  5. * This module is the NetWare Logon Script utility.
  6. *
  7. * Copyright (c) 1995 Microsoft Corporation
  8. *
  9. * $Log: N:\NT\PRIVATE\NW4\NWSCRIPT\VCS\NWSCRIPT.C $
  10. *
  11. * Rev 1.3 22 Jan 1996 16:48:32 terryt
  12. * Add automatic attach query during map
  13. *
  14. * Rev 1.2 22 Dec 1995 14:26:08 terryt
  15. * Add Microsoft headers
  16. *
  17. * Rev 1.1 20 Nov 1995 16:10:38 terryt
  18. * Close open NDS handles
  19. *
  20. * Rev 1.0 15 Nov 1995 18:07:42 terryt
  21. * Initial revision.
  22. *
  23. * Rev 1.1 23 May 1995 19:37:18 terryt
  24. * Spruce up source
  25. *
  26. * Rev 1.0 15 May 1995 19:10:58 terryt
  27. * Initial revision.
  28. *
  29. *************************************************************************/
  30. #include <stdio.h>
  31. #include <windows.h>
  32. #include <locale.h>
  33. #include <stdlib.h>
  34. #include <time.h>
  35. #include <direct.h>
  36. #include <process.h>
  37. #include <string.h>
  38. #include <malloc.h>
  39. #include <nwapi.h>
  40. #include "nwscript.h"
  41. int NTNetWareLoginScripts( int argc, char ** argv );
  42. unsigned int fNDS = FALSE;
  43. /*************************************************************************
  44. *
  45. * main
  46. * Main function and entry point
  47. *
  48. * ENTRY:
  49. * argc (input)
  50. * count of the command line arguments.
  51. * argv (input)
  52. * vector of strings containing the command line arguments;
  53. * (not used due to always being ANSI strings).
  54. *
  55. * EXIT
  56. * (int) exit code: SUCCESS for success; FAILURE for error.
  57. *
  58. *************************************************************************/
  59. int __cdecl
  60. main( int argc,
  61. char **argv )
  62. {
  63. //
  64. // Call wksta to reset the sync login script flag if it did set it.
  65. // This flag is set and reset everytime so that if nw login scripts
  66. // are not used, user does not need wait.
  67. // Ignore any errors.
  68. //
  69. // Sets the locale to the default, which is the system-default
  70. // ANSI or DBCS code page obtained from the operating system.
  71. setlocale( LC_ALL, "" );
  72. (void) NwSetLogonScript(RESET_SYNC_LOGONSCRIPT) ;
  73. (void)NTNetWareLoginScripts( argc, argv );
  74. CleanupExit( 0 );
  75. return 0;
  76. } /* main() */