Page 1 of 3 123>
Topic Options
#45542 - 2003-09-18 08:58 PM Icons don't get copied
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
We have been using a Kixtart script to build the user’s Desktop and setup the user’s environment settings, map drives, etc. in a Citrix environment. I decided to use this same script on another set of MetaFrame servers and the script does not copy icons to the users Start/Program folder at logon. But, if I run the script from a command prompt it works just fine. The problem seems to exists only at logon, because as I said, I can run it from a command prompt and it works just fine. The only difference with the two sets of Citrix servers is that the first set - which we have been using for over a year - were upgraded from WinFrame to MetaFrame and the second set were setup from scratch as MetaFrame servers. I have verified registry and file/folder permission are the same on both sets of servers and cannot figure out what the problem is. Any ideas from anyone?
Top
#45543 - 2003-09-18 09:19 PM Re: Icons don't get copied
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
So.. You are giving the clients a desktop in Citrix? These are not published applications?

Shortcuts generally come in two flavors - .LNK and .URL. They are a Link and Web link, respectively.

There are a couple of Shortcut creation UDFs that do this. But, I question that with published applications as they will put the shortcut to the Citrix App to the client desktop..

Thanks,

Kent

[ 18. September 2003, 21:19: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#45544 - 2003-09-18 10:04 PM Re: Icons don't get copied
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
Most of our users are thin clients and even our fat clients use a Citrix client to access a Desktop at full screen with no access back to their Windows Desktop. We then feed then icons (*.lnk or *.url) based on group membership. Out of 200+ icons only 1% are published apps.

But the thing that is driving me crazy is that the script works outside of running at logon. I have worked on this problem off and on for the past two weeks, before posting to this web site. Just don’t know what else to look for.

Top
#45545 - 2003-09-18 10:07 PM Re: Icons don't get copied
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hmmm, we do a similiar kinda thing here, are you copying the shortcuts using the copy statement/command if so, is @ERROR being set to anything meaningfull ?

[ 18. September 2003, 22:07: Message edited by: Shawn ]

Top
#45546 - 2003-09-18 10:18 PM Re: Icons don't get copied
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Rather than guessing what you are trying to do, can you post your script?

This maybe helpful for you -

Locations of Desktop, Start Menu, etc.

There are some other good info at -
KiXtart FAQ & How to's

HTH,

Kent

[ 18. September 2003, 22:18: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#45547 - 2003-09-18 10:25 PM Re: Icons don't get copied
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
The following is the command I am using:

shell 'cmd /c xcopy "$CompanyApps\Common\*.lnk" "$Programs_Folder" >nul 2>&1'

with $CompanyApps being defined earlier in the script as a share on our LOGONSERVER and $Programs_folder being defined as “%USERPROFILE%\Start Menu\Programs”. Originally I was using a copy and then switched to xcopy to see if it would make a difference. I even removed the >nul and the script showed it had copied x number of icons. Yet when you click on Start/Programs there are no icons.

Top
#45548 - 2003-09-18 10:29 PM Re: Icons don't get copied
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3164
Loc: Houston TX
I have seen things like this if the NTFS rights are not correct.
Top
#45549 - 2003-09-18 10:32 PM Re: Icons don't get copied
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Why not use -

code:
COPY $CompanyApps+'\Common\*.lnk' $Programs_Folder

?

Thanks,

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

Top
#45550 - 2003-09-19 04:35 PM Re: Icons don't get copied
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
Sorry, I didn’t have a chance to respond yesterday; at 5 I had already put in my 12 hours, so I left. But, I have modified the logon script replacing all the “shell 'cmd /c xcopy”s to just “Copy” and again the script works great outside the logon process, but you guessed it. At logon only the icons to the Desktop get copied, those copied to the Start/Programs get a return code of 0, but no icons.
Top
#45551 - 2003-09-19 05:13 PM Re: Icons don't get copied
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Check these keys, do they look ok ?

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

and

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

check the Programs value to see if its being monkeyed with through policies or GPO's ...

-Shawn

Top
#45552 - 2003-09-19 05:21 PM Re: Icons don't get copied
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It sound like a "sequents of events" thingy. Citrix boxes have a specific order of operations. From my own cribnotes...

quote:
Logon and Application Compatibility Scripts

After successfully negotiating the MSGINA, the logon script sequence is as follows:

The Domain logon script as governed by the User Environment Profile
The NetWare login script if present
The WTS logon script 'C:\WINNT\system32\usrlogon.cmd'
as governed by the registry key 'AppSetup'
in 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon'
All other scripts are called in turn from within usrlogon.cmd, Usrlogn1.cmd, Usrlogn2.cmd, and those in C:\WINNT\Application Compatibility Scripts\ or sub-folders beneath.

It is possible to assign logon and/or logoff scripts from within Group Policies, both Local and AD based.

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#45553 - 2003-09-19 06:09 PM Re: Icons don't get copied
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
Shawn, this is one of the things our script does at the beginning of the script; to setup the location of the “User Shell Folders” and the “Shell Folders”.

LLigetfa, we are running/calling our kix script from within the UsrLogon.cmd file and it works/has been working for over a year on our first set of server; the ones that were upgraded from WinFrame.

Top
#45554 - 2003-09-19 06:35 PM Re: Icons don't get copied
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Can we see those lines, and what they are being set to ?
Top
#45555 - 2003-09-19 07:56 PM Re: Icons don't get copied
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
Here she be:

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"
;
:FixShellFolderPaths
;*******************
if "$Verbose" = "Yes"
? "Fix shell folder paths" + $NL
endif
;
; Update Shell Folder path registry values
$Folders_Key ="$ShellFolders_Key"
$Value_Type = "REG_SZ"
gosub WriteShellFolderPaths
;
; Update User Shell Folder path registry values
$Folders_Key ="$UserShellFolders_Key"
$Value_Type = "REG_EXPAND_SZ"
gosub WriteShellFolderPaths
return
;
:WriteShellFolderPaths
;*********************
;
; Overwrite Shell Folder Path Registry Values
$R1 = writevalue("$Folders_Key", "AppData", "$AppData_Folder", "$Value_Type")
$R2 = writevalue("$Folders_Key", "Cache", "$Cache_Folder", "$Value_Type")
$R3 = writevalue("$Folders_Key", "Cookies", "$Cookies_Folder", "$Value_Type")
$R4 = writevalue("$Folders_Key", "Desktop", "$Desktop_Folder", "$Value_Type")
$R5 = writevalue("$Folders_Key", "Favorites", "$Favorites_Folder", "$Value_Type")
$R6 = writevalue("$Folders_Key", "Fonts", "$Fonts_Folder", "$Value_Type")
$R7 = writevalue("$Folders_Key", "History", "$History_Folder", "$Value_Type")
$R8 = writevalue("$Folders_Key", "NetHood", "$NetHood_Folder", "$Value_Type")
$R9 = writevalue("$Folders_Key", "Personal", "$Personal_Folder", "$Value_Type")
$R10 = writevalue("$Folders_Key", "PrintHood", "$PrintHood_Folder", "$Value_Type")
$R11 = writevalue("$Folders_Key", "Programs", "$Programs_Folder", "$Value_Type")
$R12 = writevalue("$Folders_Key", "Recent", "$Recent_Folder", "$Value_Type")
$R13 = writevalue("$Folders_Key", "SendTo", "$SendTo_Folder", "$Value_Type")
$R14 = writevalue("$Folders_Key", "Start Menu", "$StartMenu_Folder", "$Value_Type")
$R15 = writevalue("$Folders_Key", "Startup", "$Startup_Folder", "$Value_Type")
$R16 = 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"
? "$CrLF" + "Error updating $Folders_Key, return code: $Ret" +"$NL"
? "The regsitry security permissions within your user profile may be incorrect."
? "Please report this problem to a system administrator."
endif
return
;


Top
#45556 - 2003-09-22 08:14 PM Re: Icons don't get copied
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
Shawn, I've posted the lines of script that create the User Shell Folders and the Shell Folders and haven't heard back from you. Have you had a chance to take a look at them? Anyone else see a problem with these lines?
Top
#45557 - 2003-09-22 08:31 PM Re: Icons don't get copied
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I did look at them, and to be honest, don't see anything wrong with them, I am at a dead-end, would suggest you go down Les's "ordering" path at this point, which I can't provide a lot of feedback on, dont run citrix here, will keep thinking on it though.
Top
#45558 - 2003-09-22 08:32 PM Re: Icons don't get copied
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
One thing though, dont know if you covered/answered this, but are the icons in the right place, and that they are just not visible. Or are the icons not getting copied at all ?
Top
#45559 - 2003-09-22 08:48 PM Re: Icons don't get copied
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Are the correct logon scripts running? Try putting in some display debug statements or write to debug logs so you trace exactly what is happening & not happening.
_________________________
Jack

Top
#45560 - 2003-09-22 08:56 PM Re: Icons don't get copied
operez Offline
Getting the hang of it

Registered: 2003-08-08
Posts: 75
If I remove the >nul at the end of the line, the copy statement shows on the screen that x number of files were copied, but nothing shows up in the %USERPROFILE%\Start Menu\Programs folder. If I run the script outside the logon process, from the run or a command line, the icons get copied.

????

Top
#45561 - 2003-09-22 09:05 PM Re: Icons don't get copied
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
If you replace the XCOPY /Q switch with the /F switch, do the source and target file paths look correct ?
Top
Page 1 of 3 123>


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

Who's Online
1 registered (adamlevine) and 165 anonymous users online.
Newest Members
katherinknul, phamthuy, xuantu075, skygreen2031, amelindaróe
17629 Registered Users

Generated in 0.045 seconds in which 0.016 seconds were spent on a total of 13 queries. Zlib compression enabled.

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