windows-7

‘error 26 - error locating server’ when launching C# exe located on NW drive from Win7; MSSQL

情到浓时终转凉″ 提交于 2019-12-20 04:07:58
问题 I have several C# programs utilizing LINQ to SQL classes . If I put the exe files on a network drive and execute them from there, I get the ‘ error 26 ’, but only when I do it from Win7 . Step by step Create a new C# project (I use VS 2010 Premium on an XP machine). Add new ‘LINQ to SQL classes’. Drag and drop some table into the data context (from the server explorer). The database(s) I’m using are all MSSQL on remote servers. On the question: “The connection string contains credentials with

Ruby on Windows7 - could not find gem

独自空忆成欢 提交于 2019-12-20 04:00:06
问题 I'm setting up a ruby Apache Buildr on a fresh Windows 7 machine. I've installed Ruby, the DevKit and installed buildr via gem install buildr wich all ran perfect. Until I tried to execute buildr, then I get an error. buildr compile C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find buildr (>= 0) amongst [atoulme-Antwrap-0.7.1, builder-2.1.2, buildr-1.4.5-x86-mswin32, buildr-as3-0.2.12, diff-lcs-1.1.2,highline-1.5.1, hoe-2.3.3, json_pure-1.4.3,

When using pipe getting “The filename, directory name, or volume label syntax is incorrect.”

冷暖自知 提交于 2019-12-20 03:24:11
问题 When I run the following command (or any command with a pipe | in it) on my machine: dir | findstr "Directory" I get the following message: The filename, directory name, or volume label syntax is incorrect. Running dir command or findstr command by themselves works just fine. The volume label is: vol Volume in drive C is OSDisk Volume Serial Number is 685C-A5B5 The version is: ver Microsoft Windows [Version 6.1.7601] 回答1: As previously mentioned by @dbenham You need to make sure your COMSPEC

VB.NET disable the keyboard and mouse

試著忘記壹切 提交于 2019-12-20 03:07:19
问题 I am looking to create a VB.NET application. when the application is opened it will disable the keyboard and mouse so if you hit any keys it does nothing and you can not move the mouse. (even if currently selected window is not that of application). MUST WORK ON WINDOWS 7! Thanks in advance. 回答1: Both the mouse and the keyboard will be quite dead when you P/Invoke BlockInput(). The three finger salute will be required. Visit pinvoke.net for the declaration. 回答2: Not going to happen, and not

Python how to keep writing to a file without erasing what's already there

孤街浪徒 提交于 2019-12-20 03:05:37
问题 Writing my python 3.3 program in Windows, I've run into a little problem. I'm trying to write some lines of instructions to a file for the program to execute. But every time I file.write() the next line, it replaces the previous line. I want to be able to keep writing as many lines to this file as possible. NOTE: Using "\n" doesn't seem to work because you don't know how many lines there are going to be. Please help! Here is my code (being a loop, I do run this multiple times): menu = 0 while

how to use arrow keys as an input in a batch file

ⅰ亾dé卋堺 提交于 2019-12-20 02:44:06
问题 I was curious if there was a way to use the arrow keys on your keyboard to be able to receive input form them and use this information in a batch file? Thanks BurnE 回答1: There a few ways that you can assign arrows symbols/keys to variable, but u can't use them as input as they are operational buttons in command prompt (move cursor and iterate trough the already executed commands) and you cant's detect their pressing. EDIT: @echo off CHCP 1251 ::Define a Linefeed variable set LF=^ ::above 2

Controlling the volume of other applications

谁都会走 提交于 2019-12-20 02:38:11
问题 I am trying to make an app that controls the volume of another process using the Windows 7 Audio API. What I'm looking for is the ISimpleAudioVolume for the session used by the other process. I have tried using the IAudioSessionEnumerator but it will only give me the IAudioSessionControl2 of the session. Using the IAudioSessionControl I have managed to receive notifications when I change the volume through sndvol but not change it myself. I have also tried using GetSimpleAudioVolume() from

How to launch SFC programatically on Windows Vista/7/8?

ⅰ亾dé卋堺 提交于 2019-12-20 02:14:11
问题 I've been trying to solve the problem that Chris Iverson was having in this other Stackoverflow question. I want to launch SFC (the System File Checker tool) programatically. It works on Windows XP: private void RunSfc() { ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/K sfc.exe /scannow"); System.Diagnostics.Process.Start(startInfo); } Other variants that do work under Windows XP: //Launch SFC directly ProcessStartInfo startInfo = new ProcessStartInfo("sfc.exe", "/scannow");

Check if file was modified after xx days in the past

我们两清 提交于 2019-12-20 01:38:12
问题 I am checking for the date modified in a file. I would like to test whether the file was modified after the /d -3 . According to the docs, this will check if the file was modified before that date. I need to check if the file was modified after that date. The docs also state that I can specify a date. I might end up doing it this way though it would be a little more complicated to generate a date to check against which I would prefer to avoid if possible. How might I go about this? forfiles

ADB rejected shell command (ls -l /data)

坚强是说给别人听的谎言 提交于 2019-12-19 21:54:32
问题 I keep getting ADB rejected shell command (ls -l /data): and the command prompt when running adb shell tells me error: device not found although the emulator is open. What I am doing wrong? 回答1: I assume you run adb from the command-line. Just do a adb kill-server and a adb start-server. After that your device(s) should be visible. 来源: https://stackoverflow.com/questions/2236054/adb-rejected-shell-command-ls-l-data