Solved

bat file should choose install instead of test on scr-file

Posted on 2008-10-09
1
279 Views
Last Modified: 2012-05-05
i'm creating a cd-drom with a flashmenu that starts with autorun.ini
When clicking a button in the flashmenu, a bat-file is being called with fscommand.
This bat-file should start installing a screensaver (screensaver.src)

My batch-filecommand is: start screensaver.scr

This is ok, but instead of installing the screensaver, the it opens the screensaver config menu.

When rightclicking the screensaver.scr i can see a menu that says:
- TEST (in bold, so default action)
- configure
- install

So what is the command to have it install directly from the batch?
0
Comment
Question by:worxsteven
1 Comment
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 22679110
You just need to copy the .scr file to %systemroot%\system32.  To set it as the default you can modify the SCRNSAVE.EXE value under the registry key HKEY_CURRENT_USER\Control Panel\Desktop.  The commands below should work.

Note that the REG command was first included with Windows XP, so place a copy of reg.exe in the same folder as the script if you will be running it on 2000 machines.


xcopy screensaver.scr "%systemroot%\system32\" /C /H /R /Y

reg add "HKCU\Control Panel\Desktop" /v SCRNSAVE.EXE /t REG_SZ /d "%systemroot%\system32\screensaver.scr" /f

Open in new window

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now