Solved

Install Screensaver and set options using command line / script

Posted on 2008-10-22
8
1,658 Views
Last Modified: 2013-12-04
hi eveyone

i am using sitekiosk software (http://www.sitekiosk.com/) to run a series of internet kiosks around the country. i have found a problem with them killing off monitors as they stay online so long, so want to setup a basic marquee screen saver on each machine.

i need to be able to use command lines or a script to do this as the user account in question is heavily locked by the software. it will draw instructions for the screen saver from this user account but you cannot gain access to it through any GUI while the account is locked. (it even hides the user account in the registry!!) The manufacturers suggest unlocking each terminal in turn making the changes and then locking them again. this is not a workable soloution for me as it would take WEEKS!

Does anyone know of the command line functions/ a script that would allow me to  configure and then activate this screen saver without having to do this manually.
The server side of this internet kiosk software allows me access to the machines and i can execute scripts or command line instructions. Please note that i would need to be able to run this with admin rights so will need any code that relates to that.


Many thanks in advance guys
0
Comment
Question by:phukitall
  • 3
  • 3
  • 2
8 Comments
 
LVL 28

Expert Comment

by:Bill Bach
ID: 22776624
Do you have remote registry access from the server?  If so, then a remote registry edit may be the best solution, especially if the user accounts are the same on each machine.  If not, then this option is out.
0
 

Author Comment

by:phukitall
ID: 22776758
looking for this option but dont seem to be able to use it, would still mean contacting each machine in turn and its this i trying to avoid as theres a few of them!  
i have the registy keys that i need taken from a test machine but cant find a way to squirt them into the remote systems.
cant be 100% sure all user accounts are the same - they should be but thats a large assumtion from my part.
0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 22777108
Will you be able to make the modifications and then log this user out and back in?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:phukitall
ID: 22777167
yes mods could be made and the system restarted all automatically i have done something similar to open ports in the windows firewall but for love or money cant find a way to do this.
 the server software is quite nice, it would log off the current user then run a script then restart the system, the problem here is how it seems to be loking down the user account i cannot do a thing  which i am very happy about on the one hand but on the other ready to scream!!

even the manufaucturers say it has to be unlocked again but seriously that would take so long there has to be another answer. surely i can run a script with admin rights to do this?
0
 
LVL 28

Accepted Solution

by:
Bill Bach earned 250 total points
ID: 22777904
Here's an article on how to manage remote access to the registry:
    http://support.microsoft.com/kb/314837

Here's one that provides a bit more detail:
    http://www.ibm.com/developerworks/library/s-remote/index.html

The second is dpecific to the IBM tools, but similar results can be had from VBScript calls.  Here's an article with a sample script that should get you going in the right direction.
    http://www.tek-tips.com/viewthread.cfm?qid=1073041&page=1

Note that the first script is faulty -- so read the entire page first, and test, test test!

0
 
LVL 21

Assisted Solution

by:AmazingTech
AmazingTech earned 250 total points
ID: 22778814
Not knowing exactly how the user is locked down there are several things you can do.

Give this a try it will prompt to modify the loggedon users screen saver.

Remote Console into your server while the kiosk user is logged on.
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
Set Timeout=600
Set MarqueeText=Kiosk
 
 
FOR /f "Tokens=*" %%a in ('reg query "hku" ^| FIND /i "S-1-5-21-" ^| FIND /v "Classes"') DO (
    FOR /f "Tokens=4,*" %%b in ('reg query "%%a\Software\Microsoft\Windows\CurrentVersion\Explorer" ^| FIND /i "Logon User Name"') Do Set LoggedonUser=%%c
    Set /p Update=Do you want to modify username "!LoggedonUser!" press 'y' enter:
   
    If /i "!Update!" == "Y" (
          REG ADD "%%a\Control Panel\Desktop" /v "SCRNSAVE.EXE" /t REG_SZ /f /d "%windir%\System32\ssmarque.scr"
          REG ADD "%%a\Control Panel\Desktop" /v "ScreenSaveActive" /t REG_SZ /f /d "1"
          REG ADD "%%a\Control Panel\Desktop" /v "ScreenSaveTimeOut" /t REG_SZ /f /d "%Timeout%"
          REG ADD "%%a\Control Panel\Desktop" /v "ScreenSaverIsSecure" /t REG_SZ /f /d "0"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "BackgroundColor" /t REG_SZ /f /d "0 0 0"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "CharSet" /t REG_SZ /f /d "0"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "Font" /t REG_SZ /f /d "Tahoma"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "Mode" /t REG_SZ /f /d "1"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "Size" /t REG_SZ /f /d "48"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "Speed" /t REG_SZ /f /d "14"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "Text" /t REG_SZ /f /d "%MarqueeText%"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "TextColor" /t REG_SZ /f /d "255 0 255"
          REG ADD "%%a\Control Panel\Screen Saver.Marquee" /v "Attributes" /t REG_SZ /f /d "00010"
    )
)

Open in new window

0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 22778902
If you have remote registry access to your server you can pass in your server name into this batch file to update your server user remotely.


@ECHO OFF
Set RemoteComputer=%1
IF NOT DEFINED RemoteComputer Set RemoteComputer=%ComputerName%
SETLOCAL ENABLEDELAYEDEXPANSION
Set Timeout=600
Set MarqueeText=Kiosk
 
 
FOR /f "Tokens=*" %%a in ('reg query "\\%RemoteComputer%\hku" ^| FIND /i "S-1-5-21-" ^| FIND /v "Classes"') DO (
    FOR /f "Tokens=4,*" %%b in ('reg query "%%a\Software\Microsoft\Windows\CurrentVersion\Explorer" ^| FIND /i "Logon User Name"') Do Set LoggedonUser=%%c
    Set /p Update=Do you want to modify username "!LoggedonUser!" press 'y' enter:
   
    If /i "!Update!" == "Y" (
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Desktop" /v "SCRNSAVE.EXE" /t REG_SZ /f /d "%windir%\System32\ssmarque.scr"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Desktop" /v "ScreenSaveActive" /t REG_SZ /f /d "1"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Desktop" /v "ScreenSaveTimeOut" /t REG_SZ /f /d "%Timeout%"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Desktop" /v "ScreenSaverIsSecure" /t REG_SZ /f /d "0"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "BackgroundColor" /t REG_SZ /f /d "0 0 0"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "CharSet" /t REG_SZ /f /d "0"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "Font" /t REG_SZ /f /d "Tahoma"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "Mode" /t REG_SZ /f /d "1"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "Size" /t REG_SZ /f /d "48"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "Speed" /t REG_SZ /f /d "14"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "Text" /t REG_SZ /f /d "%MarqueeText%"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "TextColor" /t REG_SZ /f /d "255 0 255"
          REG ADD "\\%RemoteComputer%\%%a\Control Panel\Screen Saver.Marquee" /v "Attributes" /t REG_SZ /f /d "00010"
    )
)

Open in new window

0
 

Author Closing Comment

by:phukitall
ID: 31508745
thankyou so much guys have taken elements from both answers and really learned something at the same time so i have split the points between you both.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question