Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
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…

664 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