Dear,

We have a idea what is going wrong. Only in your script we are missing the COPY part.
So for this part we can't write some debugging code.
About your script first a remark: $cr, $lf, $nl you are using during printing information on your
screen. it is enough to use ? for a newline.
Secondly it contains all kind of TAB characters which aren't directly visible. We transfer them in
our version into spaces.

In our version we add some debugging information to it. Also we remove the $rc? prefix
during WriteValue.
Our version
code:
 ; Global variables used in main program and subroutines
;
$cachedprofile = "%UserProfile%"
$cr = Chr(13)
$lf = Chr(10)
$nl = $cr+$lf
$homedir = "%HOMEDRIVE%%HOMEPATH%"
$logfile = "$HomeDir"+"logon.log"
$tempdir = "E:\Temp\@UserID"
$shellfolders_key = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
$usershellfolders_key = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
$userapprun_key = "HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
$fiaapps = "%LOGONSERVER%\FIAApps" ; FIAApps source directory (share on authenticating server)
$tempfile = $tempdir+"\UsrLogon.tmp"
;
; Define Profile Folder Paths
;
$appdata_folder = "$CachedProfile\Application Data"
$appsrv_folder = "$AppData_Folder\ICAClient"
$appsrv_src = "D:\Software\Client"
$cache_folder = "$CachedProfile\Temporary Internet Files"
$cookies_folder = "$CachedProfile\Cookies"
$desktop_folder = "$CachedProfile\Desktop"
$favorites_folder = "$CachedProfile\Favorites"
$fonts_folder = "%SystemRoot%\Fonts"
$history_folder = "$CachedProfile\History"
$nethood_folder = "$CachedProfile\NetHood"
$personal_folder = "H:\"
$printhood_folder = "$CachedProfile\PrintHood"
$programs_folder = "$CachedProfile\Start Menu\Programs"
$recent_folder = "$CachedProfile\Recent"
$sendto_folder = "$CachedProfile\SendTo"
$startmenu_folder = "$CachedProfile\Start Menu"
$startup_folder = "$CachedProfile\Start Menu\Programs\Startup"
$templates_folder = "$HomeDir"+"Winword\Template"
;
; - debugging info -
;
? "cachedprofile = " "%UserProfile%"
? "homedir = " "%HOMEDRIVE%%HOMEPATH%"
? "logfile = " "$HomeDir"+"logon.log"
? "tempdir = " "E:\Temp\@UserID"
? "shellfolders_key = " "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
? "usershellfolders_key = " "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
? "userapprun_key = " "HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
? "fiaapps = " "%LOGONSERVER%\FIAApps" ; FIAApps source directory (share on authenticating server)
? "tempfile = " $tempdir+"\UsrLogon.tmp"
; Define Profile Folder Paths
? "appdata_folder = " "$CachedProfile\Application Data"
? "appsrv_folder = " "$AppData_Folder\ICAClient"
? "appsrv_src = " "D:\Software\Client"
? "cache_folder = " "$CachedProfile\Temporary Internet Files"
? "cookies_folder = " "$CachedProfile\Cookies"
? "desktop_folder = " "$CachedProfile\Desktop"
? "favorites_folder = " "$CachedProfile\Favorites"
? "fonts_folder = " "%SystemRoot%\Fonts"
? "history_folder = " "$CachedProfile\History"
? "nethood_folder = " "$CachedProfile\NetHood"
? "personal_folder = " "H:\"
? "printhood_folder = " "$CachedProfile\PrintHood"
? "programs_folder = " "$CachedProfile\Start Menu\Programs"
? "recent_folder = " "$CachedProfile\Recent"
? "sendto_folder = " "$CachedProfile\SendTo"
? "startmenu_folder = " "$CachedProfile\Start Menu"
? "startup_folder = " "$CachedProfile\Start Menu\Programs\Startup"
? "templates_folder = " "$HomeDir"+"Winword\Template"
;
:fixshellfolderpaths
;*******************
;
IF "$Verbose" = "Yes"
? "Fix shell folder paths" ; <-----
ENDIF
;
; Update Shell Folder path registry values
$folders_key = "$ShellFolders_Key"
$value_type = "REG_SZ"
? "folders_key (shell folder) "+$folders_key
GOSUB writeshellfolderpaths
;
; Update User Shell Folder path registry values
$folders_key = "$UserShellFolders_Key"
$value_type = "REG_EXPAND_SZ"
? "folders_key (user shell folder) "+$folders_key
GOSUB writeshellfolderpaths
RETURN ; <-----
;
:writeshellfolderpaths
;*********************
;
; Overwrite Shell Folder Path Registry Values
;
WriteValue("$Folders_Key", "AppData", "$AppData_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Cache", "$Cache_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Cookies", "$Cookies_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Desktop", "$Desktop_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Favorites", "$Favorites_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Fonts", "$Fonts_Folder", "$Value_Type")
WriteValue("$Folders_Key", "History", "$History_Folder", "$Value_Type")
WriteValue("$Folders_Key", "NetHood", "$NetHood_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Personal", "$Personal_Folder", "$Value_Type")
WriteValue("$Folders_Key", "PrintHood", "$PrintHood_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Programs", "$Programs_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Recent", "$Recent_Folder", "$Value_Type")
WriteValue("$Folders_Key", "SendTo", "$SendTo_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Start Menu", "$StartMenu_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Startup", "$Startup_Folder", "$Value_Type")
WriteValue("$Folders_Key", "Templates", "$Templates_Folder", "$Value_Type")
;$ret = "$R1$R2$R3$R4$R5$R6$R7$R8$R9$R10$R11$R12$R13$R14$R15$R16"
;IF $ret <> "0000000000000000"
; ?
; ? "Error updating $Folders_Key, return code: $Ret" ; <-----
; ?
; ? "The regsitry security permissions within your user profile may be incorrect."
; ? "Please report this problem to a system administrator."
;ENDIF
RETURN

;($begin)
;
; mon 29-sep-2003 01:20:58 (kix 4.20 vs 4.00e)
;
;Informative KIXSTRIP: no errors found (input=117 output=117 skip=0).
;
;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 [1:0:1]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Informative KIXSTRIP: 1 block_structure found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: 2 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: 2 GOSUB
;Informative KIXSTRIP: 2 RETURN
;
;($end)

A simple run returns for the first part
code:
cachedprofile      = MCA
homedir =
logfile = logon.log
tempdir = E:\Temp\ADMINISTRATOR
shellfolders_key = HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
usershellfolders_key = HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
userapprun_key = HKCU\Software\Microsoft\Windows\CurrentVersion\Run
fiaapps = \FIAApps
tempfile = E:\Temp\ADMINISTRATOR\UsrLogon.tmp
appdata_folder = MCA\Application Data
appsrv_folder = MCA\Application Data\ICAClient
appsrv_src = D:\Software\Client
cache_folder = MCA\Temporary Internet Files
cookies_folder = MCA\Cookies
desktop_folder = MCA\Desktop
favorites_folder = MCA\Favorites
fonts_folder = \Fonts
history_folder = MCA\History
nethood_folder = MCA\NetHood
personal_folder = H:\
printhood_folder = MCA\PrintHood
programs_folder = MCA\Start Menu\Programs
recent_folder = MCA\Recent
sendto_folder = MCA\SendTo
startmenu_folder = MCA\Start Menu
startup_folder = MCA\Start Menu\Programs\Startup
templates_folder = Winword\Template

Also we add to same script some debugging code to it. We did it with
our tool kixstrip which you can find on out site.
Our debugging version:
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+"/4.00e 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"? ; Global variables used in main program and subroutines
?"- 2-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 3-"+@time+"-"+$_debug_name+"- @error @serror"? $cachedprofile = "%UserProfile%"
?"- 4-"+@time+"-"+$_debug_name+"- @error @serror"? $cr = Chr(13)
?"- 5-"+@time+"-"+$_debug_name+"- @error @serror"? $lf = Chr(10)
?"- 6-"+@time+"-"+$_debug_name+"- @error @serror"? $nl = $cr+$lf
?"- 7-"+@time+"-"+$_debug_name+"- @error @serror"? $homedir = "%HOMEDRIVE%%HOMEPATH%"
?"- 8-"+@time+"-"+$_debug_name+"- @error @serror"? $logfile = "$HomeDir"+"logon.log"
?"- 9-"+@time+"-"+$_debug_name+"- @error @serror"? $tempdir = "E:\Temp\@UserID"
?"- 10-"+@time+"-"+$_debug_name+"- @error @serror"? $shellfolders_key = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
?"- 11-"+@time+"-"+$_debug_name+"- @error @serror"? $usershellfolders_key = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
?"- 12-"+@time+"-"+$_debug_name+"- @error @serror"? $userapprun_key = "HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
?"- 13-"+@time+"-"+$_debug_name+"- @error @serror"? $fiaapps = "%LOGONSERVER%\FIAApps" ; FIAApps source directory (share on authenticating server)
?"- 14-"+@time+"-"+$_debug_name+"- @error @serror"? $tempfile = $tempdir+"\UsrLogon.tmp"
?"- 15-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 16-"+@time+"-"+$_debug_name+"- @error @serror"? ; Define Profile Folder Paths
?"- 17-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 18-"+@time+"-"+$_debug_name+"- @error @serror"? $appdata_folder = "$CachedProfile\Application Data"
?"- 19-"+@time+"-"+$_debug_name+"- @error @serror"? $appsrv_folder = "$AppData_Folder\ICAClient"
?"- 20-"+@time+"-"+$_debug_name+"- @error @serror"? $appsrv_src = "D:\Software\Client"
?"- 21-"+@time+"-"+$_debug_name+"- @error @serror"? $cache_folder = "$CachedProfile\Temporary Internet Files"
?"- 22-"+@time+"-"+$_debug_name+"- @error @serror"? $cookies_folder = "$CachedProfile\Cookies"
?"- 23-"+@time+"-"+$_debug_name+"- @error @serror"? $desktop_folder = "$CachedProfile\Desktop"
?"- 24-"+@time+"-"+$_debug_name+"- @error @serror"? $favorites_folder = "$CachedProfile\Favorites"
?"- 25-"+@time+"-"+$_debug_name+"- @error @serror"? $fonts_folder = "%SystemRoot%\Fonts"
?"- 26-"+@time+"-"+$_debug_name+"- @error @serror"? $history_folder = "$CachedProfile\History"
?"- 27-"+@time+"-"+$_debug_name+"- @error @serror"? $nethood_folder = "$CachedProfile\NetHood"
?"- 28-"+@time+"-"+$_debug_name+"- @error @serror"? $personal_folder = "H:\"
?"- 29-"+@time+"-"+$_debug_name+"- @error @serror"? $printhood_folder = "$CachedProfile\PrintHood"
?"- 30-"+@time+"-"+$_debug_name+"- @error @serror"? $programs_folder = "$CachedProfile\Start Menu\Programs"
?"- 31-"+@time+"-"+$_debug_name+"- @error @serror"? $recent_folder = "$CachedProfile\Recent"
?"- 32-"+@time+"-"+$_debug_name+"- @error @serror"? $sendto_folder = "$CachedProfile\SendTo"
?"- 33-"+@time+"-"+$_debug_name+"- @error @serror"? $startmenu_folder = "$CachedProfile\Start Menu"
?"- 34-"+@time+"-"+$_debug_name+"- @error @serror"? $startup_folder = "$CachedProfile\Start Menu\Programs\Startup"
?"- 35-"+@time+"-"+$_debug_name+"- @error @serror"? $templates_folder = "$HomeDir"+"Winword\Template"
?"- 36-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 37-"+@time+"-"+$_debug_name+"- @error @serror"? ; - debugging info -
?"- 38-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 39-"+@time+"-"+$_debug_name+"- @error @serror"? ? "cachedprofile = " "%UserProfile%"
?"- 40-"+@time+"-"+$_debug_name+"- @error @serror"? ? "homedir = " "%HOMEDRIVE%%HOMEPATH%"
?"- 41-"+@time+"-"+$_debug_name+"- @error @serror"? ? "logfile = " "$HomeDir"+"logon.log"
?"- 42-"+@time+"-"+$_debug_name+"- @error @serror"? ? "tempdir = " "E:\Temp\@UserID"
?"- 43-"+@time+"-"+$_debug_name+"- @error @serror"? ? "shellfolders_key = " "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
?"- 44-"+@time+"-"+$_debug_name+"- @error @serror"? ? "usershellfolders_key = " "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
?"- 45-"+@time+"-"+$_debug_name+"- @error @serror"? ? "userapprun_key = " "HKCU\Software\Microsoft\Windows\CurrentVersion\Run"
?"- 46-"+@time+"-"+$_debug_name+"- @error @serror"? ? "fiaapps = " "%LOGONSERVER%\FIAApps" ; FIAApps source directory (share on authenticating server)
?"- 47-"+@time+"-"+$_debug_name+"- @error @serror"? ? "tempfile = " $tempdir+"\UsrLogon.tmp"
?"- 48-"+@time+"-"+$_debug_name+"- @error @serror"? ; Define Profile Folder Paths
?"- 49-"+@time+"-"+$_debug_name+"- @error @serror"? ? "appdata_folder = " "$CachedProfile\Application Data"
?"- 50-"+@time+"-"+$_debug_name+"- @error @serror"? ? "appsrv_folder = " "$AppData_Folder\ICAClient"
?"- 51-"+@time+"-"+$_debug_name+"- @error @serror"? ? "appsrv_src = " "D:\Software\Client"
?"- 52-"+@time+"-"+$_debug_name+"- @error @serror"? ? "cache_folder = " "$CachedProfile\Temporary Internet Files"
?"- 53-"+@time+"-"+$_debug_name+"- @error @serror"? ? "cookies_folder = " "$CachedProfile\Cookies"
?"- 54-"+@time+"-"+$_debug_name+"- @error @serror"? ? "desktop_folder = " "$CachedProfile\Desktop"
?"- 55-"+@time+"-"+$_debug_name+"- @error @serror"? ? "favorites_folder = " "$CachedProfile\Favorites"
?"- 56-"+@time+"-"+$_debug_name+"- @error @serror"? ? "fonts_folder = " "%SystemRoot%\Fonts"
?"- 57-"+@time+"-"+$_debug_name+"- @error @serror"? ? "history_folder = " "$CachedProfile\History"
?"- 58-"+@time+"-"+$_debug_name+"- @error @serror"? ? "nethood_folder = " "$CachedProfile\NetHood"
?"- 59-"+@time+"-"+$_debug_name+"- @error @serror"? ? "personal_folder = " "H:\"
?"- 60-"+@time+"-"+$_debug_name+"- @error @serror"? ? "printhood_folder = " "$CachedProfile\PrintHood"
?"- 61-"+@time+"-"+$_debug_name+"- @error @serror"? ? "programs_folder = " "$CachedProfile\Start Menu\Programs"
?"- 62-"+@time+"-"+$_debug_name+"- @error @serror"? ? "recent_folder = " "$CachedProfile\Recent"
?"- 63-"+@time+"-"+$_debug_name+"- @error @serror"? ? "sendto_folder = " "$CachedProfile\SendTo"
?"- 64-"+@time+"-"+$_debug_name+"- @error @serror"? ? "startmenu_folder = " "$CachedProfile\Start Menu"
?"- 65-"+@time+"-"+$_debug_name+"- @error @serror"? ? "startup_folder = " "$CachedProfile\Start Menu\Programs\Startup"
?"- 66-"+@time+"-"+$_debug_name+"- @error @serror"? ? "templates_folder = " "$HomeDir"+"Winword\Template"
?"- 67-"+@time+"-"+$_debug_name+"- @error @serror"? ; EXIT ; for our test
?"- 68-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 69-"+@time+"-"+$_debug_name+"- @error @serror"? :fixshellfolderpaths
?"- 70-"+@time+"-"+$_debug_name+"- @error @serror"? ;*******************
?"- 71-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 72-"+@time+"-"+$_debug_name+"- @error @serror"? IF "$Verbose" = "Yes"
?"- 73-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Fix shell folder paths" ; <-----
?"- 74-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"- 75-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 76-"+@time+"-"+$_debug_name+"- @error @serror"? ; Update Shell Folder path registry values
?"- 77-"+@time+"-"+$_debug_name+"- @error @serror"? $folders_key = "$ShellFolders_Key"
?"- 78-"+@time+"-"+$_debug_name+"- @error @serror"? $value_type = "REG_SZ"
?"- 79-"+@time+"-"+$_debug_name+"- @error @serror"? ? "folders_key (shell folder) "+$folders_key
?"- 80-"+@time+"-"+$_debug_name+"- @error @serror"? GOSUB writeshellfolderpaths
?"- 81-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 82-"+@time+"-"+$_debug_name+"- @error @serror"? ; Update User Shell Folder path registry values
?"- 83-"+@time+"-"+$_debug_name+"- @error @serror"? $folders_key = "$UserShellFolders_Key"
?"- 84-"+@time+"-"+$_debug_name+"- @error @serror"? $value_type = "REG_EXPAND_SZ"
?"- 85-"+@time+"-"+$_debug_name+"- @error @serror"? ? "folders_key (user shell folder) "+$folders_key
?"- 86-"+@time+"-"+$_debug_name+"- @error @serror"? GOSUB writeshellfolderpaths
?"- 87-"+@time+"-"+$_debug_name+"- @error @serror"? RETURN ; <-----
?"- 88-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 89-"+@time+"-"+$_debug_name+"- @error @serror"? :writeshellfolderpaths
?"- 90-"+@time+"-"+$_debug_name+"- @error @serror"? ;*********************
?"- 91-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 92-"+@time+"-"+$_debug_name+"- @error @serror"? ; Overwrite Shell Folder Path Registry Values
?"- 93-"+@time+"-"+$_debug_name+"- @error @serror"? ;
?"- 94-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "AppData", "$AppData_Folder", "$Value_Type")
?"- 95-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Cache", "$Cache_Folder", "$Value_Type")
?"- 96-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Cookies", "$Cookies_Folder", "$Value_Type")
?"- 97-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Desktop", "$Desktop_Folder", "$Value_Type")
?"- 98-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Favorites", "$Favorites_Folder", "$Value_Type")
?"- 99-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Fonts", "$Fonts_Folder", "$Value_Type")
?"- 100-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "History", "$History_Folder", "$Value_Type")
?"- 101-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "NetHood", "$NetHood_Folder", "$Value_Type")
?"- 102-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Personal", "$Personal_Folder", "$Value_Type")
?"- 103-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "PrintHood", "$PrintHood_Folder", "$Value_Type")
?"- 104-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Programs", "$Programs_Folder", "$Value_Type")
?"- 105-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Recent", "$Recent_Folder", "$Value_Type")
?"- 106-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "SendTo", "$SendTo_Folder", "$Value_Type")
?"- 107-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Start Menu", "$StartMenu_Folder", "$Value_Type")
?"- 108-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Startup", "$Startup_Folder", "$Value_Type")
?"- 109-"+@time+"-"+$_debug_name+"- @error @serror"? WriteValue("$Folders_Key", "Templates", "$Templates_Folder", "$Value_Type")
?"- 110-"+@time+"-"+$_debug_name+"- @error @serror"? ;$ret = "$R1$R2$R3$R4$R5$R6$R7$R8$R9$R10$R11$R12$R13$R14$R15$R16"
?"- 111-"+@time+"-"+$_debug_name+"- @error @serror"? ;IF $ret <> "0000000000000000"
?"- 112-"+@time+"-"+$_debug_name+"- @error @serror"? ; ?
?"- 113-"+@time+"-"+$_debug_name+"- @error @serror"? ; ? "Error updating $Folders_Key, return code: $Ret" ; <-----
?"- 114-"+@time+"-"+$_debug_name+"- @error @serror"? ; ?
?"- 115-"+@time+"-"+$_debug_name+"- @error @serror"? ; ? "The regsitry security permissions within your user profile may be incorrect."
?"- 116-"+@time+"-"+$_debug_name+"- @error @serror"? ; ? "Please report this problem to a system administrator."
?"- 117-"+@time+"-"+$_debug_name+"- @error @serror"? ;ENDIF
?"- 118-"+@time+"-"+$_debug_name+"- @error @serror"? RETURN
?"- 119-"+@time+"-"+$_debug_name+"- @error @serror"?

?"------- end-"+@time+"-"+$_debug_name+"- @error @serror"
? "-"
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/4.00e 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)
;
; mon 29-sep-2003 01:24:19 (kix 4.20 vs 4.00e)
;
;Informative KIXSTRIP: no errors found (input=140 output=119 skip=21).
;
;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 [1:0:1]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Informative KIXSTRIP: 1 block_structure found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: 2 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: 2 GOSUB
;Informative KIXSTRIP: 2 RETURN
;
;($end)

The output of this version can be something like
code:
-monday 2003/09/29 01:24:33- kixtart 4.21/4.00e script starting (zx33)
-
-curdir: c:\my documents
-scriptdir: c:\my documents
-startdir: c:\windows
-
-userid: administrator/administrator
-user priv: guest
-version: inwin=2/dos=4.90/productsuite=0/producttype=Windows Me/csd=
-
-debug file: c:\temp\kixdebug.txt
-debug name: 20030929_012433.630_2095
-
----- start-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 1-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 2-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 3-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 4-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 5-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 6-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 7-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 8-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 9-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 10-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 11-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 12-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 13-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 14-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 15-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 16-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 17-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 18-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 19-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 20-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 21-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 22-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 23-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 24-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 25-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 26-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 27-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 28-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 29-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 30-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 31-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 32-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 33-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 34-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 35-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 36-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 37-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 38-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 39-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

cachedprofile = MCA
- 40-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

homedir =
- 41-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

logfile = logon.log
- 42-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

tempdir = E:\Temp\ADMINISTRATOR
- 43-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

shellfolders_key = HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
- 44-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

usershellfolders_key = HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
- 45-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

userapprun_key = HKCU\Software\Microsoft\Windows\CurrentVersion\Run
- 46-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

fiaapps = \FIAApps
- 47-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

tempfile = E:\Temp\ADMINISTRATOR\UsrLogon.tmp
- 48-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

- 49-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

appdata_folder = MCA\Application Data
- 50-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

appsrv_folder = MCA\Application Data\ICAClient
- 51-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

appsrv_src = D:\Software\Client
- 52-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

cache_folder = MCA\Temporary Internet Files
- 53-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

cookies_folder = MCA\Cookies
- 54-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

desktop_folder = MCA\Desktop
- 55-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

favorites_folder = MCA\Favorites
- 56-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

fonts_folder = \Fonts
- 57-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

history_folder = MCA\History
- 58-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

nethood_folder = MCA\NetHood
- 59-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

personal_folder = H:\
- 60-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

printhood_folder = MCA\PrintHood
- 61-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

programs_folder = MCA\Start Menu\Programs
- 62-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

recent_folder = MCA\Recent
- 63-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

sendto_folder = MCA\SendTo
- 64-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

startmenu_folder = MCA\Start Menu
- 65-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

startup_folder = MCA\Start Menu\Programs\Startup
- 66-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

templates_folder = Winword\Template
- 67-01:24:33-20030929_012433.630_2095 - 0 The operation completed successfully.

Please run second script and return the output of file %tmp%\kixdebug.txt to the board.
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