|
|
|||||||
I try to set the wallpaper on windows 2000 en XP clients with this code: $foto="foto.bmp" If NOT Exist ("c:\winnt\"+$foto) Copy @lserver+"\fotos\"+$foto "c:\winnt\"+$foto EndIf SetWallpaper ($foto,1) This doesn't work because the file doesn't get copied to the client, a permissions question. Can the setwallpaper() function only work if you have local admin rights? |
||||||||
|
|
|||||||
what happens when you try with this line instead : Copy @lserver+"\fotos\"+$foto "c:\winnt\" |
||||||||
|
|
|||||||
Hi Jochen, No use, problem is that I cannot write in clients Winnt directory. I tried, when logged in as a user, to browse to the file on the server and copy it in the Winnt directory which also fails. |
||||||||
|
|
|||||||
The wallpaper file does not have to be in the winnt folder. Put it somewhere else, for example C:\Program Files\ and set the wallpaper from there. To 'hide' it from the users, you could copy it to a path that is quite deep. W |
||||||||
|
|
|||||||
Yeah, that is probably best. Thanks |
||||||||
|
|
|||||||
This is a permissions problem, as by default, regular users are not allowed to write to %WINDIR%. I would copy the files via a central admin script to the clients. Code:
|
||||||||
|
|
|||||||
Thanks! So comnetview is a UDF. What is this and why are they not mentioned in the manual or function reference? |
||||||||
|
|
|||||||
See the FAQ Forum under How to write a UDF and How to use UDFs |
||||||||
|
|
|||||||
It seems that the server doesn't have rights in any map on the clients. I just can't copy the bitmap. This will also be a problem then with "addprinterconnection" when copying driver files. This brings me to another thing I cannot find an answer for: "When Windows NT connects to the printer, it may copy printer driver files to the local computer." If the drivers are not known to the clients and server OS where does it get the drivers from? Should you install the printer at least on the server, is that the idea? (I like to do it all without UDF's) Mark |
||||||||
|
|
|||||||
Please show the code you use to copy the file to the clients. I also assume you're referring to the ADDPRINTERCONNECTION() function? Please learn to provide precise and meaningful posts as described in ABC's of KiXtart board etiquette and message to new forum users . The print server needs to have print drivers for all operating systems installed that will make use of the print server. ADDPRINTERCONNECTION will then connect to the printer on the specified print server and download the appropriate printer driver. If no appropriate printer driver is available, an appropriate errro code will be returned. Code:
Why? UDFs are jsut custom extensions to the build-in KiXtart functions and enrich the functionality of KiXtart by providing more complex functionality. Please read the FAQ Forum for more info on UDFs. |
||||||||
|
|
|||||||
No UDF's because its all extra handling, I just want an all-in standard login script I can use many times. Than I only need the file plus kix32.exe. Code fragment: $foto="test.bmp" If NOT Exist ("C:\test\test.bmp") Copy @lserver+"\users\software\"+$foto "C:\test\"+$foto EndIf SetWallpaper ("C:\test\"+$foto) ADDPRINTERCONNECTION("\\SERVER-17\HP") SetDefaultPrinter ("\\SERVER-17\HP5500") (First needs printer share, second printer name, also nice.) |
||||||||
|
|
|||||||
UDFs can be put into the main script as is expalined in the FAQ Forum. You should also capture function results into return variables in order to suppress console output, also explained in the FAQ forum. What is the error code of the failing script line? Put error checking in place to track it down, e.g.Code:
or use DEBUG ON. |
||||||||
|
|
|||||||
First, thanks for your very quick answers, great ! I found out that the permissions of both the source and destination directory are not sufficient. What is the best location for both so it won't be necessary to change permissions on all clients (by hand). |
||||||||
|
|
|||||||
Wall papers should go into that standard wallpaper directory, e.g. %WINDIR%\Web\Wallpaper. They should also be copied from the server to the clients via admin script, e.g. using COMNetView() to enumerate the clients, then looping through them and copying the files via admin shares into the appropriate directories. |
||||||||
|
|
|||||||
But you still need to change permissions of the wallpaper folder on the clients right? Setting permissions of the wallpaper folder on the server ok but I don't want to have to change anything on the clients. |
||||||||
|
|
|||||||
Quoting Jens, Quote: The ADMIN SCRIPT runs not in the logon script but from a server or admin wksta under an administrator's creds, therefore no special perms need be assigned. |
||||||||
|
|
|||||||
if this place requires admin rights, it's not the default place. |
||||||||
|
|
|||||||
Who can say what "Default" really is. The path Jens mentioned is just one of several locations Windows will look for it. It will also look in the %windir% folder as well as in the "My Documents"\"My Pictures" folder. |
||||||||
|
|
|||||||
that is what I ment. but, users can without any policies set their wallpaper and if the given folder does not allow it, I have hard time believing it's "the" default. maybe in wintosh 9x... |
||||||||
|
|
|||||||
I don't really get all this. There should be a place where you the server has permission to place a file, how about printer drivers (using addprinterconnection()), etc. |
||||||||
|
|
|||||||
what about it? printing system is service of the OS. if you want to have your own service, you must make it. if you want a place where everyone can read, I suggest you use netlogon-dir if you want place where everyone can write, try %userprofile% |
||||||||
|
|
|||||||
Quote: The server has nothing to do with it... it is all done by the client! Just because the KiX script is hosted on the server's NetLogon share does not mean the server has anything to do with it. The script runs on the client in the user's security context. It is the same for printer drivers. If users don't have rights to install the driver, it will fail. This is not a KiX limitation but rather your limitation. KiX does not elevate security context. To do that you need to deploy one of several methods explained in the FAQ forum. |