Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-09
1
Medium Priority
?
308 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 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Have you ever had a hard drive that you can't boot into, but need to change the registry? Here is the solution! This article guides you through accessing and editing a registry of a non-primary drive. To read registry information on a non-prim…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

971 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