Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


set wallpaper when login to the window 2000 server bu using the VB script

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,32283
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> set wallpaper when login to the window 2000 server bu using the VB script
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 set wallpaper when login to the window 2000 server bu u... - 3/14/2006 7:34:46 PM   
  derek

 

Posts: 46
Score: 0
Joined: 10/22/2005
Status: offline
Hi,

Can anyone point me to a utility that can set the ScreenSaver on logon.
Forget about Group Policy I know that is the best way to achieve this - but
its not relevant for my needs.
I can create a regedit file to point to change the registry settings to
select the required ScreenSaver but that is not effective unless it gets SET
into the current profile.

I just need a utility that I can put in Startup folder or logn script that
sets the Screensaver.

Derek
 
 
Post #: 1
 
 RE: set wallpaper when login to the window 2000 server ... - 3/14/2006 7:36:07 PM   
  derek

 

Posts: 46
Score: 0
Joined: 10/22/2005
Status: offline
Wrong post for the first.........

Hi,

Can anyone point me to a utility that can set the Wallpaper on logon.
Forget about Group Policy I know that is the best way to achieve this - but
its not relevant for my needs.
I can create a regedit file to point to change the registry settings to
select the required ScreenSaver but that is not effective unless it gets SET
into the current profile.

I just need a utility that I can put in Startup folder or logn script that
sets the Screensaver.

Derek

(in reply to derek)
 
 
Post #: 2
 
 RE: set wallpaper when login to the window 2000 server ... - 3/14/2006 8:54:45 PM   
  rOOs


Posts: 63
Score: 0
Joined: 2/28/2006
From: Switzerland
Status: offline
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21470879.html

"i will use google the next time before i post a question" :-)))

(in reply to derek)
 
 
Post #: 3
 
 RE: set wallpaper when login to the window 2000 server ... - 3/15/2006 6:41:23 PM   
  derek

 

Posts: 46
Score: 0
Joined: 10/22/2005
Status: offline
Thank you....
the script can run successful putting it to the startup when login..
However, I need to set the wallpaper for all users. The vbscript can only run for the admin account. For the user account, it can not run it as they do not have the right to set the register. Can anyone help me?

(in reply to rOOs)
 
 
Post #: 4
 
 RE: set wallpaper when login to the window 2000 server ... - 3/15/2006 6:55:25 PM   
  rOOs


Posts: 63
Score: 0
Joined: 2/28/2006
From: Switzerland
Status: offline
oops, sorry..

with "all users" you mean the wallpaper that it shows before logon?
or do you mean for every user that is loggin onto this machine? (then maybe put a script in alluser-autostart that runs when user logon)

(in reply to derek)
 
 
Post #: 5
 
 RE: set wallpaper when login to the window 2000 server ... - 3/15/2006 8:20:32 PM   
  derek

 

Posts: 46
Score: 0
Joined: 10/22/2005
Status: offline
After login the Desktop for all user, I need to set all the same wallpaper.
I put the VBscript in the following path C:\Documents and Settings\All Users\Start Menu\Programs\Startup
The admin account can the script while the user account can not run it.....
Any support? 

(in reply to rOOs)
 
 
Post #: 6
 
 RE: set wallpaper when login to the window 2000 server ... - 3/15/2006 11:31:35 PM   
  Cybex


Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
If I am not mistaken an actual "Logon Script" runs under a little different permissions than a VBScript in the Start Up folder would.  I think a logon script can set these type of settings.  Why are you doing it this way versus an actual logon script?  If you must do it this way I think you are going to have to supply alternate credentials to obtain the necessary permission to do what you are trying.


Cybex

_____________________________

Common sense is not so common.

(in reply to derek)
 
 
Post #: 7
 
 RE: set wallpaper when login to the window 2000 server ... - 3/19/2006 8:45:32 PM   
  derek

 

Posts: 46
Score: 0
Joined: 10/22/2005
Status: offline
any hints to write a  logon script.........
Please help!!!!!! 

(in reply to Cybex)
 
 
Post #: 8
 
 RE: set wallpaper when login to the window 2000 server ... - 3/20/2006 2:28:52 AM   
  ebgreen


Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
I think to get some help you will need to do something of a reset here. Please concisely explain:

-What it is you are trying to accomplish.
-What you have tried so far.
-Why it did not work.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to derek)
 
 
Post #: 9
 
 RE: set wallpaper when login to the window 2000 server ... - 3/20/2006 12:21:35 PM   
  derek

 

Posts: 46
Score: 0
Joined: 10/22/2005
Status: offline
-What it is you are trying to accomplish?
when user login to the server(using the terminal servies) , I want them to see the same wallpaper(that means show the name and ip of the server).

-What you have tried so far?
I have written a VBscript to set the wallpaper by changing the register value when the user login. I put it in the startup.

-Why it did not work?
The VBscript can run successfully for certain account. For the account that do not have much right. The VBscirpt can not set the register when the user login and prompt the error message(Loading script "C:\Documents and Settings\All User\Start Menu\Programs\Startup\wallpaper_new.vbs" failed, Access is denied.)

The VBscript..............

dim wshShell
dim sUserName
Set wshShell = WScript.CreateObject("WScript.Shell")
sUserName = wshShell.ExpandEnvironmentStrings("%USERNAME%")
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
sWinDir = oFSO.GetSpecialFolder(0)
'sWallPaper = "D:\My Documents\DownLoad\" & sUserName & " - bkg.jpg"
sWallPaper = "C:\WINNT\Sample.bmp"
' update in registry
oShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", sWallPaper
' let the system know about the change
oShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True

(in reply to derek)
 
 
Post #: 10
 
 RE: set wallpaper when login to the window 2000 server ... - 3/20/2006 1:39:38 PM   
  Cybex


Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
Are you putting the file.vbs in the startup folder in the all users folder or are you running the script from a logon server as a true logon script?


Cybex

_____________________________

Common sense is not so common.

(in reply to derek)
 
 
Post #: 11
 
 RE: set wallpaper when login to the window 2000 server ... - 3/20/2006 2:01:05 PM   
  derek

 

Posts: 46
Score: 0
Joined: 10/22/2005
Status: offline
Yes...I have put the vbs in the startup folder in the all user folder

(in reply to Cybex)
 
 
Post #: 12
 
 RE: set wallpaper when login to the window 2000 server ... - 3/20/2006 2:48:53 PM   
  Cybex


Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
That is why it fails to run properly while end users logon.  Any application or script in the all users or an individual users "Startup Folder" runs via the permissions of the user that is logging on.  Meaning unless the user has permission to alter the registry then they will not be able to change the registry data you need to in order to accomplish what it is you are trying to do. 

Are you operating in an actual domain environment or a workgroup environment?  When you say "user login to the server(using the terminal services)" I get nervous... Why would a non-admin or "user" be logging onto a server?  I will more forward under the assumption that you are referring to a Citrix like, application mode, Terminal Services setup.  Due to this I will also assume you have AD setup in a true domain environment.  If so, stop putting scripts in the all users folder!  Put your script on the logon server and under the user profiles point their logon script to the logon server share that has your script.  Have a user logon and the script should run prior to the user having fully logged on and the settings get changed.  After it runs and the settings are changed the user is logged on and still does not have rights to change the registry data. 

Google the process of setting up logon scripts if you have any more questions.  If you have VBScript questions post them here.


Cybex

_____________________________

Common sense is not so common.

(in reply to derek)
 
 
Post #: 13
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> set wallpaper when login to the window 2000 server bu using the VB script Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts