windows-7

Permissions issue when publishing to WMI under network service account

故事扮演 提交于 2019-12-07 01:44:07
问题 I'm adding WMI publishing to a .net framework 3.5 based windows service that is running under the 'network service' account. According to a document I came across on MSDN, the 'network service' account should by default have WMI publishing permissions. (" By default, the following users and groups are allowed to publish data and events: ... Network Service , ... ") However, when the service calls Instrumentation.Publish(myStatusClassInstance), it throws a DirectoryNotFoundException; System.IO

Socket.bind() returns “The requested address is not valid in its context.” on Win7

社会主义新天地 提交于 2019-12-07 01:34:18
问题 I am trying to use the Socket.bind() function this way: Bind(new IPEndPoint(myInternalAddress, myPort)); The error I am getting is "The requested address is not valid in its context.", but this only happens on Windows 7 (I am using 64 bit). Befor my upgrade a few days ago this was working fine, and I checked the IPs to be the correct ones. Any help would be appreciated on what exactly goes wrong here. 回答1: bind() ... binds a socket to local IP address and port . That's what IPEndPoint takes

launch C# exe without prompting UAC on Windows 7

白昼怎懂夜的黑 提交于 2019-12-07 00:47:32
I have C# executable that I want to launch on Windows 7 without the dialogbox asking for run-as-administrator.. So here is my code inside the program that launches the C# executable named testApp.exe. Process testApp = new Process(); testApp.StartInfo.FileName = "C:\\Program Files\\Common Files\\testApp.exe"; testApp.Start(); I also create the minfest for both programs. app.manifest for testApp.exe and app.manifest for the program that launches testApp.exe, and then I change the following line in both manifest to: requestedExecutionLevel level="requireAdministrator" uiAccess="false" When I

FileExists() returns false, even if file exists

别说谁变了你拦得住时间么 提交于 2019-12-06 23:58:14
问题 I want to check if a dll in System32 directory (Windows 7) exists. But even if it exists, FileExists() returns false. LoadLibrary returns a valid handle. In this case, I only want to check, if the files exists and visualize this information. Do you have a any tips to solve this? 回答1: Most likely this is down to file redirection. You have a 64 bit machine but from the 32 Delphi process, Windows\system32 actually redirects to Windows\Syswow64 . So when you think you are asking for the existence

stop auto hiding tray notification icon

大城市里の小女人 提交于 2019-12-06 23:54:14
问题 Whenever my windows forms application runs for the first time, the tray icon stays visible for about less than a minute, and then it autohides, what can i do to make it stick and not auto hide ? I tried searching and can't find any useful information. It appears that this is the default behavior for windows 7 and above, I wonder if there is a way to override that behavior from inside my application ? 回答1: There is no supported programmatic way to override the system's default show/hide

Chevron button in delphi dialog form

邮差的信 提交于 2019-12-06 23:47:13
问题 I want to draw a Chevron button in a custom dialog form and I'm wondering if exist a State and Part constant to be used with the DrawThemeBackground function or I must draw this kind of button manually? 回答1: The closest I can find for XP is ThemeServices.DrawElement(Canvas.Handle, GetElementDetails(tebNormalGroupExpandNormal), Rect(10, 100, 100, 200)); or EBP_NORMALGROUPEXPAND using DrawThemeBackground directly. However this draws a double arrow (on XP at least) However later windows versions

DLL File for windows 7 64bit

时光怂恿深爱的人放手 提交于 2019-12-06 23:33:20
问题 I'm porting my Windows XP application (wrote with C#) to Windows 7 application. Now I'm using sqlite3.dll on my XP App (32bit) and I would download sqlite3.dll for 64bit machine. For my purpose I've moved sqlite3.dll on my /bin folder and, obviously, when I try to start my app on windows 7 I receive an error. So, where I download this file? Please, help me... Edit: I've downloaded sqlite3 http://www.sqlite.org/download.html 回答1: The SQLite website only has the 32-bit .dll, to get a 64-bit one

Charset.defaultCharset() get different result under JDK1.7 and JDK 1.6

穿精又带淫゛_ 提交于 2019-12-06 22:25:45
问题 I am testing my application's i18n compatibility. I have a English version of Windows 7 which mean the system's display language is English. And I set the system locale as Chinese for non-unicode application. My application encountered problems when exporting Html files with Chinese character under jdk1.6, but works fine when running under jdk1.7. I debugged it and found the direct reason was that Charset.defaultCharset() returned different values. Under jdk1.7 Charset.defaultCharset()

how to retrieve IP v6 subnet mask length

删除回忆录丶 提交于 2019-12-06 20:52:04
问题 I'm coding an application that has to get the network adapters configuration on a Windows 7 machine just like it's done in the Windows network adapters configuration panel: So far I can get pretty much all the information I need from NetworkInterface.GetAllNetworkInterfaces() EXCEPT the subnet prefix length . I'm aware that it can be retrieved from the C++ struc PMIB_UNICASTIPADDRESS_TABLE via OnLinkPrefixLength but I'm trying to stay in .net. I also took a look at the Win32

System.OutOfMemoryException when using Visual Studio 2010

Deadly 提交于 2019-12-06 20:46:10
问题 I am getting very annoying message called "system.outofmemory.exception" while I do have a lot of unused memory in my laptop. Unless I closed and re-opened the solution, it won't letting me to continue my work. Is there any configuration or service pack that can fix the issue ? Thanks 回答1: Try reinstalling VS and run a memory check. If there's any update that is able to correct an issue like this, it's maked as important on Microsoft Update, so be sure to run it and select all the updates