|
|
|||||||
Code: $sskey = "HKEY_CURRENT_USER\Control Panel\Desktop" First one: Works Second one: Do not work Third one: Works Fourth one: Do not work First one: It always turns the screensaver on. Second one: It never changes the time... The time stays as it was before I run the script. Third one: Always sets it to secure. Fourth one: If a screensaver already exist (i.e. screensaver not active) - It set the screensaver to what I wish. Why does it not work? Any suggestions? Must the values be deleted or something before I can change it? |
||||||||
|
|
|||||||
Check the return values of WriteValue() and the value of @ERROR and @SERROR after each call. You may well not have permission to write / create these keys. |
||||||||
|
|
|||||||
how you check that they don't work? if you just look in the GUI after the change, it shouldn't appear there before re-launching shell (as is done in logon). |
||||||||
|
|
|||||||
Quote: Have done that. It only returns a bunch 0's. Which I believe means it is working correctly. =) Quote: Not completly sure what you mean, but I go to the GUI of screensaverthingy, yes... Also re-launched that one. I also have the registery up. It shows the timeout has been changed, but not the screensaver.scr |
||||||||
|
|
|||||||
Strange.... Got the *.scr to work. But not the timeout. |
||||||||
|
|
|||||||
No, he doesn't mean the cpl thingie but relaunching the shell (Explorer.exe) |
||||||||
|
|
|||||||
PROBLEM SOLVED PROBLEM SOLVED PROBLEM SOLVED Thank you for your help. I loged out and loged in again and it worked. =) Thank you for your help. ,) |
||||||||
|
|
|||||||
ja, that's what I ment! |
||||||||
|
|
|||||||
This is a well-documented issue and can eb solved by e.g. using the following UDF: UpdateUserParameters() - updates per-user system parameters |
||||||||
|
|
|||||||
So if I understand this correct, if I put the UserUpdateParamter-code behind my code there, the user wont have to logoff and logon again for the screensaver to become "active"? Cool. Thanks. =) |
||||||||
|
|
|||||||
not only the function code (udf as linked by Jens), you must as well call the function ... Code:
|
||||||||
|
|
|||||||
Quote: That was me. However, I can not seem to get it to work. I am trying to get the example in that link to work. (With a different picture though) Does it matter what key you push to continue? Calling the function means just writing this, right? UpdateUserParameters() |
||||||||
|
|
|||||||
see above yeah, but normally, if you don't want to work with the returncodes of functions you 'silence' them with a dummy variable like $nul = function() |
||||||||
|
|
|||||||
So... Why does not this work? Code: writevalue('HKCU\Control Panel\Desktop\','Wallpaper','c:\pic.jpg','REG_SZ') It has perhaps something to do with the UDF-calling thingy, but I only got a bunch of errors. =P Remember I am a newbeginner in kiX'ing. =D |
||||||||
|
|
|||||||
what errors you got? |
||||||||
|
|
|||||||
Works perfectly for me (Hey, I like winnt.bmp ... NOT! ) What are the errors you get ? |
||||||||
|
|
|||||||
There is no errors. But I if I check out the Display page, it shows that the background image has been changed and everything, but the background-background is black... Strangly enough. Does it have to be *.bmp? Do I lack something in my code? |
||||||||
|
|
|||||||
does that bmp really exist ? |
||||||||
|
|
|||||||
Gentlemen... You are hereby entitled to calling me a "n00b". Why? Because, this was said: "does that bmp really exist ?" and I thought.... Does it really have to be a bmp. Guess what? It worked when I used a bmp-picture instead. Thank you again for helping me out. =) I really appreciate it. |
||||||||
|
|
|||||||
Oh yeah, it has to be really a bmp For example, if you choose a jpg to be your wallpaper (set it with your favorite browser or for instance ACDSee) and you don't have Active Desktop running it gets converted to like "Internet Explorer Wallpaper.bmp" before it is shown ... |
||||||||
|
|
|||||||
LOL Quote: You have to push the "ANY" key! |
||||||||
|
|
|||||||
Hehe. Well, I (somehow) managed to believe the keystroke would have something to do with something something. That it actually played a part of the whole thing. But apparantly not. =) I have done some testing. This is what I have figured out - So if someone knows it is wrong, please correct me. =) I have tried to update the following with the Updatethingy: ScreenSaveActive - Works ScreenSaverIsSecure - Works ScreenSaveTimeOut - Does not work SCRNSAVE.EXE - Works Wallpaper - Works |
||||||||
|
|
|||||||
Could the timeout you are setting be trumped by a domain policy which was already set? Try looking at the policies to see if the Local Setting is different than the Effective Setting. You may only be changing the local setting and the effective setting to say 10 min, but the effective setting which could be set via GP from the domain may still be set to 15 min. |
||||||||
|
|
|||||||
It work. But it wont work before you loged off and back on a couple of times. No Global GP. =) |
||||||||
|
|
|||||||
it might be that it's not updateble try this: run your script, kill explorer.exe and rerun it with taskmanager, did the setting change? that's the optimal "update all settings" way without relogging. |
||||||||
|
|
|||||||
Killed and revived.... Seems like it is not updatable. =\ Thanks. |
||||||||
|
|
|||||||
Quote: Sounds like Windows NT 4 to me ... is it ?? |
||||||||
|
|
|||||||
No. Win2000 and XP. |
||||||||
|
|
|||||||
that "does not make sense"... in english, this is something I haven't come accross too often. well, xp I could understand, but on w2k it should work just fine. |
||||||||
|
|
|||||||
I used to do what you are doing in my login script for both W2K and XP. I had no problems adjusting the timeout. I didn't use Jen's UpdateUserParameters UDF, but just a simple set command (I think they are doing similiar things, just differnt ways). Here's a link to a post similar to this: Applying Registry Settings You might try the set command, but if Jen's UDF is not working, the set probably won't help either. Code:
|