Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[RLS] Disabling up a computer's sound

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming -> Binaries
View previous topic :: View next topic  
Author Message
talkerzero
Grandmaster Cheater
Reputation: 1

Joined: 24 Jul 2008
Posts: 560
Location: California

PostPosted: Sat Feb 14, 2009 2:34 am    Post subject: [RLS] Disabling up a computer's sound Reply with quote

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. Smile

Note: This will not work on Windows Vista.



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.



Last edited by talkerzero on Sat Feb 14, 2009 10:38 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Feb 14, 2009 3:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sat Feb 14, 2009 9:31 am    Post subject: Reply with quote

4. This is useless.

And since you use to say "his sound" etc, I think you use this to prank people.
Back to top
View user's profile Send private message
talkerzero
Grandmaster Cheater
Reputation: 1

Joined: 24 Jul 2008
Posts: 560
Location: California

PostPosted: Sat Feb 14, 2009 10:37 am    Post subject: Reply with quote

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. Smile
Back to top
View user's profile Send private message Visit poster's website
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sat Feb 14, 2009 5:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Mon Feb 16, 2009 11:52 pm    Post subject: Reply with quote

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? Very Happy
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
Boon
Cheater
Reputation: 0

Joined: 13 Jan 2009
Posts: 29
Location: Latvia

PostPosted: Tue Feb 17, 2009 7:38 am    Post subject: Reply with quote

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.



The Extension 'zip' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Feb 17, 2009 10:18 am    Post subject: Reply with quote

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? Very Happy


I am aware of this, but it's still something that should be done.
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Tue Feb 17, 2009 11:26 am    Post subject: Reply with quote

This is stupid, it doesn't even work on vista+;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming -> Binaries All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites