I am having trouble with System.SystemSounds.Beep.Play() not making any sound for a particular user. It seems to be working for everyone else (a fairly large user base with generally 24/7 use) but simply does not make any sound for a particular user.
What I would like to know is if this method has any particular idiosyncrasies that I should be aware of, particularly if they could cause this issue (but really even if they couldn't too)? Has anyone else run into something like this that might point to this being a non-programming issue?
Some extra info that might help: (or might be more confusing)
It does not appear to be a corrupt .NET install because it appears for a particular user across machines.
The user is using the same Active Directory profile for all these machines when they have the issue
Another user can log into the machine and use the exact same executables to get sound successfully
The particular location where the user is has Windows XP machines, though not all users do (some use Windows 7)
You may want to check this link:
http://www.howtogeek.com/howto/windows/turn-off-the-annoying-windows-xp-system-beeps/
make sure that the beep sound is not disabled for the user.
Are the system beeps still on his computer? check C:\Windows\Media, because Beep.Play(); should work fine.
Some other possible problems just to be sure:
The speaker volume isn't at 0%?
The speakers are installed correctly?
Check Windows Control Panel - Sound
Sound event reference must to be set.
For example:
default beep -> Windows Background.wav
Related
So we have this client using tssharp to connect to a remote computer via RDP. The client needs the scaling set to 125% for some reason. This makes the RDP-Session unusable, because tsplus takes the scaling from the system. So I want to habe a skript that switches the scaling from 125%->100%, then starts a .exe and then change the scaling back.
So here I am. My approach was to change the registry via C#. Personally I don't use Windows, so my knowledge is very basic. I can change the registry with my code. It works beautifully. I don't get the registry to reload though. I've tried to broadcast the update, but literally nothing was affected. Then I tried to kill and restart the desktopenvironment (i.e. Windows Explorer). The restart worked, but it didn't care about the new registry. Then I tried power something from microsoft, to automate the clicks. And that piece of s...oftware is absolutely unusable for that. So I'm out of ideas now... How can I make clicks in the Windowssystemsettings with c#? Is there any kind of library or something like this? I've tried the system32 api. Didn't work. Or do you have another idea on how to approach the problem? Like I said I pretty much know nothing about windows, so any idea is welcome. I literally just want to automate 8 clicks and I'm not able to do that.
I cannot find any definitive information anywhere but the System.Windows.Forms.SendKeys class appears to have been blocked / disabled / depreciated in Windows 10.
I wrote a demo program that monitors the users keystrokes and if a user enters a known code it will pop up a form and then go off to a document database and return various strings (company names / addresses / contact lists etc) and replace the typed code with the retrieved string. SendWait is used to send the retrieved strings to whatever program typed the code.
I built the program on the companies Windows 7 desktops but when I ran it on my personal Windows 10 system it didn't work. A lot of reading later and I feel like a complete idiot but I cant let them take this project any further knowing that they wont be on Win7 forever.
So my question is has this sort of functionality definitely been disabled in Windows 10 or is there another way or method I would be able to use to achieve this behavior of inserting text into running programs.
Any help appreciated.
I found this Forum-Thread:
https://www.tenforums.com/software-apps/49635-sendkeys-not-working-windows-10-a.html
SendKeys is Blocked in W10. In W8.1 it still works.
There are other anoying things, like not allowing App to Read or Wright to Drive C. The "file" is there but W10 "hides" it or simply not allowing to access it.
There are Netwok problems also, not allowing App to work on LAN environement.
Well, my opinion is that W10 behaves like Malware to user PC. Useless.
They had no solution.
It looks as if Sendkeys works with some apps and not others. I can automate an older app by sending it keystrokes but newer apps like Chrome don't respond. The inconsistent behavior has seriously messed up scripts that worked fine under Win 7.
I have not found any official documentation that says that Sendkeys has been deprecated so the inconsistency looks to be a Windows 10 bug.
Is there any debug/prepossessing param or any option under Windows 7 and visual studio to prevent from other processes hooking to my process?
I am writing a game for Windows, under Visual Studio, and was wondering if there is a way to disable user to hook to the game's process?
No, that's not possible. Even if you could somehow disable hooking, the user could still attach a debugger to your process and do anything they wanted. That's by design, of course: it's how you debug the problem when you write it.
Once a user has installed a program on their machine, assuming they have sufficient privileges, they have full control over that program. Trying to limit it programmatically is a fool's errand.
The solution to this program is not to be found with code. You need to investigate the built-in Windows security model, like creating limited user accounts; ask more questions about that on Server Fault.
The short answer is no.
On a Windows machine (like most other machines) a user with sufficient privileges will always have the ability to inspect and or modify the contents of your game process's address space.
That said, what sort of user(s) and or attack(s) are you looking to defend against? What assets are you looking to protect? Once you've identified these, you can start thinking about how to design your application such that attackers would have a more difficult time getting at what they want.
I'd start with reading up on Threat Modeling. Good luck!
Disabling is not possible. What you want to do is detecting byte patches, hooks or even just reading in the games memory region. But you better give up, because its not worth the time.
I just like to code when i travel,but i can't carry my laptop while travelling so i thought of a mobile in which i can create apps in C#, .NET or Java but for that i need an IDE,Compiler,etc.
Basically I am looking for a phone / mobile / PDA (far more handy than a net-book or a laptop) in which i can code the way i can do it normally in Visual Studio installed in a machine.
So are there any such devices ?
Let's take a look at what you need to overcome to get this to work.
1) oomph
Smart phones are designed to give you the ability to stay in touch, and have a rich experience on the move, but within the confines of a device that can be put in your pocket. Storage isn't really an issue these days, but processing power on small devices are. Sure we can run calendar, 3D games (though nowhere near the complexity of what you'll see on a fully-fledged operating system), fart-applications and plug-ins for you-tube so we can watch idiots break their ballsacks on railings, but there's a reason you don't see a fully-fledged rich-desktop application, or Grand Theft Auto IV on these devices. Oomph. Now bring in the Visual Studio development environment (and database server, if that is what you're application is doing), with potentially 100s of source files in your language of choice. Assuming we put a severly cut-down version of your IDE on to your pda, I hope you brought some spare batteries or the power-cord because you're going to need it.
2) input
It's probably not difficult to change your predictive text input to cover all the keywords of your chosen language so that you don't end up typing pubic instead of public. Once we've solved that we then need to go through the agonizing process of the fact that computer code contains a lot of symbols and identifiers, meaning we'd have to switch our input mode every other word or two to facilitate it:
for(int i(0); i < _vector.length(); i++)
Takes a few seconds on a keyboard. Probably about one train journey on your PDA. To solve this, we must assume the PDA has the facility for an external keyboard to prevent suicide.
3) display
Ok, we've solved our oomph problems with a power-chord and/or 50 batteries and we've plugged in our external keyboard. We're ready to code!! We'll have to adjust the font-size on the display so that we can get more than 20 lines of code (vertically) or 10 (horizontally). I enjoy my comfort when I code, so I don't want to be squinting at a small screen as I type on my plug-in keyboard. I'd have to prop it up against some books or something (so I don't have to hold the PDA and the keyboard). Now I can't see what i am doing. So, I need a bigger display.
4) Target code
What platform are you targeting? Remember the PDA is designed to run software for the PDA in question. You won't be able to write fully-fledged win32 applications on Windows Mobile 7. There are differences in the API. What if it's a web app you're developing? We're going to have to add a web server to the phone too, unless that is deployed elsewhere and we can rely on an internet connection to upload the changed files to.
Have we solved the problem? Did we get more oomph? A keyboard? A bigger display? Yes we did.
It's a laptop.
It's impractical, as Moo-Juice mentioned. However, you could try using online compilers that work through web browsers, such as Compilr.com. Perhaps this could work well enough through a mobile device's web browser. This way you could write snippets of code and verify that it compiles. Otherwise, you'll be stuck getting a netbook or laptop.
Use a VNC client or Remote Desktop client or something.
Obviously your experience will not be very good on a phone/PDA, but I also don't have an IDE installed on my laptop -- I just use remote desktop (and a wireless modem if I'm desperately bored and can't find wifi).
I am about to start working on an application that runs in the background waiting for a certain user input somewhat like apple's spotlight.
Basically the user will give the service a certain key combination that will bring it up (i.e. CTRL + Space or CTRL + p) and the application main GUI will be brought up.
Now my questions:
First, I want this application to have a very small footprint and not draw on many system resources, and not interfere with the operation of other applications.
I also would like to write this application in C#. So far the best idea I have had would be to write a service that listened for key strokes and threw away stroke that were not either the control or following a control key.
This does not seem optimal is there a better way, anyone know how spotlight works?
Second, I am concerned that this kind of service might be identified as mall ware.
What steps might I take to ensure that my software is not targeted by applications such as Avast and Spysweeper?
Would I need to contact all of the manufacturers of these software packages and explain the purpose of my application?
Finally, if anyone could link to resources about how to set up such a service I would greatly appreciate it.
Services are not supposed to interact with the desktop user, as such they aren't supposed to be able to hook and watch for keystrokes. This may work on XP but you will likely have many problems on Vista/7 and later OS's.
You really need a userspace program that runs at user startup to do this that runs as the same user as the logged in user.
Also, if you are concerned about minimal footprint and resource usage, you don't want to be using .NET because it needs to load a fairly large runtime library and creates a fairly big working set. Usually this isn't a problem, but for something like a watcher program, it's best to write it in low footprint C using a low footbring minimal CRT startup.
My suggestion would be to create a winforms application, add the system tray icon using NotificationIcon to the main form of the application. Then hide the main form. The application can receive key strokes, particularly if you set the FormsPreview property to true. You might also need to hook into the windows api keypress events.
You should be safe from Malware scanners.
You may want to take a look at this link for setting up a system tray/win forms app.
How can I make a .NET Windows Forms application that only runs in the System Tray?