Page 1 of 1 1
Topic Options
#25536 - 2002-07-19 11:40 PM Desktop doesn't appear until 2nd logon.
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
I use a slightly different method of user profiles basically I made a customised Default User with UK settings change how Outlook opens i.e. Folders List instead of the Outlook Bar and other settings anyway back to the question we have in excess of 60 servers an I want to have a standard batch file that calls
c:\kix\wkix32 logon.kix i.e I don't want
the batch file to have any entries i.e net use z: \\servername\Profile$
This is the batch files

(Logon.bat)

@Echo Off
Start /min /i kix.bat
Exit

(Kix.bat)

@ echo off
RD C:\temp /s /q
MD C:\Temp
Call printers.cmd
call c:\kix\wkix32 Logon.kix
exit

As you can see this can mount to alot of work to add the entry net use z: \\servername\Profile$ to all servers if its done as above then this can be pushed out no problem. what appears to happen is that it works fine with the net use z: \\servername\Profile$ added to the batch file above instead of kix adding it and the user gets their desktop which they browse to the server for but when you take it out of the batch file and let kix add it the user has to logon twice before the get their desktop this is due to the latencey of making the net use to Profile$ after getting the desktop I guess what im trying to find out is is there a way to force a refresh when the user has logged on to get their desktop instead of them having to logoff and log on again.

Thanks in advance

Top
#25537 - 2002-07-20 10:02 AM Re: Desktop doesn't appear until 2nd logon.
ash wilson (kyosei) Offline
Getting the hang of it

Registered: 2002-04-22
Posts: 58
Loc: auckland new zealand
Stealth,
I use the following to refresh the desktop.

setfocus("program manager")
sendkeys("{f5}")

regards ash
_________________________
KYOSEI. There are only three groups of people that can count. Those that can, and those that can't.

Top
#25538 - 2002-07-21 12:15 AM Re: Desktop doesn't appear until 2nd logon.
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
Yeah thanks for the reply the problem is tho that the user has actually logged on before the net use is made i.e. Z: drive connects to a share on the server unless its added to the batch files I mentioned before if its done that way it works fine as long as the policy has the check box set run logon scripts Synchronously the script rewrites the location of the users desktop, start menu and programs folder to Z:\Desktop,
Z:\Start Menu and
Z:\Start Menu\Programs
if its done with kix after the batchfiles run as posted above with a
Use Z: \\Servername\Profile$ /persistent
then the second time the user logs on then the profile takes and the get the correct desktop a simple F5 key press isn't enough is there any way of doing this?

Top
#25539 - 2002-07-22 12:44 AM Re: Desktop doesn't appear until 2nd logon.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

The we you are calling wkix32 isn't correct.
Call isn't for EXE files.
For wkix32 you must need as prefix a start call (see kixtart
documentation)
Change you batch file:
code:
@echo off
rd c:\temp /s /q
if not exist c:\temp\nul md c:\temp
call printers.cmd
start /w c:\kix\wkix32.exe logon.kix
exit
@echo off

Also you doesn't specify the location of file "logon.kix" which
can be also a problem.
By problems try kixtart always with the kix32.exe variant.
The statement becomes

c:\kix\kix32.exe logon.kix

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#25540 - 2002-07-21 05:55 PM Re: Desktop doesn't appear until 2nd logon.
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
MCA,

You are right. We may want to have Ruud go back to Microsoft to update their "Q" Article..

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318689

Hmmm..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#25541 - 2002-07-21 09:46 PM Re: Desktop doesn't appear until 2nd logon.
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
Thanks that may be the case although it still works ok. I will ammend the batch file but do you have any ideas how I can make this work without adding the Z connection in the Dos Batch file and without having the user logoff and logon before getting their desktop I wonder is there a way to add to the registry for the default user to have a Z: drive connection at start so when the user logs on the z: connection alredy exists its all a matter of timming any ideas guys if I could sort this it would save having in excesss of 50 -60 seperate Batch files all with net use z: \\servername\Profile$ in it.

Thanks in advance Stealth

Top
#25542 - 2002-07-21 09:49 PM Re: Desktop doesn't appear until 2nd logon.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

For the Win9x environment there is always a Z-drive, which is related to the
\\server\netlogon share. Choose another drive letter for mapping your \\server\profile$ share.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#25543 - 2002-07-21 09:49 PM Re: Desktop doesn't appear until 2nd logon.
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
Sorry the Workstations are NT but thanks I will ammend and try.
Top
#25544 - 2002-07-21 09:51 PM Re: Desktop doesn't appear until 2nd logon.
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
Thanks MCA I'm aware of that but we don't have any Win9x machines.
Top
#25545 - 2002-07-21 09:55 PM Re: Desktop doesn't appear until 2nd logon.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Please can you put your logon.kix to the board.
Possible that there is a solution with f.e. an additional script, which can
handle those 60 servers in a correct way.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#25546 - 2002-07-21 10:10 PM Re: Desktop doesn't appear until 2nd logon.
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
Sorry MCA I haved errors posting so I have Emailed You You can post this If you want Thanks
Top
#25547 - 2002-07-21 11:08 PM Re: Desktop doesn't appear until 2nd logon.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We have receive your mail. We have made a quick scan of it. Some things can be done in a better
way. We will return our remarks, suggestions and comment to it.
Tomorrow we will return our results.

Last questions:
- logon.bat & kix.bat & logon.kix are all the files you
are using for logging on?
- what are the files in your c:\kix directory?
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#25548 - 2002-07-21 11:17 PM Re: Desktop doesn't appear until 2nd logon.
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
Thats it just now MCA I did have 2 Kix files because I thought I could not copy because file was In use But I know that it is loaded in mem so just down to 1 just now but probably adding another 1 for running Outlook with a message box with a disclamier asking the user to agree when and if the user agrees then it will write to their Home directory then check for the file the next time they logon on, that will date stamp with their user name.
Top
#25549 - 2002-07-22 12:01 AM Re: Desktop doesn't appear until 2nd logon.
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Stealth,

Did you try the FAQ for posting code?

Also, when you reply to a message, the board an option to do this for you.

The only error you might receive would be an HTML Code...

Hmmm..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#25550 - 2002-07-22 02:30 PM Re: Desktop doesn't appear until 2nd logon.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear kent,

The actual problem is that this board is interpretating it as HTML code.
The code we have receive contains parts, which prevents submitting of his script.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#25551 - 2002-07-25 01:03 AM Re: Desktop doesn't appear until 2nd logon.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We have restyle your script a little bit
  • script will show a lot of zero's. they are creating by kixtart function
    calls. to prevent it you can use
    - $null=SetFileAttr(....)
    - IF SetFileAttr(....) ENDIF
  • you are using f.e. USE P: "@LSERVER\Deploy$", which contains
    special character. please use in such situations
    USE P: "@LSERVER\Deploy$$"
  • it is possible that your script may abort, when it is executing an
    unwanted USE command. To prevent abortion use following structure
    This can be your actual problem. The other statement will only create
    useless registry key settings.
    code:
      USE P: "@LSERVER\Deploy$"
    IF (@error <> 0)
    ? "Warning KIX-MAP: error @error (@serror)"
    ENDIF

  • you aren't using strings with the right format
    - USE P: "@LSERVER\Deploy$$" should be
    USE P: @LSERVER+"\Deploy$$"
    - $autocorrect+@userid.acl isn't correct and it
    should be
    $autocorrect+@userid+".acl"
    - USE G: @lserver\DOSAPPS
    should be
    USE G: @lserver+"\DOSAPPS"
  • the notation ("") in some of your WriteValue isn't correct.
    use ""
  • not so logical structure in all situations. f.e. unnecessary GOTO's
    and ELSE statements.
  • too much statements are you using.
    f.e.
    code:
     $returncode=KeyExist("HKCU\IDENTITIES\Auto Correct Done")
    IF $returncode
    GOTO NoShowAutoCorrect
    ENDIF
    SLEEP 2

    can be
    code:
     IF (KeyExist("HKCU\IDENTITIES\Auto Correct Done") = 1)
    GOTO NoShowAutoCorrect
    ENDIF

  • we advise you to use GOSUBs to make your code more readable and maintainable.
Above remarks are incorporated in our version
code:
 ; Kix Login Script
; Created 23/08/2001
; Add User Network Connections based on Group Membership
; Added File Associations with notepad primarily for ----------
; Added Repathing of Autocorrect for Microsoft Word from C:\Winnt to users Home Directory
; Custimisation of Outlook configuration & Settings
;
IF SetConsole("HIDE")
ENDIF
SETTIME "*"
;
DEL "C:\ffastun*.*"
DEL "C:\file*.chk"
DEL "C:\winnt\*.acl"
;
GOSUB mappings
GOSUB create_directory_structure
IF (Exist($homedir) = 0) ; Required to check that user has their Home Directory if not the program will finishes
$nul=MessageBox("Error creating settings for Microsoft Outlook for @fullname on Computer @WKSTA Please contact Help Desk on -------... Please refrain from using Microsoft Outlook until this has been resolved. Thank You","Home Dir Error",16,30)
GOTO end
ENDIF
GOSUB check_acl_file
GOSUB set_file_associations
GOSUB create_outlook_settings
:end
EXIT

:mappings
USE p: @lserver+"\Deploy$$"
IF (Exist("c:\kix\.") = 0)
MD "c:\kix"
ENDIF
COPY "p:\Cust\Auto Correct\sample.acl" "c:\kix\sample.acl" /h
COPY "p:\Cust\Kix\*.kix" "c:\kix" /h
COPY "p:\Cust\Robocopy.exe" "c:\winnt" /h
USE p: /delete /persistent
;
IF (Exist("z:\.") = 1)
USE z: /delete /persistent
ENDIF
USE z: @lserver+"\profile$$" /persistent
IF (@error <> 0)
? "Warning KIX-MAP-Z: error @error (@serror)"
ENDIF
;
IF (InGroup("Domain Users") <> 0)
IF (Len(@homeshr) <> 0)
USE H: @homeshr
ENDIF
$nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Desktop","z:\Desktop","REG_SZ")
$nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Start Menu","z:\Start Menu","REG_SZ")
$nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Programs","z:\Start Menu\Programs","REG_SZ")
ENDIF
IF (InGroup("Domain Casegrp") <> 0)
USE G: @lserver+"\DOSAPPS"
IF (@error <> 0)
? "Warning KIX-MAP-G: error @error (@serror)"
ENDIF
USE K: @lserver+"\CMSAPPS"
IF (@error <> 0)
? "Warning KIX-MAP-K: error @error (@serror)"
ENDIF
$nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates\","","c:\Worddocs\Templates","REG_SZ")
$nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal","g:\MM4DOCS","REG_SZ")
ENDIF
IF (InGroup("Domain Poolgrp") <> 0)
USE G: @lserver+"\DOSAPPS"
IF (@error <> 0)
? "Warning KIX-MAP-G: error @error (@serror)"
ENDIF
USE K: @lserver+"\OSC"
IF (@error <> 0)
? "Warning KIX-MAP-K: error @error (@serror)"
ENDIF
$nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates\","","c:\Worddocs\Templates","REG_SZ")
$nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal","g:\MM4DOCS","REG_SZ")
ENDIF
IF InGroup("DIV_TRAIN")
USE J: @lserver+"\TRAINDB"
IF (@error <> 0)
? "Warning KIX-MAP-J: error @error (@serror)"
ENDIF
$nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal","g:\MM4DOCS","REG_SZ")
ENDIF
RETURN

:create_directory_structure
;
;---------------------------------------------------------------------------
; Create Directory structure on H: drive (home drive)
;---------------------------------------------------------------------------
;
$homedir="%HOMEDRIVE%%HOMEPATH%" ; Required - Path For Users Home Directory
IF (Substr($homedir,len($homedir),1) <> "\")
$homedir=$homedir+"\"
ENDIF
$autocorrect=$homedir+"Autocorrect\" ; Required - Default path for locaton of Auto Correct files.
$outlookroot=$homedir+"Exchange\" ; Required - Default Path For Outlook Files
;
; Required - Creation Of Directory Tree For Outlook Files & Autocorrect
;
MD $homedir+"Autocorrect"
MD $homedir+"Docs"
MD $homedir+"Exchange"
$nul=SetFileAttr($homedir+"Exchange", 2)
$nul=SetFileAttr($homedir+"Autocorrect", 2)
$nul=SetFileAttr("C:\*.*", 2)
$nul=SetFileAttr("C:\exchange", 2)
$nul=SetFileAttr("C:\kix", 2)
$nul=SetFileAttr("C:\winnt", 2)
$nul=SetFileAttr("D:\*.*", 2)
;
$nul=WriteValue("HKCU\Control Panel\Desktop","SCRNSAVE.EXE","c:\winnt\channel screen saver.scr","REG_SZ")
RETURN

:check_acl_file
IF (Exist($autocorrect+@userid+".acl") = 0)
COPY "c:\kix\sample.acl" $autocorrect+@userid+".acl" /h
ENDIF
RETURN

:set_file_associations
;
;---------------------------------------------------------------------
; Required for --- associates certain file extensions with notepad ...
;---------------------------------------------------------------------
;
$number_of_files=5
DIM $files[$number_of_files+1]
$files[1]=".ppr"
$files[2]=".psr"
$files[3]=".pws"
$files[4]=".pdr"
$files[5]=".asc"
;
; This is used to Associate the above extensions with notepad
; so that
; users can preveiw their attachments before sending
;
; ".ppr" This is a premailed Police reports
; ".psr" This is a premailed Subject reports
; ".pws" This is a premailed Witness statements
; ".pdr" This is a premailed Death reports
; ".asc" This is for Ascii Documents
;
$nul=AddKey("HKCR\.ppr")
$nul=AddKey("HKCR\.psr")
$nul=AddKey("HKCR\.pws")
$nul=AddKey("HKCR\.pdr")
$nul=AddKey("HKCR\.asc")
IF (ExistKey("HKCR\notepad document") <> 1)
$nul=DelTree("HKCR\notepad document")
$nul=AddKey("HKCR\notepad document")
$nul=AddKey("HKCR\notepad document\Shell")
$nul=AddKey("HKCR\notepad document\Shell\open")
$nul=AddKey("HKCR\notepad document\Shell\open\command")
ENDIF
;
$ikey="HKCR\notepad document\Shell\open"
$ikey_ex=EnumValue($ikey, 0)
$default_notepad="Quickview with Notepad"
IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
$result_data_type=ReadType($ikey, $ikey_ex)
IF (@error <> 0) OR (Len($result_data_type) = 0)
$result_data_type="REG_SZ"
ENDIF
ELSE
$result_data_type="REG_SZ"
ENDIF
IF (WriteValue($ikey, $ikey_ex, $default_notepad, $result_data_type) = 0)
IF (WriteValue($ikey, $ikey_ex, $default_notepad, "REG_SZ") = 0)
ENDIF
ENDIF
;
$ikey="HKCR\notepad document\Shell\open\command"
$ikey_ex=EnumValue($ikey, 0)
$default_notepad_exe="notepad.exe %1"
IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
$result_data_type=ReadType($ikey, $ikey_ex)
IF (@error <> 0) OR (Len($result_data_type) = 0)
$result_data_type="REG_SZ"
ENDIF
ELSE
$result_data_type="REG_SZ"
ENDIF
IF (WriteValue($ikey, $ikey_ex, $default_notepad_exe, $result_data_type) = 0)
IF (WriteValue($ikey, $ikey_ex, $default_notepad_exe, "REG_SZ") = 0)
ENDIF
ENDIF
;
$i=0
WHILE ($i < $number_of_files)
$i=$i+1
$ikey="HKCR\"+$files[$i]
$ikey_ex=EnumValue($ikey, 0)
$default_key="notepad document"
IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
$result_data_type=ReadType($ikey, $ikey_ex)
IF (@error <> 0) OR (Len($result_data_type) = 0)
$result_data_type="REG_SZ"
ENDIF
ELSE
$result_data_type="REG_SZ"
ENDIF
IF (WriteValue($ikey, $ikey_ex, $default_key, $result_data_type) = 0)
IF (WriteValue($ikey, $ikey_ex, $default_key, "REG_SZ") = 0)
ENDIF
ENDIF
LOOP
RETURN

:create_outlook_settings
;
;---------------------------------------------------------------------------
; Create Settings for Outlook
;---------------------------------------------------------------------------
;
; Required to see if repath of Auto Correct files has been done if so
;
IF (KeyExist("HKCU\IDENTITIES\Auto Correct Done") = 0)
$nul=AddKey("HKCU\Software\Microsoft\Office\8.0\Common\AutoCorrect")
$nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Common\AutoCorrect\","Path",$autocorrect+@userid+".acl","REG_SZ")
$nul=AddKey("HKCU\IDENTITIES\Auto Correct Done")
;
$nul=MessageBox("The Auto correct option in Microsoft Word for @fullname on Computer @WKSTA has been repathed to your Home Directory","Autocorrect For Microsoft Word",64,5)
ENDIF
;
; Required to check that an Outlook profile for that user alredy exists if so the program finishes
;
IF (KeyExist("HKCU\IDENTITIES\Profile Done") = 0)
COPY "C:\exchange\Cust_outlook.prf" "H:\exchange\outlook.prf" /h
; Optional - Location Of Favourites File
$nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Outlook\Office Explorer","Favorites",$outlookroot,"REG_SZ")
; Optional - Location Of Personal Views
$nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Outlook\Office Explorer","Views",$outlookroot,"REG_SZ")
; Required - Location Of Personal Folders - PERSONAL.PST
$nul=WriteProfileString($outlookroot+"OUTLOOK.PRF","Service4","PathToPersonalFolders",$outlookroot+"PERSONAL.PST")
; Required - Location Of Personal Address Book - MAILBOX.PAB
$nul=WriteProfileString($outlookroot+"OUTLOOK.PRF","Service5","PathToPersonalAddressBook",$outlookroot+"MAILBOX.PAB")
; Required - Create Profile Based On Settings In OUTLOOK.PRF File Located In Root Of Home Drive
SHELL "%comspec% /c c:\exchange\profgen.exe c:\exchange\newprof.exe -p h:\exchange\outlook.prf"
$nul=AddKey("HKCU\IDENTITIES\Profile Done")
;
$nul=MessageBox("The Outlook Profile and settings have been modified for @fullname on Computer @WKSTA ","Microsoft Outlook",64,5)
ENDIF
RETURN

For possible problems we have also create a debug version.
The file %tmp%\kixdebug.txt will contain the output after running
next script
code:
            ;CLS
IF (instr("-3.0x-3.1x-3.2x-3.3x-","-"+substr(@kix,1,3)+"x-") <> 0)
IF MessageBox("sorry, your kixtart "+@kix+" release is too old."+CHR(13)+CHR(10)+CHR(13)+CHR(10)+" please upgrade.","KiXtart "+@kix+" info",4112,300)
ENDIF
EXIT
ENDIF
COLOR C+/N
;AT (1,1) " "

$_debug_file="kixdebug.txt" ; - %tmp% directory -
IF (len($_debug_file) <> 0)
IF (substr("%tmp%",len("%tmp%"),1) = "\")
$_debug_file="%tmp%"+$_debug_file
ELSE
$_debug_file="%tmp%\"+$_debug_file
ENDIF
ENDIF
;$_debug_file="c:\kixdebug.txt"
IF RedirectOutput($_debug_file)
ENDIF

? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.19e script starting"
IF (Val(substr(@kix,1,1)) >= 4)
IF (len(@scriptname) <> 0)
" ("+LCASE(@scriptname)+")"
ENDIF
ENDIF
? "-"
IF ("$_debug_already_starting" <> "yes")
? "-curdir: "+LCASE(@curdir)
? "-scriptdir: "+LCASE(@scriptdir)
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
? "-scriptname: "+LCASE(@scriptname)
ENDIF
? "-startdir: "+LCASE(@startdir)
? "-"
? "-userid: "+LCASE(@userid)+"/"+LCASE(@wuserid)
? "-user priv: "+LCASE(@priv)
IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0)
? "-version: inwin="+@inwin+"/dos="+@dos"/productsuite="+@productsuite+"/producttype="+@producttype"/csd="+LTRIM(RTRIM(@csd))
ELSE
? "-version: inwin="+@inwin+"/dos="+@dos
ENDIF
? "-"
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
? "-"+@cpu+" (memory "+MemorySize()+" MB)"
? "-"
ENDIF
ENDIF

$_debug_temp_name="" ; -format: yyyymmdd_hhmmss.sss_999 scriptname-
IF (instr("-3.6x-","-"+substr(@kix,1,3)+"x-") <> 0) OR (Val(substr(@kix,1,1)) >= 4)
IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0)
$_debug_temp_name=@msecs
SELECT
CASE (len($_debug_temp_name) = 1)
$_debug_temp_name="00"+$_debug_temp_name
CASE (len($_debug_temp_name) = 2)
$_debug_temp_name="0"+$_debug_temp_name
ENDSELECT
$_debug_temp_name="."+$_debug_temp_name
IF Srnd(@msecs)
ENDIF
SLEEP 0.050
ELSE
IF Srnd((-1)*32767/(substr(@time,7,2)+1))
ENDIF
SLEEP 1
ENDIF
$_debug_temp_name=substr(@date,1,4)+substr(@date,6,2)+substr(@date,9,2)+"_"+substr(@time,1,2)+substr(@time,4,2)+substr(@time,7,2)+$_debug_temp_name+"_"+Rnd()
IF (len($_debug_temp_name) < 25)
$_debug_temp_name=substr($_debug_temp_name+" ",1,25)
ENDIF
IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0)
IF (len(@scriptname) < 12)
$_debug_temp_name=$_debug_temp_name+" "+substr(@scriptname+" ",1,12)
ELSE
$_debug_temp_name=$_debug_temp_name+" "+@scriptname
ENDIF
ENDIF
ENDIF

IF ("$_debug_already_starting" <> "yes")
? "-debug file: "+$_debug_file
? "-debug name: "+LCASE($_debug_temp_name)
ELSE
IF (len($_debug_temp_name) <> 0)
? "-debug: "+LTRIM(RTRIM(LCASE($_debug_temp_name)))+" -> "+$_debug_file
ELSE
? "-debug-file: "+$_debug_file
ENDIF
ENDIF

IF (instr("-3.6x-","-"+substr(@kix,1,3)+"x-") = 0) AND (Val(substr(@kix,1,1)) < 4)
GOTO _debug_starting_point
ENDIF
DIM $_debug_name ; -create local variable-
:_debug_starting_point
$_debug_name=LCASE($_debug_temp_name)
$_debug_already_starting="yes"
? "-"
?"----- start-"+@time+"-"+$_debug_name+"- @error @serror"?

?"- 1-"+@time+"-"+$_debug_name+"- @error @serror"? ; Kix Login Script
?"- 2-"+@time+"-"+$_debug_name+"- @error @serror"? ; Created 23/08/2001
?"- 3-"+@time+"-"+$_debug_name+"- @error @serror"? ; Add User Network Connections based on Group Membership
?"- 4-"+@time+"-"+$_debug_name+"- @error @serror"? ; Added File Associations with notepad primarily for ----------
?"- 5-"+@time+"-"+$_debug_name+"- @error @serror"? ; Added Repathing of Autocorrect for Microsoft Word from C:\Winnt to users Home Directory
?"- 6-"+@time+"-"+$_debug_name+"- @error @serror"? ; Custimisation of Outlook configuration & Settings
?"- 7-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 8-"+@time+"-"+$_debug_name+"- @error @serror"? IF SetConsole("HIDE")
?"- 9-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 10-"+@time+"-"+$_debug_name+"- @error @serror"? SETTIME "*"
?"- 11-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 12-"+@time+"-"+$_debug_name+"- @error @serror"? DEL "C:\ffastun*.*"
?"- 13-"+@time+"-"+$_debug_name+"- @error @serror"? DEL "C:\file*.chk"
?"- 14-"+@time+"-"+$_debug_name+"- @error @serror"? DEL "C:\winnt\*.acl"
?"- 15-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 16-"+@time+"-"+$_debug_name+"- @error @serror"? GOSUB mappings
?"- 17-"+@time+"-"+$_debug_name+"- @error @serror"? GOSUB create_directory_structure
?"- 18-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Exist($homedir) = 0) ; Required to check that user has their Home Directory if not the program will finishes
?"- 19-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=MessageBox("Error creating settings for Microsoft Outlook for @fullname on Computer @WKSTA Please contact Help Desk on -------... Please refrain from using Microsoft Outlook until this has been resolved. Thank You","Home Dir Error",16,30)
?"- 20-"+@time+"-"+$_debug_name+"- @error @serror"? GOTO end
?"- 21-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 22-"+@time+"-"+$_debug_name+"- @error @serror"? GOSUB check_acl_file
?"- 23-"+@time+"-"+$_debug_name+"- @error @serror"? GOSUB set_file_associations
?"- 24-"+@time+"-"+$_debug_name+"- @error @serror"? GOSUB create_outlook_settings
?"- 25-"+@time+"-"+$_debug_name+"- @error @serror"? :end
?"- 26-"+@time+"-"+$_debug_name+"- @error @serror"? EXIT
?"- 27-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 28-"+@time+"-"+$_debug_name+"- @error @serror"? :mappings
?"- 29-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: @lserver+"\Deploy$$"
?"- 30-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Exist("c:\kix\.") = 0)
?"- 31-"+@time+"-"+$_debug_name+"- @error @serror"? MD "c:\kix"
?"- 32-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 33-"+@time+"-"+$_debug_name+"- @error @serror"? COPY "p:\Cust\Auto Correct\sample.acl" "c:\kix\sample.acl" /h
?"- 34-"+@time+"-"+$_debug_name+"- @error @serror"? COPY "p:\Cust\Kix\*.kix" "c:\kix" /h
?"- 35-"+@time+"-"+$_debug_name+"- @error @serror"? COPY "p:\Cust\Robocopy.exe" "c:\winnt" /h
?"- 36-"+@time+"-"+$_debug_name+"- @error @serror"? USE p: /delete /persistent
?"- 37-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 38-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Exist("z:\.") = 1)
?"- 39-"+@time+"-"+$_debug_name+"- @error @serror"? USE z: /delete /persistent
?"- 40-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 41-"+@time+"-"+$_debug_name+"- @error @serror"? USE z: @lserver+"\profile$$" /persistent
?"- 42-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0)
?"- 43-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Warning KIX-MAP-Z: error @error (@serror)"
?"- 44-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 45-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 46-"+@time+"-"+$_debug_name+"- @error @serror"? IF (InGroup("Domain Users") <> 0)
?"- 47-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Len(@homeshr) <> 0)
?"- 48-"+@time+"-"+$_debug_name+"- @error @serror"? USE H: @homeshr
?"- 49-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 50-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Desktop","z:\Desktop","REG_SZ")
?"- 51-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Start Menu","z:\Start Menu","REG_SZ")
?"- 52-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Programs","z:\Start Menu\Programs","REG_SZ")
?"- 53-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 54-"+@time+"-"+$_debug_name+"- @error @serror"? IF (InGroup("Domain Casegrp") <> 0)
?"- 55-"+@time+"-"+$_debug_name+"- @error @serror"? USE G: @lserver+"\DOSAPPS"
?"- 56-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0)
?"- 57-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Warning KIX-MAP-G: error @error (@serror)"
?"- 58-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 59-"+@time+"-"+$_debug_name+"- @error @serror"? USE K: @lserver+"\CMSAPPS"
?"- 60-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0)
?"- 61-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Warning KIX-MAP-K: error @error (@serror)"
?"- 62-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 63-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates\","","c:\Worddocs\Templates","REG_SZ")
?"- 64-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal","g:\MM4DOCS","REG_SZ")
?"- 65-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 66-"+@time+"-"+$_debug_name+"- @error @serror"? IF (InGroup("Domain Poolgrp") <> 0)
?"- 67-"+@time+"-"+$_debug_name+"- @error @serror"? USE G: @lserver+"\DOSAPPS"
?"- 68-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0)
?"- 69-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Warning KIX-MAP-G: error @error (@serror)"
?"- 70-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 71-"+@time+"-"+$_debug_name+"- @error @serror"? USE K: @lserver+"\OSC"
?"- 72-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0)
?"- 73-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Warning KIX-MAP-K: error @error (@serror)"
?"- 74-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 75-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates\","","c:\Worddocs\Templates","REG_SZ")
?"- 76-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal","g:\MM4DOCS","REG_SZ")
?"- 77-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 78-"+@time+"-"+$_debug_name+"- @error @serror"? IF InGroup("DIV_TRAIN")
?"- 79-"+@time+"-"+$_debug_name+"- @error @serror"? USE J: @lserver+"\TRAINDB"
?"- 80-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0)
?"- 81-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Warning KIX-MAP-J: error @error (@serror)"
?"- 82-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 83-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal","g:\MM4DOCS","REG_SZ")
?"- 84-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 85-"+@time+"-"+$_debug_name+"- @error @serror"? RETURN
?"- 86-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 87-"+@time+"-"+$_debug_name+"- @error @serror"? :create_directory_structure
?"- 88-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 89-"+@time+"-"+$_debug_name+"- @error @serror"? ;---------------------------------------------------------------------------
?"- 90-"+@time+"-"+$_debug_name+"- @error @serror"? ; Create Directory structure on H: drive (home drive)
?"- 91-"+@time+"-"+$_debug_name+"- @error @serror"? ;---------------------------------------------------------------------------
?"- 92-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 93-"+@time+"-"+$_debug_name+"- @error @serror"? $homedir="%HOMEDRIVE%%HOMEPATH%" ; Required - Path For Users Home Directory
?"- 94-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Substr($homedir,len($homedir),1) <> "\")
?"- 95-"+@time+"-"+$_debug_name+"- @error @serror"? $homedir=$homedir+"\"
?"- 96-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 97-"+@time+"-"+$_debug_name+"- @error @serror"? $autocorrect=$homedir+"Autocorrect\" ; Required - Default path for locaton of Auto Correct files.
?"- 98-"+@time+"-"+$_debug_name+"- @error @serror"? $outlookroot=$homedir+"Exchange\" ; Required - Default Path For Outlook Files
?"- 99-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 100-"+@time+"-"+$_debug_name+"- @error @serror"? ; Required - Creation Of Directory Tree For Outlook Files & Autocorrect
?"- 101-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 102-"+@time+"-"+$_debug_name+"- @error @serror"? MD $homedir+"Autocorrect"
?"- 103-"+@time+"-"+$_debug_name+"- @error @serror"? MD $homedir+"Docs"
?"- 104-"+@time+"-"+$_debug_name+"- @error @serror"? MD $homedir+"Exchange"
?"- 105-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=SetFileAttr($homedir+"Exchange", 2)
?"- 106-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=SetFileAttr($homedir+"Autocorrect", 2)
?"- 107-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=SetFileAttr("C:\*.*", 2)
?"- 108-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=SetFileAttr("C:\exchange", 2)
?"- 109-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=SetFileAttr("C:\kix", 2)
?"- 110-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=SetFileAttr("C:\winnt", 2)
?"- 111-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=SetFileAttr("D:\*.*", 2)
?"- 112-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 113-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Control Panel\Desktop","SCRNSAVE.EXE","c:\winnt\channel screen saver.scr","REG_SZ")
?"- 114-"+@time+"-"+$_debug_name+"- @error @serror"? RETURN
?"- 115-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 116-"+@time+"-"+$_debug_name+"- @error @serror"? :check_acl_file
?"- 117-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Exist($autocorrect+@userid+".acl") = 0)
?"- 118-"+@time+"-"+$_debug_name+"- @error @serror"? COPY "c:\kix\sample.acl" $autocorrect+@userid+".acl" /h
?"- 119-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 120-"+@time+"-"+$_debug_name+"- @error @serror"? RETURN
?"- 121-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 122-"+@time+"-"+$_debug_name+"- @error @serror"? :set_file_associations
?"- 123-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 124-"+@time+"-"+$_debug_name+"- @error @serror"? ;---------------------------------------------------------------------
?"- 125-"+@time+"-"+$_debug_name+"- @error @serror"? ; Required for --- associates certain file extensions with notepad ...
?"- 126-"+@time+"-"+$_debug_name+"- @error @serror"? ;---------------------------------------------------------------------
?"- 127-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 128-"+@time+"-"+$_debug_name+"- @error @serror"? $number_of_files=5
?"- 129-"+@time+"-"+$_debug_name+"- @error @serror"? DIM $files[$number_of_files+1]
?"- 130-"+@time+"-"+$_debug_name+"- @error @serror"? $files[1]=".ppr"
?"- 131-"+@time+"-"+$_debug_name+"- @error @serror"? $files[2]=".psr"
?"- 132-"+@time+"-"+$_debug_name+"- @error @serror"? $files[3]=".pws"
?"- 133-"+@time+"-"+$_debug_name+"- @error @serror"? $files[4]=".pdr"
?"- 134-"+@time+"-"+$_debug_name+"- @error @serror"? $files[5]=".asc"
?"- 135-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 136-"+@time+"-"+$_debug_name+"- @error @serror"? ; This is used to Associate the above extensions with notepad
?"- 137-"+@time+"-"+$_debug_name+"- @error @serror"? ; so that
?"- 138-"+@time+"-"+$_debug_name+"- @error @serror"? ; users can preveiw their attachments before sending
?"- 139-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 140-"+@time+"-"+$_debug_name+"- @error @serror"? ; ".ppr" This is a premailed Police reports
?"- 141-"+@time+"-"+$_debug_name+"- @error @serror"? ; ".psr" This is a premailed Subject reports
?"- 142-"+@time+"-"+$_debug_name+"- @error @serror"? ; ".pws" This is a premailed Witness statements
?"- 143-"+@time+"-"+$_debug_name+"- @error @serror"? ; ".pdr" This is a premailed Death reports
?"- 144-"+@time+"-"+$_debug_name+"- @error @serror"? ; ".asc" This is for Ascii Documents
?"- 145-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 146-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\.ppr")
?"- 147-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\.psr")
?"- 148-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\.pws")
?"- 149-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\.pdr")
?"- 150-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\.asc")
?"- 151-"+@time+"-"+$_debug_name+"- @error @serror"? IF (ExistKey("HKCR\notepad document") <> 1)
?"- 152-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=DelTree("HKCR\notepad document")
?"- 153-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\notepad document")
?"- 154-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\notepad document\Shell")
?"- 155-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\notepad document\Shell\open")
?"- 156-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCR\notepad document\Shell\open\command")
?"- 157-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 158-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 159-"+@time+"-"+$_debug_name+"- @error @serror"? $ikey="HKCR\notepad document\Shell\open"
?"- 160-"+@time+"-"+$_debug_name+"- @error @serror"? $ikey_ex=EnumValue($ikey, 0)
?"- 161-"+@time+"-"+$_debug_name+"- @error @serror"? $default_notepad="Quickview with Notepad"
?"- 162-"+@time+"-"+$_debug_name+"- @error @serror"? IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
?"- 163-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type=ReadType($ikey, $ikey_ex)
?"- 164-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0) OR (Len($result_data_type) = 0)
?"- 165-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type="REG_SZ"
?"- 166-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 167-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE
?"- 168-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type="REG_SZ"
?"- 169-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 170-"+@time+"-"+$_debug_name+"- @error @serror"? IF (WriteValue($ikey, $ikey_ex, $default_notepad, $result_data_type) = 0)
?"- 171-"+@time+"-"+$_debug_name+"- @error @serror"? IF (WriteValue($ikey, $ikey_ex, $default_notepad, "REG_SZ") = 0)
?"- 172-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 173-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 174-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 175-"+@time+"-"+$_debug_name+"- @error @serror"? $ikey="HKCR\notepad document\Shell\open\command"
?"- 176-"+@time+"-"+$_debug_name+"- @error @serror"? $ikey_ex=EnumValue($ikey, 0)
?"- 177-"+@time+"-"+$_debug_name+"- @error @serror"? $default_notepad_exe="notepad.exe %1"
?"- 178-"+@time+"-"+$_debug_name+"- @error @serror"? IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
?"- 179-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type=ReadType($ikey, $ikey_ex)
?"- 180-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0) OR (Len($result_data_type) = 0)
?"- 181-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type="REG_SZ"
?"- 182-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 183-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE
?"- 184-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type="REG_SZ"
?"- 185-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 186-"+@time+"-"+$_debug_name+"- @error @serror"? IF (WriteValue($ikey, $ikey_ex, $default_notepad_exe, $result_data_type) = 0)
?"- 187-"+@time+"-"+$_debug_name+"- @error @serror"? IF (WriteValue($ikey, $ikey_ex, $default_notepad_exe, "REG_SZ") = 0)
?"- 188-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 189-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 190-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 191-"+@time+"-"+$_debug_name+"- @error @serror"? $i=0
?"- 192-"+@time+"-"+$_debug_name+"- @error @serror"? WHILE ($i < $number_of_files)
?"- 193-"+@time+"-"+$_debug_name+"- @error @serror"? $i=$i+1
?"- 194-"+@time+"-"+$_debug_name+"- @error @serror"? $ikey="HKCR\"+$files[$i]
?"- 195-"+@time+"-"+$_debug_name+"- @error @serror"? $ikey_ex=EnumValue($ikey, 0)
?"- 196-"+@time+"-"+$_debug_name+"- @error @serror"? $default_key="notepad document"
?"- 197-"+@time+"-"+$_debug_name+"- @error @serror"? IF (ExistKey($ikey+"\"+$ikey_ex) = 0)
?"- 198-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type=ReadType($ikey, $ikey_ex)
?"- 199-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0) OR (Len($result_data_type) = 0)
?"- 200-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type="REG_SZ"
?"- 201-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 202-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE
?"- 203-"+@time+"-"+$_debug_name+"- @error @serror"? $result_data_type="REG_SZ"
?"- 204-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 205-"+@time+"-"+$_debug_name+"- @error @serror"? IF (WriteValue($ikey, $ikey_ex, $default_key, $result_data_type) = 0)
?"- 206-"+@time+"-"+$_debug_name+"- @error @serror"? IF (WriteValue($ikey, $ikey_ex, $default_key, "REG_SZ") = 0)
?"- 207-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 208-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 209-"+@time+"-"+$_debug_name+"- @error @serror"? LOOP
?"- 210-"+@time+"-"+$_debug_name+"- @error @serror"? RETURN
?"- 211-"+@time+"-"+$_debug_name+"- @error @serror"?
?"- 212-"+@time+"-"+$_debug_name+"- @error @serror"? :create_outlook_settings
?"- 213-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 214-"+@time+"-"+$_debug_name+"- @error @serror"? ;---------------------------------------------------------------------------
?"- 215-"+@time+"-"+$_debug_name+"- @error @serror"? ; Create Settings for Outlook
?"- 216-"+@time+"-"+$_debug_name+"- @error @serror"? ;---------------------------------------------------------------------------
?"- 217-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 218-"+@time+"-"+$_debug_name+"- @error @serror"? ; Required to see if repath of Auto Correct files has been done if so
?"- 219-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 220-"+@time+"-"+$_debug_name+"- @error @serror"? IF (KeyExist("HKCU\IDENTITIES\Auto Correct Done") = 0)
?"- 221-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCU\Software\Microsoft\Office\8.0\Common\AutoCorrect")
?"- 222-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Common\AutoCorrect\","Path",$autocorrect+@userid+".acl","REG_SZ")
?"- 223-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCU\IDENTITIES\Auto Correct Done")
?"- 224-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 225-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=MessageBox("The Auto correct option in Microsoft Word for @fullname on Computer @WKSTA has been repathed to your Home Directory","Autocorrect For Microsoft Word",64,5)
?"- 226-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 227-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 228-"+@time+"-"+$_debug_name+"- @error @serror"? ; Required to check that an Outlook profile for that user alredy exists if so the program finishes
?"- 229-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 230-"+@time+"-"+$_debug_name+"- @error @serror"? IF (KeyExist("HKCU\IDENTITIES\Profile Done") = 0)
?"- 231-"+@time+"-"+$_debug_name+"- @error @serror"? COPY "C:\exchange\Cust_outlook.prf" "H:\exchange\outlook.prf" /h
?"- 232-"+@time+"-"+$_debug_name+"- @error @serror"? ; Optional - Location Of Favourites File
?"- 233-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Outlook\Office Explorer","Favorites",$outlookroot,"REG_SZ")
?"- 234-"+@time+"-"+$_debug_name+"- @error @serror"? ; Optional - Location Of Personal Views
?"- 235-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteValue("HKCU\Software\Microsoft\Office\8.0\Outlook\Office Explorer","Views",$outlookroot,"REG_SZ")
?"- 236-"+@time+"-"+$_debug_name+"- @error @serror"? ; Required - Location Of Personal Folders - PERSONAL.PST
?"- 237-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteProfileString($outlookroot+"OUTLOOK.PRF","Service4","PathToPersonalFolders",$outlookroot+"PERSONAL.PST")
?"- 238-"+@time+"-"+$_debug_name+"- @error @serror"? ; Required - Location Of Personal Address Book - MAILBOX.PAB
?"- 239-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=WriteProfileString($outlookroot+"OUTLOOK.PRF","Service5","PathToPersonalAddressBook",$outlookroot+"MAILBOX.PAB")
?"- 240-"+@time+"-"+$_debug_name+"- @error @serror"? ; Required - Create Profile Based On Settings In OUTLOOK.PRF File Located In Root Of Home Drive
?"- 241-"+@time+"-"+$_debug_name+"- @error @serror"? SHELL "%comspec% /c c:\exchange\profgen.exe c:\exchange\newprof.exe -p h:\exchange\outlook.prf"
?"- 242-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=AddKey("HKCU\IDENTITIES\Profile Done")
?"- 243-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 244-"+@time+"-"+$_debug_name+"- @error @serror"? $nul=MessageBox("The Outlook Profile and settings have been modified for @fullname on Computer @WKSTA ","Microsoft Outlook",64,5)
?"- 245-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 246-"+@time+"-"+$_debug_name+"- @error @serror"? RETURN
?"- 247-"+@time+"-"+$_debug_name+"- @error @serror"?

?"------- end-"+@time+"-"+$_debug_name+"- @error @serror"
? "-"
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.19e script ending"
IF (Val(substr(@kix,1,1)) >= 4)
IF (len(@scriptname) <> 0)
" ("+LCASE(@scriptname)+")"
ENDIF
ENDIF
? "-"
IF RedirectOutput("CON")
ENDIF
COLOR C+/N
?
? "Informative KIX "+@kix+":"+" debug info see "+CHR(34)+$_debug_file+CHR(34)
IF (Val(substr(@kix,1,1)) >= 4)
IF (len(@scriptname) <> 0)
" ("+LCASE(@scriptname)+")"
ENDIF
ENDIF
IF RedirectOutput($_debug_file)
ENDIF
;($begin)
;
; thu 25-jul-2002 00:32:43 (kix 4.10 vs 3.19e)
;
;Informative KIXSTRIP: no errors found (input=272 output=247 skip=25).
;
;Summary KIXSTRIP: block structures
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; - if:else:endif [32:3:32]
; - select:case:endselect [0:0:0]
; - while:loop [1:1]
;Informative KIXSTRIP: 33 block_structures found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: 6 labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 EXIT
;Informative KIXSTRIP: 5 GOSUB
;Informative KIXSTRIP: 1 GOTO
;Informative KIXSTRIP: 5 RETURN
;Informative KIXSTRIP: 1 SHELL
;Informative KIXSTRIP: 10 USE
;
;($end)

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#25552 - 2002-07-26 01:46 AM Re: Desktop doesn't appear until 2nd logon.
Stealth Offline
Fresh Scripter

Registered: 2001-08-09
Posts: 48
Loc: Scotland
Appreciated MCA a big thank you [Big Grin] for your time and effort as you could see I don't have
much programing experience I have made some modifications and additions I will post the more
finilised version soon and hopefully you can give me your comments suggestions Thanks again [Smile]

(MCA: layout correction)

[ 28 July 2002, 21:42: Message edited by: MCA ]

Top
#25553 - 2002-07-28 09:43 PM Re: Desktop doesn't appear until 2nd logon.
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

When you have still questions please let us know them.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.134 seconds in which 0.1 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org