| 
| 
| 
| #134684 - 2005-02-27 12:55 PM  FAQ Contents Page |  
| NTDOC   Administrator
 
       
   Registered:  2000-07-28
 Posts: 11627
 Loc:  CA
 | 
FAQ Contents Page - Posted by NTDOC
 MAKE SURE you are using the latest release version of KiXtart before posting that either your script or a script you copied from the board is not working.
 
 Last updated: 2005-Apr-25
 
 This page is a listing of the available Frequently Asked Questions that mainly relate to tasks that are often asked on the board.  It does not cover every possible question, but should hopefully give you a quick answer to something you're wondering how to accomplish with KiXtart.
 
 You can either browse this list or use CTRL-F to search for a possible keyword on this list to help you locate what you're looking for a little faster.
 
 This FAQ section is not meant to be a replacement for the KiXtart manual but rather a supplement to help you understand how better to use KiXtart in your environment.
 
 The KiXtart manual comes with the zip file download of KiXtart KiXtart 32 bits v2001 4.23
 
 Here is a compiled help file of the KiXtart 4.22 manual from ScriptLogic HTML Help File 4.22
 
 ABC's of KiXtart board etiquette and message to new forum users
 ADSI/WMI/COM Info and links
 Alphabetical list of UDFs
 Analysis of KiX-related files
 Batch-less (or remove NTLOGON.BAT) Login script..
 Best Practices and Methods
 Can't decide what editor to use... Maybe this'll help
 Cannot find what you are looking for?
 COM Scripting Primer
 Can I run a logon script when logging in via RAS or VPN?
 Catch that error message that flashes for a second
 Citrix and/or Terminal Server Client Collection
 Citrix/Terminal Server Configuration
 Curly quotes “ and ”
 Debugging script without user input. also during logging on. the advanced way
 Debugging without user input
 Default Printer Configuration
 Determining the Default Printer including connection type (2nd edition)
 Determining the Default Printer
 EXIT [error level / exit code] optional or not?
 Error Code Look up..
 FYI - Heads Up: Microsoft's Knowledgebase Changes
 File Operations
 Files/Applications - commonly used
 HOWTO: Submit code to / copy code from the board
 How do I send e-mail from KiXtart? (SMTP)
 How do we check and format code for scripts?
 How do we deploy an application? - InstallShield and others
 How to use UDFs
 How to write a UDF
 INFO: KiXcrypt version 3.05a - KiXtart packager/encryption utility
 IP Address trimming
 Install Packagers
 Installing an Application as an Admin
 Is '?' a PRINT or NEWLINE command?
 KiX upgrade: what are those new features? can upgrade be done without any danger?
 KiXtart Deployment
 KiXtart Starter's Guide
 Limits in NetBIOS, computer/printer names, share names/comments
 Local vs. RAS Connections
 Locations of Desktop, Start Menu, etc
 Not quite everything you wanted to know about RUN and SHELL
 Outlook/Exchange Configuration
 Proper use of quotes
 Quote (") characters on the command line
 Registry Tools
 Registry
 Sequence of events during logon
 TCP/IP Primer, Part I - IP Addresses
 TCP/IP Primer, Part II - Classless Inter-Domain Routing (CIDR)
 TCP/IP Primer, Part III - IP Addresses and KiXtart
 Undocumented MessageBox Styles
 Use of %0\..\ to launch KiX
 Using $ inside quotes
 W2k+ - Keep the Window visible on login?
 Windows 9x/Me Kixtart Support
 Windows XP Professional Fast Logon Optimization
 
 
 
 ABC's of KiXtart board etiquette and message to new forum usersWelcome to the KiXtart.org bulletin board.  In order to make your experience here more productive and enjoyable, you should take a moment to understand how the board works.  Following board etiquette can go a long way toward getting better replies.
 ABC's of KiXtart board etiquette and message to new forum users
 
 ADSI/WMI/COM Info and linksThe interesting parts we find many time on the forums:
 - how can I use it on Win9x and NT clients?
 Most everything that is done under NT can be done with Win9x..
 F.E. Win9x does not have Performance Counters
 - where can I find additional information?
 There are several links here in this FAQ
 Several people have put together examples in the COM/UDF Forums of Kixtart.org
 - where can I find the possible names/keys within a object?
 ADSI/WMI/COM Info and links
 
 
 Analysis of KiX-related filesIf we do an analysis of KIX32.EXE.
 The only difference between KIX32.EXE and WKIX32.EXE is there is one additional entry for imported functions:
 KERNEL32 4 AllocConsole
 Analysis of KiX-related files
 
 Batch-less (or remove NTLOGON.BAT) Login script..This assumes that you have the KIXTART.KIX script already created. Within the documentation, it states that you can execute WKIX32.EXE or KIX32.EXE without having to specify KIXTART.KIX
 Batch-less (or remove NTLOGON.BAT) Login script..
 
 Best Practices and MethodsStart with a UDF-like header (What does the script do, who wrote it, change history etc.)
 Use break on until the script is finished
 Use SetOption('NoVarsInStrings','ON') en SetOption('Explicit','ON')
 Comment your code
 Let the script be tested by someone who does not know or understand how to code script.
 Never use GOTO/GOSUB!!! These are considered "old school" and with properly written code, you can work around
 (even with older versions of KiXtart). With newer versions of KiXtart, you can replace with a DO/UNTIL,WHILE, or FUNCTION
 Best Practices and Methods
 
 Can't decide what editor to use... Maybe this'll helpEvery now and then, someone brings up the topic of what is the best editor to write KiX (and others) scripts with. There's always interesting commentary, and one thing's for sure; people are quite passionate about their editor.
 Can't decide what editor to use... Maybe this'll help
 
 
 Cannot find what you are looking for?You can do a search from above..
 Choose the Search Link.
 (1) Select Forum or Category to search
 You can search Each individually or all forums
 Cannot find what you are looking for?
 
 COM Scripting PrimerSometimes it helps to have an abstract mental picture of how things work.
 I'll tell you my mental picture in terms of how KiXtart COM (KOM) works. I think of COM objects as sort of like smart DOS programs.
 For example, lets say you wanted to add a new user account to your local workstation. There are two ways to do it in kixtart:
 COM Scripting Primer
 
 
 Catch that error message that flashes for a secondWhen you have some bad code that stops the KiX interpreter, it will put the error message on the console.  The problem is that the console closes before you get to read the message.
 The best way to troubleshoot and to get the message to stay on the console is to first open a DOS box.  Then, from the DOS box, type the command to launch your test script.
 Catch that error message that flashes for a second
 
 Citrix and/or Terminal Server Client CollectionFirst off, I would like to explain...
 In the case of thin (Citrix or Terminal Server) clients, KiX always runs in the memory space of the server so all the standard queries and macros report on the server and not on the client. One generally does not want a logon script to run on a Terminal Server so there needs to be a method to determine and subvert the script.
 Citrix and/or Terminal Server Client Collection
 
 
 Curly quotes “ and ”The curly quotes “ and ” should be banned from all documentation. Do yourself a favor and open your DOC manual in MS Word. Under Tools | AutoCorrect... | AutoFormat, disable "Straight quotes" with “smart quotes” and do the same under AutoFormat As You Type as well.
 Curly quotes “ and ”
 
 Debugging script without user input. also during logging on. the advanced wayThere is an advanced way of debugging your script. First it is important that your script is correct.  Secondly you can extend your script with additional kixtart code, which makes it possible to debug without the requirement of user input. Also during a loging on session it can be very handy.
 Debugging script without user input. also during logging on. the advanced way
 
 
 Default Printer ConfigurationThis sets up printers and captures the local Printer mapped via the network and writes to an INI file. The reason for the INI is that the computer system may change location or user gets a new imaged desktop
 Also, if a new person logs in under a new profile/system, they will get the same printer
 Default Printer Configuration
 
 Determining the Default Printer including connection type (2nd edition)We read the topic Determining the Default Printer, but it didn't cover the whole story.
 Question is: is there a way to determine which printer is currently set as the default.
 Also we want to know: is the printer locally connected.
 For this task in W9x and NTx environment we have defined two script versions.
 Determining the Default Printer including connection type (2nd edition)
 
 Determining the Default PrinterI know there is a command to set the default printer (SETDEFAULTPRINTER), but is there a way to determine which printer is currently set as the default?
 Determining the Default Printer
 
 
 Error Code Look up..1. Convert num to Hex -2147022675 = 0x800708AD
 2. Strip top 4 bytes = 08AD
 3. Convert back to Dec 0x08AD = 2221
 4. Look up this error with NET HELPMSG 2221
 Error Code Look up..
 
 FYI - Heads Up: Microsoft's Knowledgebase ChangesAs of November 7, 2002, prefix letters will be phased out of all Knowledge Base (KB) articles worldwide making it easier for you to request an article in a language other than your browser settings
 FYI - Heads Up: Microsoft's Knowledgebase Changes
 
 File Operations1. Getting a major file version
 2. Check for Existence of directory
 3. Check for Existence of a file
 3a. Check for Existence of a file with folder check
 4. Test for Drive existence with notification
 5. Adding a Program Group and Item
 6. Adding a shortcut to the desktop
 File Operations
 
 
 HOWTO: Submit code to / copy code from the boardIf you have more than a few lines of code, use the CODE button found under 'Instant UBB Code' below the editing window.  It will place a [CODE] and a [/CODE] tag pair.  Paste your code between the tags.  It will preserve the indenting and allow certain characters UBB would otherwise forbid.
 HOWTO: Submit code to / copy code from the board
 
 How do I send e-mail from KiXtart? (SMTP)You can use one of the following methods:
 Blat
 Postie
 COM - Howard Bullock's Win32Admin.DLL
 COM (using Outlook)
 COM - Using CDO (Collaborative Data Objects): Thanks Howard!!
 Sendmail() - UDF
 How do I send e-mail from KiXtart? (SMTP)
 
 
 
 How to use UDFsThe purpose of this FAQ is not to teach you how to write UDFs but rather how to incorporate them in your script.
 When KiX pre-parses the script, it will catalogue all the UDFs.  They are defined with Function at the start and EndFunction
 at the end.  When KiX parses through the second time and actually interprets (executes) your script, it will skip over all the UDFs
 How to use UDFs
 
 How to write a UDFWhy do you want to write a UDF?
 Most scripts contain actions that are performed multiple times. Just think of mapping 5 shares to drive letters. You end up having five sections that delete the potentially existing old drive mapping, create the new drive mapping, check for errors, and print out error/success messages. By using a UDF you encapsulate these steps in to a function/endfunction segment and pass information into the function as parameters just like you'd do with regular KiXtart functions. You now have a UDF.
 How to write a UDF
 
 
 
 
 
 Is '?' a PRINT or NEWLINE command?People familiar with batch and other scripting languages, feel a need to have a PRINT command to output to the console.  KiX being a free-form language, does not have, nor require, such a command.  To fill this void, people will often use ? to satisfy their need.
 Is '?' a PRINT or NEWLINE command?
 
 KiX upgrade: what are those new features? can upgrade be done without any danger?A lot of you are running still an old kixtart release.
 Sometimes we see questions like:
 1. what are the changes with latest release?
 2. how can I verify possible compatibility problems with mine scripts?
 3. can I easily upgrade our servers?
 4. can I easily upgrade our clients?
 KiX upgrade: what are those new features? can upgrade be done without any danger?
 
 KiXtart DeploymentHow do we deploy Kixtart to the Enterprise?
 You can copy the files as described in the Manual to the clients using GETTYPE or other OS detection methods.
 Or, you can verify the files are up-to-date using MCA's IE Express Packager utilities.  It will only install the required kixtart binairies on your clients. For the NT-Based (NT, W2000, XP, .Net) environments it is only the KIX32.EXE or WKIX32.EXE file.
 For W9x additional files included are KX16.DLL, KX32.DLL and KX95.DLL files.
 KiXtart Deployment
 
 
 Limits in NetBIOS, computer/printer names, share names/commentsMost of the limitations listed below are related to the use of the NetBIOS protocol and/or WINS.
 Limits in Active Directory:
 # , + " \ < > are special characters in LDAP as defined in RFC2253.
 User account: 20 characters, or 20 bytes depending upon the character set; individual characters may require more than one byte. A user account cannot consist solely of periods (.), spaces, or the at (@) sign. Any leading periods or spaces are cropped.
 Computer account: 15 characters, or 15 bytes depending upon the character set; individual characters may require more than one byte. A computer account cannot consist solely of numbers, periods (.), or spaces. Any leading periods or spaces are cropped.
 Group account: 63 characters, or 63 bytes depending upon the character set; individual characters may require more than one byte. A group account cannot consist solely of numbers, periods (.), or spaces. Any leading periods or spaces are cropped.
 Limits in NetBIOS, computer/printer names, share names/comments
 
 Local vs. RAS ConnectionsIn Kixtart you can use the @ras macro, which will return Number of active Remote Access Service (RAS) connections
 Local vs. RAS Connections
 
 Locations of Desktop, Start Menu, etcThis can be completed relatively easily using the Shell Folders Location of the registry..
 It is in the same location no matter if it is 9x, NT, 2k, XP for the current user.
 Locations of Desktop, Start Menu, etc
 
 
 Outlook/Exchange ConfigurationThere have been many posts on how to configure Outlook/Exchange.
 Outlook 98/2000/XP Configuration
 By: Kent Dyer (leptonator@hotmail.com)
 Note: this FAQ has been broken up to be presented in pieces relevant to you.
 Outlook/Exchange Configuration
 
 Proper use of quotesBasically, KiX will accept either single (') or double (") quotes as delimiters.  The OS, on the other hand, is not as accepting of single quotes in place of double quotes.
 Proper use of quotes
 
 Quote (") characters on the command lineThis isn't strictly KiXtart, as it appears to happen to any binary which gets command line parameters, including a simple C program
 Quote (") characters on the command line
 
 Registry ToolsThese should all be freeware:
 Regshot v1.7
 Aezay Registry Commander
 RegCool
 RegEditX 1.31
 Registry Pruner
 Easy Cleaner
 Registry Tools
 
 RegistryI find that a great many people confuse the terms "Key" and "Value". A key is like a folder and a value is like a file.
 In RegEdit, the keys appear in the left pane and are represented as manilla folders. The values appear in the right pane as paper scraps.
 With reference to values, there are value names and value data. Think of the value name as a filename and value data as
 a file's contents. Ruud, in the manual, refers to the value name as "Entry" and the value data simply as "data".
 Registry
 
 Sequence of events during logonMaybe I should have called this "Why can't I access HKEY_CURRENT_USER on Win9x/ME during logon"
 ...or Why doesn't my script work during logon but works if I run it after logon"
 ...or "Why does...  ...only work after I reboot or logoff and logon again".
 Sequence of events during logon
 
 TCP/IP Primer, Part I - IP Addressesin this primer.
 The TCP/IP suite of protocols uses the IP protocol to handle all addressing and routing issues. An IP address is a unique number that identifies each host
 TCP/IP Primer, Part I - IP Addresses
 
 
 TCP/IP Primer, Part III - IP Addresses and KiXtartKiXtart has the ability to return the IP addresses of a computer with the IPADDRESSx macro. The subnet mask of a specific adapter can be retrieved from either ENUMIPINFO(), the registry, through WMI, or using command-line utilities like IPCONFIG
 TCP/IP Primer, Part III - IP Addresses and KiXtart
 
 Undocumented MessageBox StylesJust bumped into yet another undocumented MessageBox style feature, and thought I would bring them all together under one post:
 6 - Microsoft® Windows® 2000/XP: The message box contains three push buttons: Cancel, Try Again, Continue. Use this message box type instead of ABORTRETRYIGNORE
 Undocumented MessageBox Styles
 
 
 Using $ inside quotesA word of caution on using $. The $ can in of itself be a variable, but it is not considered good practice to use it.
 Using $ inside quotes
 
 
 Windows 9x/Me Kixtart SupportWhen configuring your Windows 9x users, you can point them to the login script (typically NTLOGON.BAT) under the profile section of User Manager or Tab of Active Directory Users and Computers).
 Windows 9x/Me Kixtart Support
 
 Windows XP Professional Fast Logon OptimizationMicrosoft has optimized Windows XP to enhance the user experience by creating the impression that the operating system starts up faster.
 This is achieved by having the login prompt show up before the network is fully initialized. Additionally, existing users are logged in with cached credentials.
 Windows XP Professional Fast Logon Optimization
 
 
 Edited by NTDOC (2005-10-04 07:51 PM)
 |  
| Top |  |  |  |  
 Moderator:  Jochen, Radimus, Glenn Barnas, Allen, Arend_, ShaneEP, Mart
 
 | 
| 
 
| 0 registered
and 793 anonymous users online. 
 | 
 |  |