Solved

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

Posted on 2008-10-09
1
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

726 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