中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-04 03:15
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » Homemade batch file for automatically changing the startup sound at boot, if it's good please bump it~
Printable Version  833 / 7
Floor1 bw070 Posted 2007-04-05 11:31
中级用户 Posts 137 Credits 292
Hehe, I had nothing to do so I wrote a batch file myself. It can make the startup sound change every time the machine boots.
Because what I've learned is still limited, it only works on systems whose system drive is C:, I'll improve it later.
Some of the code in it modifies the registry. If antivirus software gives a warning, everyone can rest assured and modify it.
(Anyone who wants to learn is welcome to look at my code)

Installation process:
First back up the original sound file
Create the target folder
Copy in the required program files
Modify the registry

An uninstall program is included, which can unregister the registry entries and completely delete this program

Hope to get to know more batch file experts, hehe, I can't improve myself any further on my own....
Everyone is welcome to give more suggestions, qq:448045169

File address:http://zhenlove.com.cn/cndos/fileup/files/MusicAutoChange_HY.rar

Absolutely virus-free, product certified

[ Last edited by bw070 on 2007-4-5 at 12:24 AM ]
Floor2 baomaboy Posted 2007-04-05 15:51
银牌会员 Posts 554 Credits 1,513
Originally posted by bw070 at 2007-4-5 11:31:
Hehe, I had nothing to do so I wrote a batch file myself. It can make the startup sound change every time the machine boots.
Because what I've learned is still limited, it only works on systems whose system drive is C:, I'll improve it later.
Some of the code in it modifies the regis ...


What is this thing? It's 5.59M,
It's clearly a REG file, so why disguise it as a DLL (a typical virus move)? And with that you're welcoming people to view the source code?
Also, why not try modifying the registry instead (untested, check it yourself): HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\WindowsLogon
the value of %SystemRoot%\media\Windows XP 登录音.wav instead? (login sound 1, login sound 2......) That saves backing up files and also saves you from constantly replacing files

[ Last edited by baomaboy on 2007-4-5 at 04:16 PM ]
Floor3 vkill Posted 2007-04-06 01:46
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
Actually this isn't hard to do, is it?
Floor4 bw070 Posted 2007-04-06 01:47
中级用户 Posts 137 Credits 292
It's clearly a REG file, so why disguise it as a DLL (a typical virus move)? And with that you're welcoming people to view the source code?

To the poster above, if you open the DLL file with Notepad, you can see that it's a registry file.
What you said isn't wrong, but if you call it a virus, then I can only say you don't know enough.
The method you gave is very good and can change the startup sound, but I haven't tried it.
Hope someone who understands the registry can come help clear this up.

Now let me explain the files.

no1_newrun.dll

Windows Registry Editor Version 5.00


"MusicAutoChange"="C:\\WINDOWS\\system\\auto_change_music\\auto_C2_music.bat"

------------------------------------------------------------

no2_newrun.dll

Windows Registry Editor Version 5.00


"MusicAutoChange"="C:\\WINDOWS\\system\\auto_change_music\\auto_C3_music.bat"

------------------------------------------------------------

no3_newrun.dll

Windows Registry Editor Version 5.00


"MusicAutoChange"="C:\\WINDOWS\\system\\auto_change_music\\auto_C1_music.bat"

-----------------------------------------------------------

del_run.dll

Windows Registry Editor Version 5.00


"MusicAutoChange"=-

The functions of no1_newrun.dll, no2_newrun.dll, and no3_newrun.dll are to set the three batch files as startup items.

The function of del_run.dll is to delete the startup item.

After each startup, it deletes the original sound file, copies in the new sound file, and then modifies the startup item.
auto_C1_music.bat→auto_C2_music.bat→auto_C3_music.bat→loop

If this counts as a virus, then I have nothing to say. If you don't test it yourself, why say it's a virus?
You wouldn't use a batch file to write a virus anyway, would you?

[ Last edited by bw070 on 2007-4-5 at 12:49 PM ]
Floor5 bw070 Posted 2007-04-06 01:51
中级用户 Posts 137 Credits 292
As for why it's over 5M, it's because the 3 sound files are each a little over 1M on average.
The main program is only 20K.
I only wrote it for everyone for fun. If there are other ways to do it, then of course that's even better.
But please, don't just call it a virus all the time, okay~~
If the poster in reply #2 comes back, please post that registry-modification method for sound 1, sound 2.
I'd like to learn it.

[ Last edited by bw070 on 2007-4-5 at 12:56 PM ]
Floor6 baomaboy Posted 2007-04-06 02:55
银牌会员 Posts 554 Credits 1,513
Originally posted by bw070 at 2007-4-6 01:47:
It's clearly a REG file, so why disguise it as a DLL (a typical virus move)? And with that you're welcoming people to view the source code?

To the poster above, if you open the DLL file with Notepad, you can see that it's a registry file.
What you said isn' ...


I don't know much, that's true, can't help it.
I didn't say yours was a virus. By "(a typical virus move)" I meant that viruses use this method to hide themselves. Since you know a lot, of course you understand what DLL files are for, but do you really think everyone is going to play hide-and-seek with you and use Notepad to inspect it?
Also, if you already know how to modify Run, then changing that login sound value is even simpler, isn't it? Can't you do it yourself? I'm not very interested in login sounds, so I still haven't tested it. I'll leave it for you to experiment with!
And how did you get the idea that you can't write viruses with batch files? Haven't you seen batch file viruses? Looks like you're just like me and don't know that much either. Search for "ypshashou" and see ^_^ Dangerous, better not tell you too much, in case you get hit by it

[ Last edited by baomaboy on 2007-4-6 at 05:47 AM ]
Floor7 KKIILDL Posted 2007-04-06 03:08
初级用户 Posts 32 Credits 48
Floor8 bw070 Posted 2007-04-06 03:27
中级用户 Posts 137 Credits 292
Hehe, everyone don't get mad.
I just reworked it again. If someone likes different startup sounds, then you can use it without worry.
If you don't like it or have doubts, then just don't use it. Very simple.

Using a batch file to modify the registry is just one function of P. You can use a command
to directly import a .reg file into the registry.
You can also write the .reg file into a dll and use the command
regedit -s ???.dll
The two have the same effect. If a car is faster than a bicycle, why not use the car?

In a moment I'll make another post and modify that program a bit.

Removed the DOS window flashing at startup
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023