Solved

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

Posted on 2008-10-09
1
282 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
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…

932 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

10 Experts available now in Live!

Get 1:1 Help Now