windows-vista

File.Exists returning true for a file that doesn't exist

断了今生、忘了曾经 提交于 2019-11-27 03:31:19
问题 I'm working on an app that saves a file in Path.GetDirectoryName(FilePath) where FilePath = Application.ExecutablePath that contains some information about licensing. If I run the program from VS it works OK but if I make an installer and install and then run it, the program thinks that the file already exists. I changed my program to show on a message box my FilePath and whether File.Exists(FilePath) returns true or false . So I looked in that path, enabled showing hidden and system files,

Newly created modal window loses focus and become inacessible in Windows Vista

淺唱寂寞╮ 提交于 2019-11-27 03:23:57
问题 Sometimes when I open a modal window in my Delphi application it takes a while to show up, then I notice that the application is kind of blocked, and what happened was that the modal form was open with ShowModal but wasn't displayed and the application became locked as if the Modal Window was in the first layer. Usually when this happens I have to use Alt + Tab or Windows + Tab to find the "hidden" modal window, but this doesn't work everytime. This behavior just happens in Vista, but its

How do you run a command as an administrator from the Windows command line?

被刻印的时光 ゝ 提交于 2019-11-27 02:48:49
I have a small script that performs the build and install process on Windows for a Bazaar repository I'm managing. I'm trying to run the script with elevated, administrative privileges from within the Windows shell (cmd.exe)--just as if I'd right-clicked it and chosen Run as Administrator , but without using any method that requires use of the graphical interface. A batch/WSH hybrid is able to call ShellExecute to display the UAC elevation dialog... @if (1==1) @if(1==0) @ELSE @echo off&SETLOCAL ENABLEEXTENSIONS >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"||

Failed to update .mdf database because the database is read-only (Windows application)

本秂侑毒 提交于 2019-11-27 02:03:11
I've created a database windows application using in C#. My application is running successfully on Windows XP, but it doesn't properly execute on Vista or Windows 7 systems. My application shows a message similar to Failed to update .mdf database because the database is read-only Can anyone give me a solution to this? If the MDB file is in your application path, then the default permissions would require elevation of rights to be able to write to the files -- I'd recommend moving the data to the ApplicationData shared folder, where end users will have write permissions by default The big thing

Request admin privileges for Java app on Windows Vista

只愿长相守 提交于 2019-11-27 01:57:54
问题 When I try to create a new task in the task scheduler via the Java ProcessBuilder class I get an access denied error an Windows Vista. On XP it works just fine. When I use the "Run as adminstrator" option it runs on Vista as well.. However this is a additional step requeried an the users might not know about this. When the user just double clicks on the app icon it will fail with access denied. My question is how can I force a java app to reuest admin privileges right after startup? 回答1: I'm

Running compiled python (py2exe) as administrator in Vista

帅比萌擦擦* 提交于 2019-11-27 01:46:46
Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista? Some more clarification: I have written a program that modifies the windows hosts file (c:\Windows\system32\drivers\etc\hosts) in Vista the program will not run and will fail with an exception unless you right-click and run as administrator even when the user has administrator privileges, unlike in XP where it will run if the user has administration rights, so I need a way to elevate it to the correct privileges programaticly. Do you mean that you want Windows to prompt for elevation when your

How to check if OS is Vista in Python?

家住魔仙堡 提交于 2019-11-27 01:05:09
问题 How, in the simplest possible way, distinguish between Windows XP and Windows Vista, using Python and pywin32 or wxPython? Essentially, I need a function that called will return True iff current OS is Vista: >>> isWindowsVista() True 回答1: Python has the lovely 'platform' module to help you out. >>> import platform >>> platform.win32_ver() ('XP', '5.1.2600', 'SP2', 'Multiprocessor Free') >>> platform.system() 'Windows' >>> platform.version() '5.1.2600' >>> platform.release() 'XP' NOTE: As

Why do files get placed in “C:\\Users\\<username>AppData\\Local\\VirtualStore\\Program Files(x86)”?

蓝咒 提交于 2019-11-27 00:57:06
I recently updated my Visual Basic 6.0 application and now include an exe.manifest file to prevent UAC Virtualization. After applying this update, some users can't find their data files ( Access MDB files) and after a system search they end up finding it in C:\Users\<username>AppData\Local\VirtualStore\Program Files(x86) . What is this folder area for and how/when do files get moved to this area? How do we prevent it? I'm hoping now that my application uses a .manifest this won't happen again. Did the files get placed there before the manifest was used as the application was being placed in

Executing a Jar on Vista with a double click

♀尐吖头ヾ 提交于 2019-11-27 00:41:13
This pretty much has me defeated. On XP and earlier versions of Windows you could customise Open With filetypes to include java - jar "myjar.jar", but on Vista this functionality seems to have been removed. I can of course create a .bat file to launch my application, but is it possible to make Vista execute a .jar as required? You can do it from the command line with 2 utilities. The first one, ASSOC, is used to create a file association. To verify if there is one defined for JAR type : >assoc .jar .jar=jarfile If not found then create it with : >assoc .jar=jarfile The next step is to define

How to associate a program with a file type, but only for the current user?

二次信任 提交于 2019-11-26 23:07:36
问题 So, I cannot associate my program with a specific file type without forcing the poor user to enter its admin password (it may be ok for home users, but it is a gigantic problem for users in a corporate env). In this case the only solution is to make the association only for the current user. I have tried that but something is not working. If i understand correctly I have to write a key like (let's say) '.mp3' in ctCurUserFileExt and write in it something like 'my_file'. Then in