windows-7

How to get an email when a computer is about to restart?

情到浓时终转凉″ 提交于 2019-12-08 00:57:24
问题 My work computer usually restarts once a week over night. This is done for security purposes. I don't know in advance when this could happen. Sometimes it may take even a month until the next restart. My problem is that I have scripts running on my computer, so I would like to get a notification whenever my computer is about to restart. (I need to know when it restarts because I must log in back to my computer, otherwise the scripts won't run. Anyway . . . ) I'm trying to set Windows Task

TcpListener performance issues with Start() after hundreds of ports open

余生颓废 提交于 2019-12-08 00:27:31
问题 Before i get started... this is NOT FOR PRODUCTION; The question really only came about while making a test application. Myself and another developer were poking around with why .net was performing this poorly this way. It may not be .net at all, it could be the OS, I hope someone can shed some light on topic: My test application was created to handle hundreds of connections from our production app which connects to hundreds of devices via TCP only because its easier to simulate 500-700 PCs

Problems while reading value from app.config file

。_饼干妹妹 提交于 2019-12-08 00:15:03
问题 I am making one windows application in c# in where i added one file as app.config file.I have written some code in that file as <appSettings> <add key ="FlagForArchiving" value="true"/> </appSettings> In 'program.cs' file i am reading this value as ConfigurationSettings.AppSettings["FlagForArchiving"].ToString(); On local machine i can retrieve value from config file but whenever i am building that application and running on any other machine then I cant read the value from config file.I am

how do I copy a folder to a USB? C#

做~自己de王妃 提交于 2019-12-07 23:25:16
问题 I'm working on a project that will automatically update my USB with some files from my computer. The program works on start up and monitors for any USB or CD that is plugged into the computer. My program is to then copy some folders and its files to the USB. I am having trouble copying the folders into the USB and would appreciate some help, thanks. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using

Installing Ruby on Rails for Windows 7 (up to date)

牧云@^-^@ 提交于 2019-12-07 19:59:28
问题 I'm a designer and not a coder and having issues with the first install. I downloaded Rails 1.8.6 and Instant Rails. I opened a console and tried updating gems. Nothing worked there. I think I will just delete everything and start over because I'm sure I broke something by now. I was really thinking about buying a Mac today just to get it working. What do you recommend for: 1. What EXACTLY to download? 2. Steps to take? Any help is appreciated. Thanks! 回答1: I've been developing with Rails on

SetWindowsHookEx(WH_JOURNALRECORD, ..) sometimes hang the system

流过昼夜 提交于 2019-12-07 18:19:52
问题 I'm trying upgrade an old application to work on Windows 7 and I'm having problems with the "Macro recording" functionality, which is using Journal Hooks. I have followed every step necessary to make this work on Windows 7, that is, setting the uiAccess=true, signing the exe and running it from the Program Files directory. It usually works, but sometimes, for no apparent reason, it seems like the SetWindowsHookEx function is waiting for something and hang the whole system in a weird way : no

Basic windows commands (ping, ipconfig) need admin rights - looking for an option

怎甘沉沦 提交于 2019-12-07 18:06:57
问题 On my main pc (Win 7 64bit) basic windows commands like ping and ipconfig suddenly need admin rights. If I start a normal command-line window, these commands are not found anymore ("X is not recognized as an internal or external command, operable program or batch file.") If I start the command-line window with "Run as Administrator" everything works as expected. On my second PC (Win 7 32 bit) I do not need admin rights. And I strongly believe that I did not need admin rights on my main pc a

How force delete the file on hard drive in windows 7

杀马特。学长 韩版系。学妹 提交于 2019-12-07 15:52:20
问题 I have a hard drive and this is a bad file on it! When I want to delete file windows says: "The file name you specified is not valid or too long. Specify a different file name." But the file not renamed! What do I do? 回答1: You cannot modify a resource when a running process has a handle to it. The solution is to end all processes that have a handle to your resource. This is shown below. 1. End all processes that have a handle to the resource: Start>>All Programs>>Accessories>>System Tools>

Why using WIC in my 32 bit application fails in Windows 7 32 bit?

橙三吉。 提交于 2019-12-07 13:41:50
问题 I have Win32 C++ sample application that uses Windows Image Component in Visual Studio Pro 2012 Update 2. I built this app for X86 and tested in Windows 7 X64 SP1 and Windows 7 X86 SP1. It works fine with the first one and it fails on the later with "class not registered". If I build the same code with VS2008 it works fine. The WIC instance is created in the sample app as follows: #include "wincodec.h" ... case WM_CREATE: { IWICImagingFactory *m_pIWICFactory; HRESULT hr = S_OK; CoInitialize

How to use FAXCOMLib in windows service ?

狂风中的少年 提交于 2019-12-07 13:27:17
问题 I implemented a program for sending fax messages. I use FAXCOMLib and it works when I call it in windows forms. Now I want to call it in windows service, and this is my problem. The code is simple: FaxServer faxServer = new FaxServer(); faxServer.Connect(Environment.MachineName); object obj = faxServer.CreateDocument("D:\\test.bmp"); FaxDoc fd = (FaxDoc)obj; fd.FaxNumber = "123xxxxx"; fd.RecipientName = "Tester"; fd.DisplayName = "TestFax"; fd.SenderName = "Annadurai"; int i = fd.Send(); lp