Page 1 of 1 1
Topic Options
#163517 - 2006-06-22 10:09 AM Problems while copying (BUG?)
Bjöppe Offline
Fresh Scripter

Registered: 2006-06-22
Posts: 6
I have a script that is copying loads of icons to the startmenu, but have run into a slight problem. The following is the offending snippet:

Code:

If InGroup("$_defdomain$grupp")
MD "$FPMENU\$flis\"
Copy "$FPIcons\$flis\" "$FPMENU\$flis\" /c /r /s
EndIf



Problem is that if there's a directory that contains, let's say for example two directories and 6 files, and the user do not have permission on the directories, but to the files (icons), it creates the first folder as a empty one and doesn't continue to copy the rest of the files (icons). Is that not what /c is supposed to do?

TIA.

Top
#163518 - 2006-06-22 10:55 AM Re: Problems while copying (BUG?)
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Hello and Welcome to the board.

What version of KiXtart are you using? Most of the older versions had problems with that. Not until 4.52 Beta 2 was most of it ironed out. Some was in 4.51 as I recall, but not fully till 4.52 I think.

Also might want to use this sort of code so you don't keep trying to create a folder that already exists.

Code:
If GetFileAttr($Folder) & 16
Exit 80
EndIf


Top
#163519 - 2006-06-22 11:06 AM Re: Problems while copying (BUG?)
Bjöppe Offline
Fresh Scripter

Registered: 2006-06-22
Posts: 6
Thank you, NTDOC -- Nice to be here!

I was using 4.51, but tried 4.52RC1 as per your suggestion. The same behaviour was still present, as to halting the copy-process when an assumed "PERMISSION DENIED" was encountered. I've tried to swap around the arguments and playing with the parameters, still no luck though

Folders will never be present, since the whole menu-tree is deleted before creating it on each logon / forced update. Nice tip tho, thank you! (I noticed I didn't have to create the directory first, copy will fix that for me, so that's one down in streamlining the process, now just to get it to work... )

Cheers!

Top
#163520 - 2006-06-22 12:55 PM Re: Problems while copying (BUG?)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
I still think there is a permission issue involved.
like, if user has no rights on some folder, he can't edit the subfolders or their files either if not explicitly given access.
_________________________
!

download KiXnet

Top
#163521 - 2006-06-22 02:45 PM Re: Problems while copying (BUG?)
Bjöppe Offline
Fresh Scripter

Registered: 2006-06-22
Posts: 6
Quote:

hmm...
I still there is a permission issue involved.
like, if user has no rights on some folder, he can't edit the subfolders or their files either if not explicitly given access.




Yes, the general idea is to not let them get certain icons/folders if they do not have permission to copy them, and to only copy the ones they are "able" to. This works great for, say, 259 of 260 applications. Some applications has addons/extensions that are only relevant to a small group of people, who do not need the extra clutter, hence, reading the manual, COPY with the parameter /c should happily skip these files/folders and only copy those it's able to. My problem is that the copyoperation STOPS after encountering the first folder it recieves 'permission denied' on.

Hope this clears things up abit futher.

Top
#163522 - 2006-06-22 05:36 PM Re: Problems while copying (BUG?)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh...
sounds like buggie boo.
anyone wishing to verify???
_________________________
!

download KiXnet

Top
#163523 - 2006-06-22 10:06 PM Re: Problems while copying (BUG?)
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Well instead of wild card copy you could either directly name and copy each and place debug code to see where the break down is, or put into a LOOP with debug output to see what is causing the issue for sure.

I'd love to help as I like this sort of debugging, but just have way too many other things on my plate I have to get done first.

Top
#163524 - 2006-06-27 10:13 AM Re: Problems while copying (BUG?)
Bjöppe Offline
Fresh Scripter

Registered: 2006-06-22
Posts: 6
Problem with putting "one on each line" is that there's something like 1500 .lnk files and copying them one by one was kindof problematic. I worked around the problem by doing just that, on the folders that had differentiated permissions depending on what extra applications/extensions the user would get.

Thanks for the input anyway.

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
0 registered and 1376 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.096 seconds in which 0.065 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