/* WARNING: This file was generated by dkct. Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dkwt.ctr */ /* Copyright (C) 2011-2017, Dirk Krause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above opyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @file dkwt.c The dkwt module. */ #line 10 "dkwt.ctr" #include "dk3all.h" #if 0 #include "dkt-version.h" #endif #include "dk4vers.h" #include "dkt.h" #include "dkwt.h" #line 22 "dkwt.ctr" /** File name for string table file. */ static dkChar const dkwt_string_table_file_name[] = { dkT("dkwt.str") }; /** Version number string. */ static dkChar const dkwt_version[] = { dkT("dkwt ") DKT_VERSION_DK }; /** License terms. */ static dkChar const * const dkwt_license[] = { dkT(""), dkT("Copyright (c) 2011-2016, Dirk Krause"), dkT("All rights reserved."), dkT(""), dkT("Redistribution and use in source and binary forms,"), dkT("with or without modification, are permitted provided"), dkT("that the following conditions are met:"), dkT(""), dkT("* Redistributions of source code must retain the above"), dkT(" copyright notice, this list of conditions and the"), dkT(" following disclaimer."), dkT("* Redistributions in binary form must reproduce the above "), dkT(" copyright notice, this list of conditions and the following"), dkT(" disclaimer in the documentation and/or other materials"), dkT(" provided with the distribution."), dkT("* Neither the name of the copyright holder(s) nor the names of"), dkT(" contributors may be used to endorse or promote"), dkT(" products derived from this software without specific"), dkT(" prior written permission."), dkT(""), dkT("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND"), dkT("CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,"), dkT("INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF"), dkT("MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE"), dkT("DISCLAIMED."), dkT("IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE"), dkT("LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,"), dkT("EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT"), dkT("LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;"), dkT("LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)"), dkT("HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN"), dkT("CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE"), dkT("OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS"), dkT("SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH"), dkT("DAMAGE."), dkT(""), NULL #line 80 "dkwt.ctr" }; /** Message texts used by the program, localized. */ static dkChar const * const dkwt_message_texts[] = { /* 0 */ dkT("Full name: "), /* 1 */ dkT("Comment: "), /* 2 */ dkT("User comment: "), /* 3 */ dkT("Home directory:"), /* 4 */ dkT("User profile: "), /* 5 */ dkT("SID: "), /* 6 */ dkT("Type: "), /* 7 */ dkT("Guest"), /* 8 */ dkT("User"), /* 9 */ dkT("Administrator"), /* 10 */ dkT("Flags: "), /* 11 */ dkT("Login script executed."), /* 12 */ dkT("Account disabled."), /* 13 */ dkT("Home directory required."), /* 14 */ dkT("No password required."), /* 15 */ dkT("Password can not be changed."), /* 16 */ dkT("Account locked out."), /* 17 */ dkT("Password does not expire."), /* 18 */ dkT("Encrypted text password allowed."), /* 19 */ dkT("Sensitive account, no delegation."), /* 20 */ dkT("Smartcard required."), /* 21 */ dkT("DES keys only."), /* 22 */ dkT("No Kerberos pre-authentication required."), /* 23 */ dkT("Trusted for delegation."), /* 24 */ dkT("Password expired."), /* 25 */ dkT("Trusted to authenticate for delegation."), /* 26 */ dkT("Normal user account."), /* 27 */ dkT("Duplicated account for user from another domain."), /* 28 */ dkT("Workstation trust account."), /* 29 */ dkT("Server trust account."), /* 30 */ dkT("Interdomain trust account."), /* 31 */ dkT(""), /* 32 */ dkT("Operator: "), /* 33 */ dkT("Accounts operator."), /* 34 */ dkT("Server operator."), /* 35 */ dkT("Communications operator."), /* 36 */ dkT("Print operator."), /* 37 */ dkT("Country code: "), /* 38 */ dkT("Code page no.: "), /* 39 */ dkT("Source: "), /* 40 */ dkT("Comment: "), /* 41 */ dkT("Net"), /* 42 */ dkT("Local"), /* 43 */ dkT("SID: "), /* 44 */ dkT("Comment: "), /* 45 */ dkT("Description: "), /* 46 */ dkT("Location: "), /* 47 */ dkT("Server: "), /* 48 */ dkT("Share name: "), /* 49 */ dkT("Port: "), /* 50 */ dkT("Driver: "), /* 51 */ dkT("Device: "), /* 52 */ dkT("Separator file: "), /* 53 */ dkT("Print processor: "), /* 54 */ dkT("Data type: "), /* 55 */ dkT("Parameters: "), /* 56 */ dkT("Failed to create print file \""), /* 57 */ dkT("\"!"), /* 58 */ dkT("Failed to schedule print job!"), /* 59 */ dkT("Failed to add print job!"), /* 60 */ dkT("Failed to open printer \""), /* 61 */ dkT("\"!"), /* 62 */ dkT("Printer name too long!"), /* 63 */ dkT("No printer found for device \""), /* 64 */ dkT("\"!"), /* 65 */ dkT("Failed to find default printer!"), /* 66 */ dkT("Redefinition of profile base directory!"), /* 67 */ dkT("No profile base directory specified!"), /* 68 */ dkT("Syntax error - Unknown section type!"), /* 69 */ dkT("Syntax error - Incomplete section header!"), /* 70 */ dkT("Syntax error - Missing section header!"), /* 71 */ dkT("Syntax error - Redefinition of system user!"), /* 72 */ dkT("Syntax error - Redefinition of everyone user!"), /* 73 */ dkT("Syntax error - Unknown option!"), /* 74 */ dkT("Syntax error - Not a key/value pair!"), /* 75 */ dkT("Options -l and -s are exclusive!"), /* 76 */ dkT("Arguments are ignored!"), /* 77 */ dkT("FAILED TO SET KEEP-DATA FLAG!"), /* 78 */ dkT("Keep-data flag was set successfully."), /* 79 */ dkT("Exit status code indicates an error, program:\n\""), /* 80 */ dkT(""), /* 81 */ dkT("Failed to find name for SID \""), /* 82 */ dkT("\"!"), /* 83 */ dkT("Cleaning up local print queue \""), /* 84 */ dkT("\"."), /* 85 */ dkT("Successfully deleted job "), /* 86 */ dkT(": \""), /* 87 */ dkT("\"."), /* 88 */ dkT("Unnamed print job"), /* 89 */ dkT("Failed to delete job "), /* 90 */ dkT(": \""), /* 91 */ dkT("\"!"), /* 92 */ dkT("Failed to open printer \""), /* 93 */ dkT("\"!"), /* 94 */ dkT("Failed to enumerate local printers!"), /* 95 */ dkT("Missing user name!"), /* 96 */ dkT("Print queue cleaned up successfully."), /* 97 */ dkT("Failed to send request!"), /* 98 */ dkT("Failed to connect to remote host!"), /* 99 */ dkT("Failed to create network socket!"), /* 100 */ dkT("Failed to find IP address for remote host!"), /* 101 */ dkT("Cleaning up remote print queue \""), /* 102 */ dkT("\"."), /* 103 */ dkT("Request too long for buffer!"), /* 104 */ dkT("Empty queue name in \""), /* 105 */ dkT("\"!"), /* 106 */ dkT("Empty host name in \""), /* 107 */ dkT("\"!"), /* 108 */ dkT("Not a queue@host name: \""), /* 109 */ dkT("\"!"), /* 110 */ dkT("Queue name \""), /* 111 */ dkT("\" too long!"), /* 112 */ dkT("Failed to initialize Windows sockets!"), /* 113 */ dkT("Error code: "), /* 114 */ dkT("."), /* 115 */ dkT("IP address: "), /* 116 */ dkT("."), /* 117 */ dkT("User profile cleanup is disabled on Windows Vista and above!"), /* 118 */ dkT("Executing command:\n"), /* 119 */ dkT(""), /* 120 */ dkT("Remove directory:\n"), /* 121 */ dkT(""), /* 122 */ dkT("Remove file:\n"), /* 123 */ dkT(""), /* 124 */ dkT("Delete registry key:\n"), /* 125 */ dkT("\\"), /* 126 */ dkT(""), /* 127 */ dkT("Registry key \""), /* 128 */ dkT("\" deleted."), /* 129 */ dkT("Failed to remove registry key:\n"), /* 130 */ dkT("\\"), /* 131 */ dkT(""), /* 132 */ dkT("Failed to open registry key:\n"), /* 133 */ dkT(""), /* 134 */ dkT("Cleaning up profiles (start)."), /* 135 */ dkT("Internal error while retrieving directory entry name!"), /* 136 */ dkT("Failed to expand string\n\""), /* 137 */ dkT("\",\nresult would become too long for buffer!"), /* 138 */ dkT("Subkey name too long:\n"), /* 139 */ dkT(""), /* 140 */ dkT("Skipping profile cleanup due to previous errors!"), /* 141 */ dkT("Cleaning up profiles (finished)."), /* 142 */ dkT("Options -u, -i, -a, and -d are mutually exlusive!"), /* 143 */ dkT("At least one argument required!"), /* 144 */ dkT("Missing file/directory name!"), /* 145 */ dkT("Administrative privileges are required!"), /* 146 */ dkT("Administrative privileges are required to modify system environment!"), NULL #line 590 "dkwt.ctr" }; /** Keywords used by the program, not localized. */ static dkChar const * const dkwt_no_loc[] = { /* 0 */ dkT(""), /* 1 */ dkT("dkwt.conf"), /* 2 */ dkT("System"), /* 3 */ dkT("Jeder"), /* 4 */ dkT("RD /S /Q \""), /* 5 */ dkT("\""), /* 6 */ dkT("DEL /Q /F \""), /* 7 */ dkT("CACLS.EXE \""), /* 8 */ dkT("\" /T /E /C /G"), /* 9 */ dkT(":F"), /* 10 */ dkT("ICACLS.EXE \""), /* 11 */ dkT("\" /grant "), /* 12 */ dkT(":F /T /C /Q"), /* 13 */ dkT(":F /C /Q"), /* 14 */ dkT("\" /E /C /G "), /* 15 */ dkT("SOFTWARE\\DKrause\\Shared\\dkwt"), /* 16 */ dkT("keep"), /* 17 */ dkT("S-1-1-0"), /* 18 */ dkT("S-1-5-18"), /* 19 */ dkT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList"), /* 20 */ dkT("\\"), /* 21 */ dkT("ProfileImagePath"), NULL #line 687 "dkwt.ctr" }; /** Subcommand names. */ static dkChar const * const dkwt_commands[] = { /* 0 */ dkT("boot"), /* 1 */ dkT("shutdown"), /* 2 */ dkT("login"), /* 3 */ dkT("logout"), /* 4 */ dkT("users"), /* 5 */ dkT("groups"), /* 6 */ dkT("printers"), /* 7 */ dkT("print"), /* 8 */ dkT("help"), /* 9 */ dkT("version"), /* 10 */ dkT("license-terms"), /* 11 */ dkT("keep"), /* 12 */ dkT("unkeep"), /* 13 */ dkT("--help"), /* 14 */ dkT("--version"), /* 15 */ dkT("--license-terms"), /* 16 */ dkT("--license"), /* 17 */ dkT("license"), /* 18 */ dkT("-h"), /* 19 */ dkT("-v"), /* 20 */ dkT("-L"), /* 21 */ dkT("cleanup-profiles"), /* 22 */ dkT("clp"), /* 23 */ dkT("env"), /* 24 */ dkT("environment"), NULL }; /** Help file names. */ static dkChar const * const dkwt_help_file_names[] = { /* 0 */ dkT("dkwt-boot.txt"), /* 1 */ dkT("dkwt-shutdown.txt"), /* 2 */ dkT("dkwt-login.txt"), /* 3 */ dkT("dkwt-logout.txt"), /* 4 */ dkT("dkwt-users.txt"), /* 5 */ dkT("dkwt-groups.txt"), /* 6 */ dkT("dkwt-printers.txt"), /* 7 */ dkT("dkwt-print.txt"), /* 8 */ dkT("dkwt-help.txt"), /* 9 */ dkT(""), /* unused */ /* 10 */ dkT(""), /* unused */ /* 11 */ dkT("dkwt-keep.txt"), /* 12 */ dkT("dkwt-unkeep.txt"), /* 13 */ dkT("dkwt-clp.txt"), /* 14 */ dkT("dkwt-env.txt"), NULL }; /** Help text for the boot command. */ static dkChar const * const dkwt_help_boot[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt boot - Boot cleanup"), dkT(""), dkT("SYNOPSIS"), dkT(" "), dkT(" dkwt boot [-t]"), dkT(""), dkT("DESCRIPTION"), dkT(""), dkT("The \"dkwt boot\" program should be run from the system boot script to do"), dkT("cleanup at boot time in PC classrooms."), dkT(""), dkT("OPTIONS"), dkT(""), dkT("-t"), dkT("\tTest mode. The program does not perform cleanup, it only writes"), dkT("\tmessages about files and directories to delete."), dkT(""), dkT("EXIT STATUS"), dkT(""), dkT("The exit status code is always 0, regardless of any error occured."), dkT(""), dkT("FILES"), dkT(""), dkT("dkwt.conf"), dkT("\tConfiguration file for cleanup operations."), dkT(""), dkT("\tRun"), dkT("\t\tdkwt -h"), dkT("\tto view detailed information about the dkwt.conf file."), dkT(""), dkT("NOTES"), dkT(""), dkT("After changing the dkwt.conf file you should run"), dkT(" dkwt boot -t"), dkT("to test the dkwt.conf file."), dkT(""), dkT("AUTHOR"), dkT(""), dkT("Dirk Krause"), dkT(""), dkT("COPYRIGHT AND LICENSE"), dkT(""), dkT("Run"), dkT(" dkwt --license-terms"), dkT("to see the license conditions."), dkT(""), dkT("SEE ALSO"), dkT(""), dkT("http://dktools.sourceforge.net"), dkT(""), NULL #line 805 "dkwt.ctr" }; /** Help text for the shutdown command. */ static dkChar const * const dkwt_help_shutdown[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt shutdown - Shutdown cleanup"), dkT(""), dkT("SYNOPSIS"), dkT(" "), dkT(" dkwt shutdown [-t]"), dkT(""), dkT("DESCRIPTION"), dkT(""), dkT("The \"dkwt shutdown\" program should be run from the system shutdown script to do"), dkT("cleanup at shutdown time in PC classrooms."), dkT(""), dkT("OPTIONS"), dkT(""), dkT("-t"), dkT("\truns in test mode. The program does not perform cleanup, it only writes"), dkT("\tmessages about files and directories to delete."), dkT(""), dkT("EXIT STATUS"), dkT(""), dkT("The exit status code is always 0, regardless of any error occured."), dkT(""), dkT("FILES"), dkT(""), dkT("dkwt.conf"), dkT("\tConfiguration file for cleanup operations."), dkT("\tRun"), dkT("\t\tdkwt -h"), dkT("\tto view detailed information about the dkwt.conf file."), dkT(""), dkT("NOTES"), dkT(""), dkT("After changing the dkwt.conf file you should run"), dkT(" dkwt shutdown -t"), dkT("to test the dkwt.conf file."), dkT(""), dkT("AUTHOR"), dkT(""), dkT("Dirk Krause"), dkT(""), dkT("COPYRIGHT AND LICENSE"), dkT(""), dkT("Run"), dkT(" dkwt --license-terms"), dkT("to see the license conditions."), dkT(""), dkT("SEE ALSO"), dkT(""), dkT("http://dktools.sourceforge.net"), dkT(""), NULL #line 866 "dkwt.ctr" }; /** Help text for the login command. */ static dkChar const * const dkwt_help_login[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt login - Login cleanup"), dkT(""), dkT("SYNOPSIS"), dkT(" "), dkT(" dkwt login [-t]"), dkT(""), dkT("DESCRIPTION"), dkT(""), dkT("The \"dkwt login\" program should be run from the user login script to do"), dkT("cleanup at login time in PC classrooms."), dkT(""), dkT("OPTIONS"), dkT(""), dkT("-t"), dkT("\truns in test mode. The program does not perform cleanup, it only writes"), dkT("\tmessages about files and directories to delete."), dkT(""), dkT("EXIT STATUS"), dkT(""), dkT("The exit status code is always 0, regardless of any error occured."), dkT(""), dkT("FILES"), dkT(""), dkT("dkwt.conf"), dkT("\tConfiguration file for cleanup operations."), dkT("\tRun"), dkT("\t\tdkwt -h"), dkT("\tto view detailed information about the dkwt.conf file."), dkT(""), dkT("NOTES"), dkT(""), dkT("After changing the dkwt.conf file you should run"), dkT(" dkwt login -t"), dkT("to test the dkwt.conf file."), dkT(""), dkT("AUTHOR"), dkT(""), dkT("Dirk Krause"), dkT(""), dkT("COPYRIGHT AND LICENSE"), dkT(""), dkT("Run"), dkT(" dkwt --license-terms"), dkT("to see the license conditions."), dkT(""), dkT("SEE ALSO"), dkT(""), dkT("http://dktools.sourceforge.net"), dkT(""), NULL #line 927 "dkwt.ctr" }; /** Help text for the logout command. */ static dkChar const * const dkwt_help_logout[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt logout - Logout cleanup"), dkT(""), dkT("SYNOPSIS"), dkT(" "), dkT(" dkwt logout [-t]"), dkT(""), dkT("DESCRIPTION"), dkT(""), dkT("The \"dkwt logout\" program should be run from the user logout script to do"), dkT("cleanup at logout time in PC classrooms."), dkT(""), dkT("OPTIONS"), dkT(""), dkT("-t"), dkT("\truns in test mode. The program does not perform cleanup, it only writes"), dkT("\tmessages about files and directories to delete."), dkT(""), dkT("EXIT STATUS"), dkT(""), dkT("The exit status code is always 0, regardless of any error occured."), dkT(""), dkT("FILES"), dkT(""), dkT("dkwt.conf"), dkT("\tConfiguration file for cleanup operations."), dkT("\tRun"), dkT("\t\tdkwt -h"), dkT("\tto view detailed information about the dkwt.conf file."), dkT(""), dkT("NOTES"), dkT(""), dkT("After changing the dkwt.conf file you should run"), dkT(" dkwt logout -t"), dkT("to test the dkwt.conf file."), dkT(""), dkT("AUTHOR"), dkT(""), dkT("Dirk Krause"), dkT(""), dkT("COPYRIGHT AND LICENSE"), dkT(""), dkT("Run"), dkT(" dkwt --license-terms"), dkT("to see the license conditions."), dkT(""), dkT("SEE ALSO"), dkT(""), dkT("http://dktools.sourceforge.net"), dkT(""), NULL #line 988 "dkwt.ctr" }; /** Help text for the keep command. */ static dkChar const * const dkwt_help_keep[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt keep - Temporarily disable automatic cleanup"), dkT(""), dkT("SYNOPSIS"), dkT(""), dkT(" dkwt keep"), dkT(""), dkT("DESCRIPTION"), dkT(""), dkT("Use this program to disable automatic cleanup until (including) the next"), dkT("user login."), dkT("You should use this command in lectures about system programming before"), dkT("starting to test self-made system software, drivers..."), dkT("Use the"), dkT(" dkwt unkeep"), dkT("command to restore normal automatic cleanup when you are done with the tests."), dkT(""), dkT("EXIT STATUS"), dkT(""), dkT("0 on success, all other exit status codes indicate an error."), dkT(""), dkT("REGISTRY"), dkT(""), dkT("The HKEY_LOCAL_MACHINE\\SOFTWARE\\DKrause\\Shared\\dkwt must exist, full access"), dkT("must be possible for \"Everyone\" or \"INTERACTIVE\"."), dkT(""), dkT("AUTHOR"), dkT(""), dkT("Dirk Krause"), dkT(""), dkT("COPYRIGHT AND LICENSE"), dkT(""), dkT("Run"), dkT(" dkwt --license-terms"), dkT("to see the license conditions."), dkT(""), dkT("SEE ALSO"), dkT(""), dkT("http://dktools.sourceforge.net"), dkT(""), NULL #line 1039 "dkwt.ctr" }; /** Help text for the keep command. */ static dkChar const * const dkwt_help_unkeep[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt unkeep - Restore automatic cleanup"), dkT(""), dkT("SYNOPSIS"), dkT(""), dkT(" dkwt unkeep"), dkT(""), dkT("DESCRIPTION"), dkT(""), dkT("After disabling automatic cleanup temporarily using \"dkwt keep\" you can use"), dkT("this command to restore normal automatic cleanup."), dkT(""), dkT("EXIT STATUS"), dkT(""), dkT("0 on success, all other exit status codes indicate an error."), dkT(""), dkT("REGISTRY"), dkT(""), dkT("The HKEY_LOCAL_MACHINE\\SOFTWARE\\DKrause\\Shared\\dkwt must exist, full access"), dkT("must be possible for \"Everyone\" or \"INTERACTIVE\"."), dkT(""), dkT("AUTHOR"), dkT(""), dkT("Dirk Krause"), dkT(""), dkT("COPYRIGHT AND LICENSE"), dkT(""), dkT("Run"), dkT(" dkwt --license-terms"), dkT("to see the license conditions."), dkT(""), dkT("SEE ALSO"), dkT(""), dkT("http://dktools.sourceforge.net"), dkT(""), NULL #line 1085 "dkwt.ctr" }; /** Help text for the cleanup-profiles command. */ static dkChar const * const dkwt_help_clp[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt cleanup-profiles - Clean up profiles directories."), dkT(""), dkT("SYNOPSIS"), dkT(""), dkT(" dkwt cleanup-profiles"), dkT(" dkwt clp"), dkT(""), dkT("DESCRIPTION"), dkT(""), dkT("On Windows Vista and above we can not clean up profile directories"), dkT("from boot/shutdown/logon/logoff scripts as these scripts are run from"), dkT("a user account with insufficient permissions. User profiles cleanup"), dkT("is skipped in \"dkwt boot\", \"dkwt login\", \"dkwt logout\", and \"dkwt shutdown\"."), dkT(""), dkT("You can start a command prompt *as administrator* instead and run"), dkT("\"dkwt cleanup-profiles\" from there."), dkT("The program first attempts to use system functions to delete"), dkT("directories, additionally it uses the \"RD\" command."), dkT(""), dkT("Alternatively run \"dkwtadm cleanup-profiles\", this variant of dkwt uses"), dkT("the UAC to obtain administrative permissions."), dkT(""), dkT("EXIT STATUS"), dkT(""), dkT("0 on success, all other exit status codes indicate an error."), dkT(""), dkT("AUTHOR"), dkT(""), dkT("Dirk Krause"), dkT(""), dkT("HISTORY"), dkT(""), dkT("COPYRIGHT AND LICENSE"), dkT(""), dkT("Run"), dkT(" dkwt --license-terms"), dkT("to see the license conditions."), dkT(""), dkT("SEE ALSO"), dkT(""), dkT("http://dktools.sourceforge.net"), dkT(""), NULL #line 1138 "dkwt.ctr" }; /** Help text for dkwt env. */ static dkChar const * const dkwt_help_env[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt env - Modify environment variables"), dkT(""), dkT("SYNOPSIS"), dkT(""), dkT(" dkwt env [] []"), dkT(" dkwt environment [] []"), dkT(""), dkT("DESCRIPTION"), dkT(""), dkT("This function can modify environment variables, both system and"), dkT("user variables."), dkT("This function is mainly intended for environment variables storing"), dkT("names of directories or files (i.e. the PATH variable)."), dkT("You can make sure a directory is listed in a variable by inserting"), dkT("or appending the directory only if it is not yet present."), dkT(""), dkT("OPTIONS"), dkT(""), dkT("-s"), dkT("\tProcess system environment variables."), dkT("\tWithout this option the program processes the user environment."), dkT(""), dkT("-e"), dkT("\tWhen creating a new registry value, use type REG_EXPAND_SZ"), dkT("\tinstead of default REG_SZ."), dkT("\tThis option is ignored when processing existing registry values."), dkT(""), dkT("-u"), dkT("\tDelete registry value completely, unset variable."), dkT(""), dkT("-i"), dkT("\tEnsure the variable lists the specified directory or file,"), dkT("\tinsert at start if not present."), dkT(""), dkT("-a"), dkT("\tEnsure the variable lists the specified directory or file,"), dkT("\tappend at end if not present."), dkT(""), dkT("-d"), dkT("\tRemove a directory or file from a variable listing one"), dkT("\tor multiple directories or files."), dkT("\tIf the variable value is empty after removal, the registry"), dkT("\tvalue is deleted."), dkT(""), dkT("EXIT STATUS"), dkT(""), dkT("0 on success, all other exit status codes indicate an error."), dkT(""), dkT("EXAMPLES"), dkT(""), dkT("Show value of user environment variable TEMP:"), dkT(""), dkT("\tdkwt env TEMP"), dkT(""), dkT("Show value of system environment variable PATH:"), dkT(""), dkT("\tdkwt env -s PATH"), dkT(""), dkT("Completely delete user environment variable FOO:"), dkT(""), dkT("\tdkwt env -u FOO"), dkT(""), dkT("Completely delete system environment variable BAR:"), dkT(""), dkT("\tdkwt env -s -u BAR"), dkT(""), dkT("Set user environment variable FOO:"), dkT(""), dkT("\tdkwt env FOO All text after variable name goes into value"), dkT(""), dkT("Set system environment variable BAR:"), dkT(""), dkT("\tdkwt env -s BAR Same procedure for system variables"), dkT(""), dkT("Make sure system PATH contains ``C:\\Program Files\\Nice Program''"), dkT("(insert at start if not present):"), dkT(""), dkT("\tdkwt env -s -i Path C:\\Program Files\\Nice Program"), dkT(""), dkT("Make sure system PATH contains ``C:\\Program Files\\Other Program''"), dkT("(append at end if not present):"), dkT(""), dkT("\tdkwt env -s -a Path C:\\Program Files\\Other Program"), dkT(""), dkT("Remove ``C:\\Program Files\\Nice Program'' from system PATH:"), dkT(""), dkT("\tdkwt env -s -d Path C:\\Program Files\\Nice Program"), dkT(""), dkT("NOTES"), dkT(""), dkT("``dkwt env'' does not change environment variables in cmd.exe windows"), dkT("already opened."), dkT(""), dkT("AUTHOR"), dkT(""), dkT("Dirk Krause"), dkT(""), dkT("HISTORY"), dkT(""), dkT("COPYRIGHT AND LICENSE"), dkT(""), dkT("Run"), dkT(" dkwt --license-terms"), dkT("to see the license conditions."), dkT(""), dkT("SEE ALSO"), dkT(""), dkT("http://dktools.sourceforge.net"), dkT(""), NULL #line 1259 "dkwt.ctr" }; /** Help text for the users command. */ static dkChar const * const dkwt_help_users[] = { dkT(""), dkT("NAME"), dkT(""), dkT(" dkwt users - List users"), dkT(""), dkT("SYNOPSIS"), dkT(""), dkT(" dkwt users [