Vista dilemma
I'm wondering if anyone can help with this. I've got a standalone that, by default, is installed to the Program Files directory. At one point, it performs a check to see if the currently logged in user can write to that directory. Right now I just have it attempt to write to a file and then delete the file. Under Win 2000/XP this seems to work great, but under Vista the darn VirtualStore feature is fouling things up. So, question number one. Is there some way to tell my standalone, or the Vista OS, that I really and truly want my check to be performed on the Program Files directly, and not have things redirected to the VirtualStore? Question number two. If the above is not possible, is there some way to determine (via shell command perhaps) what type of user is currently logged in to the computer (i.e. admin, standard, etc.)? And if so, would this command be available to by any user to run from the shell? This would be a better way to go all around if it's possible. Thanks, Chris -- Chris Sheffield Read Naturally The Fluency Company http://www.readnaturally.com -- ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Vista dilemma
- Original Message - So, question number one. Is there some way to tell my standalone, or the Vista OS, that I really and truly want my check to be performed on the Program Files directly, and not have things redirected to the VirtualStore? First - check out Version in the Help doc's. Vista is Version 6 I believe from memory. Second - Microsoft have stated that Virtualization is not guaranteed to be in future flavours of the OS. The whole point of the tool is so that existing app's don't break - backwards compatibility. However the logical thing to do is to change the location of the data using code - consider My Documents etc. Otherwise Virtualization is going to bite you one day when you least expect it (service pack update for example). Question number two. If the above is not possible, is there some way to determine (via shell command perhaps) what type of user is currently logged in to the computer (i.e. admin, standard, etc.)? And if so, would this command be available to by any user to run from the shell? This would be a better way to go all around if it's possible. Admin is spurious under Vista. You may be the Admin but you are not considered to be the Full Admin. The OS performs that role. It is possible to elevate an application to Admin level (executable called Update.exe or Setup.exe gets this privelidge). However, again, it's much better to code so that data is in My Documents or App Data. In existing installations move the data as part of an update process. Scott Kane Moderator comp.software.shareware.* ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Vista dilemma
On Thu, 2 Aug 2007 09:23:49 -0600, Chris Sheffield wrote: So, question number one. Is there some way to tell my standalone, or the Vista OS, that I really and truly want my check to be performed on the Program Files directly, and not have things redirected to the VirtualStore? The only way to prevent virtualizing AFAIK is to turn off User Account Control. My understanding is that even if you're logged in as Admin, if you have UAC on, it will still virtualize because it is the *application*, not the user, that controls whether it can write to protected locations. And in order to do *that*, you'd have to find some way to make your application act at an elevated level. Of course in this case, you don't want to always write the file - you just want to know if the folder is writeable, which under Vista means knowing whether UAC is on or not.Actually there are three states (AFAICT): 1) UAC off: Completely disables UAC, no virtualization occurs. 2) UAC on (quiet mode): This will enable UAC, but suppress the elevation prompts for members of the Adminstrators group. 3) UAC on: Enables UAC, shows all elevation prompts regardless of group. Unfortunately at the moment there are is some people who have done this with C++ and C#, but I don't think we have a command-line or other Rev-accessible way to determine this state. My recommendation would be to find some other place to write your files (I know, it's a pain, but unless there's someone out there who has a way to detect UAC state or wants to create a Rev external, I don't really see how you can know if your data was virtualilzed). Any chance you can have people turn UAC off? When they do that they are back at the XP level of security (IIRC). Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution