windows-7

Why doesn't my program recognize mapped UNC paths?

筅森魡賤 提交于 2020-01-03 12:31:09
问题 I have some problems writing to a mapped network drive (P:) in Windows 7 from my Delphi program. When I try, for example, ForceDirectories('P:\test\folder') , I get an error (path not found). I have tried typing in the UNC path in the code ( ForceDirectories('\\computername\share\test\folder') ) and that works. However, ExpandUNCFileName('P:\') does not seem to work; it returns 'P:\'. On Windows XP, ExpandUNCFileName('P:\') returns the UNC path. How do I get the UNC path in Delphi on Windows

NetBeans Development 7 - Windows 7 64-bit … JNI native calls … a how to guide

感情迁移 提交于 2020-01-03 11:57:29
问题 I provide this for you to hopefully save you some time and pain. As part of my experience in getting to know NB Development v7 on my Windows 64-bit workstation I found another frustrating adventure in trying to get the JNI (Java Native Interface) abilities up and working in my project. As such, I am including a brief summary of steps required (as all the documentation I found was completely incorrect for these versions of Windows and NetBeans on how to do JNI). It took a couple of days of

Get output from BAT file using Java

吃可爱长大的小学妹 提交于 2020-01-03 11:27:58
问题 I'm trying to run a .bat file and get the output. I can run it but I can't get the results in Java: String cmd = "cmd /c start C:\\workspace\\temp.bat"; Runtime r = Runtime.getRuntime(); Process pr = r.exec(cmd); BufferedReader stdInput = new BufferedReader( new InputStreamReader( pr.getInputStream() )); String s ; while ((s = stdInput.readLine()) != null) { System.out.println(s); } The result is null . No idea why I get this. Note that I'm using Windows 7. 回答1: Using "cmd /c start [...]" to

Get output from BAT file using Java

半腔热情 提交于 2020-01-03 11:27:05
问题 I'm trying to run a .bat file and get the output. I can run it but I can't get the results in Java: String cmd = "cmd /c start C:\\workspace\\temp.bat"; Runtime r = Runtime.getRuntime(); Process pr = r.exec(cmd); BufferedReader stdInput = new BufferedReader( new InputStreamReader( pr.getInputStream() )); String s ; while ((s = stdInput.readLine()) != null) { System.out.println(s); } The result is null . No idea why I get this. Note that I'm using Windows 7. 回答1: Using "cmd /c start [...]" to

programmatically change the windows color border of windows 7 [duplicate]

你说的曾经没有我的故事 提交于 2020-01-03 11:02:04
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: How does Windows change Aero Glass color? using c# how do you programmatically change the windows border color when running aero on windows 7? 回答1: It is not possible to change the color of a window individually but you can change the color OS-wide via the resgistry. The entry should be something like this: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Glass Colorization\Swatches

Windows API to trigger wallpaper shuffle

天涯浪子 提交于 2020-01-03 09:39:08
问题 Is there a way to trigger a shuffle in windows wallpaper slideshow? Preferably something I can use from .net EDIT: so I'm trying to use the IActiveDesktop interface, I got it from here, I tried to use it like this: public static IActiveDesktop GetActiveDesktop() { Type typeActiveDesktop = Type.GetTypeFromCLSID(new Guid("{75048700-EF1F-11D0-9888-006097DEACF9}")); return (IActiveDesktop) Activator.CreateInstance(typeActiveDesktop); } and then calling it like this: IActiveDesktop dt =

install scrapy on win 7 (64-bit)

早过忘川 提交于 2020-01-03 09:10:14
问题 I'm trying to install scrapy for python2.6, but it seems not going well. Here is the packages installed: G:\Python26\Scripts>pip freeze Scrapy==0.16.4 Twisted==12.3.0 libxml2-python==2.7.7 lxml==2.3.6 pyopenssl==0.13 w3lib==1.2 zope.interface==3.8.0 I also got iconv and zlib. And this is the log when installing scrapy with pip. I don't know what I should do next, am I missing sth? Need instructions, thank you. win 7 64-bit, Visual C++ installed C:\Users\d>pip install scrapy Downloading

Check if computer is plugged into AC power in batch file

筅森魡賤 提交于 2020-01-03 08:55:11
问题 How can I check if computer is plugged into AC power in a batch file in windows 7, like on_ac_power does in linux? 回答1: There's a direct batch file way: WMIC Path Win32_Battery Get BatteryStatus Using this and some find / errorlevel magic, you should be able to turn it into a condition. 回答2: A quick google 1 dragged up A powershell solution A C++ solution here. I compiled up the example as battery.exe 2 . I also coded up a modified program that returns 0 ( offline ), 1 ( online ) or 255 (

Value cannot be null. Parameter name: userContext in Visual Studio 2017

天涯浪子 提交于 2020-01-03 08:53:04
问题 I am facing a strange issue that, getting a message as "Value can not be null. Parameter name is userContext" while clicking on Extensions and updates under tools menu. Please do let me know what is the workaround for this issue. Thank you. 回答1: I had the exact same issue. I uninstalled KB4022714 from Start > Windows Update > Advanced Options > View your Update History. The problem went away, but came back after the next Windows Update. I had to update Windows 10 to build 14393 to actually

Value cannot be null. Parameter name: userContext in Visual Studio 2017

拟墨画扇 提交于 2020-01-03 08:52:13
问题 I am facing a strange issue that, getting a message as "Value can not be null. Parameter name is userContext" while clicking on Extensions and updates under tools menu. Please do let me know what is the workaround for this issue. Thank you. 回答1: I had the exact same issue. I uninstalled KB4022714 from Start > Windows Update > Advanced Options > View your Update History. The problem went away, but came back after the next Windows Update. I had to update Windows 10 to build 14393 to actually