Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Script to use Computer Name from Registry as Marquee Value

Status
Not open for further replies.

appealdenied

Technical User
Sep 29, 2002
25
US
I have been searching for a way to do this for awhile and cannot seem to figure it out. What I am looking for is a script that can take the current machine name from the registry and do two things:

1) Convert the name into a data format readable by the Text field within the Marquee Display screensaver.

2) Use the machine name in a script that will display it on wallpaper on the desktop.

I know that these tasks can be easily be done by manually hand. However, these scripts will be part of a set of images where the machine name is generic.

TIA,
AD
"Life is like a purple antelope walking through a sea of dead tuna."
 
To get machine name, see my answer to this thread : thread329-492543. To add it to desktop wallpaper or sreen saver ... I'm stuck !!! Water is not bad as long as it stays out human body ;-)
 
Updating Screensaver with machine name -

1. Get the machine name as stated in Thread329-492543 - this returns a string.
2. Update the registry key HKEY_CUREENT_USER/Control Panel/Screen Saver.Marquee/Text with the machine name string gained from step 1. This can be done using wsh okay by doing a registry update. I have got this working ok.

Wallpaper - this is more interesting.

The only way I have got this working is not the greatest...

You will need a component to allow asp access to the registry - check or similar and have a webserver running on the machine that you want to display the name on the desktop on.

1. Turn on Active Desktop
2. Get the machine name as stated in Thread329-492543 - this returns a string.
3. Write an ASP/HTML to taste page with response.write machinename in it somewhere
4. Point the active desktop source to your webserver with the asp page on.
5. Put it in your bootup script to reference the background for the user.




I am sure I have a little exe application which puts the machine name in your toolbar somewhere...
 
you shouldnt need to do all the stuff with asp, an client side script in a basic html document will do the job for the wall paper... i think
 
I have actually gotten both of these to work (YAY ME!!!). For the first program, I am simply updating the registry upon each user's login by placing the script in the C:\...\All Users folder.

The second one is working but not as well as I would like it. I have this one as an .htm file used as a wallpaper and it is pulling the correct information. However, I get a prompt that says the ActiveX control on this page might be unsafe to interact with other parts of the page. I know I can probably set the IE security low enough to prevent this from appearing but that would be unacceptable from an IT standpoint. Any other suggestions as to how to prevent the message from appearing?

"Life is like a purple antelope walking through a sea of dead tuna."
 
can you add something to the safe list in IE, or trusted sites i think they call it
 
Actually, I consulted with a programmer and was told that I would have to get the file signed using some sort of certifying authority (Verisign, etc.). By this time it was more than I was willing to do for that script set.

The actual solution I used was to write a VB script at startup using WSH that wrote a Javascript file to be read by the .htm file used as a wallpaper. That way the .htm file does not have to access the local machine and throw the ActiveX prompt.


"Life is like a purple antelope walking through a sea of dead tuna."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top