View previous topic :: View next topic |
Author |
Message |
talkerzero Grandmaster Cheater Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Sat Feb 14, 2009 2:34 am Post subject: [RLS] Disabling up a computer's sound |
|
|
Remember when I asked about setting speaker volume in the programming section? It was for something else, that failed, recreated into this.
Code: | 1. Copy the attached program onto a flash drive.
2. Go to your friend's house.
3. Copy the program into "C:\Documents and Settings\All Users\Start Menu\Programs\Startup".
4. Reboot his computer. |
Now everytime when he boots up his computer, this program will mute his speakers.
Here's the source I used:
Code: | #include <windows.h>
#pragma comment(lib, "winmm.lib")
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {
waveOutSetVolume(0, 0);
} |
If you ever want to restore his sound, change waveOutSetVolume(0, 0) to waveOutSetVolume(0, 0xFFFFFFFF), compile and run. Then delete the program out of his startup folder.
Note: This will not work on Windows Vista.
Last edited by talkerzero on Sat Feb 14, 2009 10:38 am; edited 1 time in total |
|
Back to top |
|
|
hcavolsdsadgadsg I'm a spammer Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Feb 14, 2009 3:13 am Post subject: |
|
|
1. Why are you using WinMain?
2. You're not even returning anything...
3. This won't work under Vista, the program will simply mute itself (not that it makes sound in the first place...) rather than everything.
|
|
Back to top |
|
|
Reak I post too much Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Sat Feb 14, 2009 9:31 am Post subject: |
|
|
4. This is useless.
And since you use to say "his sound" etc, I think you use this to prank people.
|
|
Back to top |
|
|
talkerzero Grandmaster Cheater Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Sat Feb 14, 2009 10:37 am Post subject: |
|
|
slovach wrote: | 1. Why are you using WinMain?
2. You're not even returning anything...
3. This won't work under Vista, the program will simply mute itself (not that it makes sound in the first place...) rather than everything. |
1. Because if I use main, the console will flash for a second before hiding itself. Using WinMain, I have the option to not create a GUI at all.
2. Too lazy to add that, lol.
3. Better add that to the thread.
|
|
Back to top |
|
|
nwongfeiying Grandmaster Cheater Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Sat Feb 14, 2009 5:57 pm Post subject: |
|
|
5. Why not registry instead of the startup folder?
No one really cares about the startup sound. I believe it was slovach who said this in another thread, but not everything made needs to be in the binary section :\
|
|
Back to top |
|
|
nog_lorp Grandmaster Cheater Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
|
Back to top |
|
|
Boon Cheater Reputation: 0
Joined: 13 Jan 2009 Posts: 29 Location: Latvia
|
Posted: Tue Feb 17, 2009 7:38 am Post subject: |
|
|
I was bored , so I remade it ... in asm.
Dunno about cross compiler compatibility , but works nicely when compiled with masm32.
Well this one copies itself to startup, so you just need to run it once and you're set.
Notes:
Startup = C:\Documents and Settings\All Users\Start Menu\Programs\Startup
Source included
Future todolist:
[*]Learn how to make a random number generator in asm to make a version, that's resident and sets the volume at a random loudness at random intervals.
|
|
Back to top |
|
|
hcavolsdsadgadsg I'm a spammer Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Feb 17, 2009 10:18 am Post subject: |
|
|
nog_lorp wrote: | Ya know Slovach, if you don't explicitly return a value from a function, eax (or wherever the value is returned) is just left as is. So, you return some arbitrary value from main/WinMain. Since Windows process return codes are generally unused, who cares? |
I am aware of this, but it's still something that should be done.
|
|
Back to top |
|
|
&Vage Grandmaster Cheater Supreme Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Tue Feb 17, 2009 11:26 am Post subject: |
|
|
This is stupid, it doesn't even work on vista+;
|
|
Back to top |
|
|
|