windows-vista

Install files to original user's My Docs folder via Inno Setup on Windows Vista/7

只谈情不闲聊 提交于 2019-12-04 19:01:50
In the [Run] section of an Inno Setup script, there's a flag runasoriginaluser that allows the script to run a process as the original user: the spawned process will execute with the (normally non-elevated) credentials of the user that started Setup initially (i.e., the "pre-UAC dialog" credentials). Is there an equivalent flag or workaround for the {userdocs} shell folder constant? This is apparently a known limitation within Inno Setup (and other installers, generally), but I'm hoping someone knows a workaround. Excerpt from the Inno Setup help file: The "user" constants refer to the profile

Is it possible to UAC elevate a process without starting another process

僤鯓⒐⒋嵵緔 提交于 2019-12-04 18:12:58
问题 I was wondering if it is possible for a program to prompt the user with a UAC prompt to raise it's own privileges without starting another process. All the examples I can find on the internet seem to ShellExecute "runas" which creates a new process with elevated privileges. If this is not possible then my best solution I guess would be create a named pipe, ShellExecute my own program with a special argument, and then shove all the data that it will need to perform the operation down the pipe.

Windows Forms .NET 2.0: How to draw a PNG icon?

核能气质少年 提交于 2019-12-04 18:06:50
问题 Note: Question Using 256 x 256 Vista icon in application deals with using a "Vista" icon as the application's icon. This question deals with manually painting a Vista icon. Note: Question WinForms .NET 2.0: How to paint the proper sized icon? deals with painting a Vista icon loaded from a file. This question deals with painting a Vista icon that is loaded from a .resource. I've included an icon in my Visual Studio project that has various formats: 16x16 32x32 48x48 256x256 (PNG compressed)

File Open Dialog with Encodings combobox under Vista

99封情书 提交于 2019-12-04 17:12:04
I currently use the TOpenTextFileDialog as it has the Encodings option, but under Vista it appears using the older open dialog style. I'd like the new style open dialog, but with an encoding combobox that I can fill with custom strings. Basically I want the exact open dialog that Notepad shows under Vista. Of course I also need the corresponding save dialog as well. I've done some research and it seems that the OFN_ENABLETEMPLATE flag causes the Vista common dialog to fall back to the old style. Unfortunately that's also the flag that lets the TOpenTextFileDialog modify the window to add the

The Web Server Could Not Find the Requested Resource

瘦欲@ 提交于 2019-12-04 15:22:16
问题 I have a .NET 3.5 Web application on VS 2008 SP1 running on Vista Ultimate 32 SP1. I created an Application under the Default Web Site. So the url to the app is "http://localhost/mysite". The application folder is pointing to the solution folder and it is outside the iisroot folder. Anonymous and Integrated Auth (Windows) is enabled in IIS7 for this web application "mysite". I gave full permissions to "Network Service" user to the application folder (which is outside of iisroot). When I hit

Allow wake timers Windows 7/Vista

…衆ロ難τιáo~ 提交于 2019-12-04 14:18:15
问题 I need to allow WakeTimers (computer wake up from sleep/hibernation) for all power plans set on plugged in to Enabled. I tried Win32_PowerSetting but it only works on english version of Windows. I need to use .NET 2.0 Thanks for responses ! 回答1: I suspect you can do this using API calls to powrprof.dll, as well as WMI, but I haven't had the time to figure that approach out. This setting appears to be simply a boolean registry key that is located according to your current power plan: HKEY

How to diagnose Java JNI EXCEPTION_ACCESS_VIOLATION errors in Windows Vista

一个人想着一个人 提交于 2019-12-04 14:02:47
问题 We have a Java application that uses some C++ libraries through JNI. The application used to work just fine in Windows XP, but it does not work in Windows Vista, it just crashes the JVM right away. We also wrote the C++ libraries and produced JNI bindings using SWIG. We are a little bit clueless on where to start looking for a way to fix the problem. Here is the EXCEPTION_ACCESS_VIOLATION that we get: # # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS

During Installation, where do the Various File Types go on Vista

不想你离开。 提交于 2019-12-04 13:56:33
问题 Installing my software on Windows XP was always easy. Everything went in the "c:\Program Files\myprogram" directory. This included: The executable program itself and any dlls. Readme.txt and License.txt The help files (.hlp or .chm or .pdf) Program settings that are not in the registry (.ini files) Sample data files for the program Log files that the program produces (Am I missing anything?) But I understand that some of these should not go into the "Program Files" directory on Windows Vista.

How can I pass command-line arguments via file association in Vista 64?

╄→гoц情女王★ 提交于 2019-12-04 13:03:58
问题 How can one pass command line arguments via file association in Vista 64? I recently built a PC running Vista Ultimate 64-bit. I noticed several of the Perl scripts I transferred failed due to command-line arguments not being passed. As a simple test, I wrote the following (foo.pl): #!/usr/bin/perl -w use strict; my $num_args = $#ARGV + 1; print "${num_args} arguments read\n"; print "$^X\n" # to see what was being used Running "foo.pl 1 2 3" undesirably yielded: 0 arguments read C:\strawberry

How to run a process non-elevated with Delphi2007

流过昼夜 提交于 2019-12-04 12:14:05
问题 I have an installer-like application that I have to run as elevated on Vista. But from there I have to start a new process as non-elevated. Any hints how to do this with Delphi2007? 回答1: I found an excellent example for C++ and adapted it for Delphi: unit MediumIL; interface uses Winapi.Windows; function CreateProcessMediumIL(lpApplicationName: PWChar; lpCommandLine: PWChar; lpProcessAttributes: PSecurityAttributes; lpThreadAttributes: PSecurityAttributes; bInheritHandle: BOOL;