|
Hmmm... perhaps a little bit different coding style, but no obvious syntax errors. Try adding debug statements in your code to see if you're having errors.
On the remote machine, is the registry value being udpated correctly?
Why aren't you doing this via a GPO or NT Policy from the Server?
I find it difficult to understand why Companies or Admins at Companies find the need to force a specific screen saver or wallpaper on a user. If it has nothing to do with security who cares what wallpaper or screen saver a user runs.
Anyways.... try some debug statements and it should help you to track down the issue.
Also.. try adding this to all of your code at the top of the scripts
DIM $RC
$RC=SetOption('Explicit','On')
$RC=SetOption('NoVarsInStrings','On')
Also as part of your debug statements, make sure your calls to external files are actually loading and working correctly.
|