Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

How Vista determines to move a file to VirtualStore?

microsoft.public.windows.vista.security






Speedup My PC
Reply
  #1 (permalink)  
Old 06-13-2007
Narayanan
 

Posts: n/a
How Vista determines to move a file to VirtualStore?
Hello all,

I had read and understood (i guess) about the new security restrictions in
Vista. But I could not figure out the reason why and how Vista decides to
move a file to virtual store!

Here is my actual problem:

I am using Windows Vista Home Basic edition for installing a product. This
is done using an administrator (not the hidden Administrator) previlaged
account. The installer of the product writes files to [C:\Program Files\Foo]
folder and to [C:\ProgramData\Foo] and no problem arises.

In [C:\ProgramData\Foo] it creates a blank license file named
[FooLicense.dat] and the installation routine ends normally.

There was no redirection to virtualstore till now and it was checked
manually by inspecting the [C:\Users\Admin\AppData\Local\VirtualStore] folder.

During the next step which follows immediately after the finish of setup,
the licensing manager starts and gets the license details from user and
appends the [FooLicense.dat] file in [C:\ProgramData\Foo]. At this point, a
new file with same name is getting created in VirtualStore with update
license content, leaving the old blank license file intact.

Due to this even though the application is licensed, the app sees the
situation as unlicensed and does not run as it still refers to the file at
[C:\ProgramData\Foo] and does not know about the virtualstore.

My doubt is why Vista moved the [FooLicense.dat] ONLY during the 2nd
instance to virtualstore? Or what made it to move? Had if the
[C:\ProgramData\Foo] is restricted, the first instance of creating should
also be redirected, which did not happen.

If we know the reason, we can correct it in our code and make sure that it
does not move to VirtualStore and our program can run successfully.

Any help?

Thanks,
Narayanan

PS: The screen dump of the command "Net user":

Quote:
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Admin>net user

User accounts for \\ADMIN-PC

-------------------------------------------------------------------------------
Admin Administrator Guest
The command completed successfully.


C:\Users\Admin>net user admin
User name Admin
Full Name
Comment
User's comment
Country code 000 (System Default)
Account active Yes
Account expires Never

Password last set 6/8/2007 5:09:37 PM
Password expires Never
Password changeable 6/8/2007 5:09:37 PM
Password required No
User may change password Yes

Workstations allowed All
Logon script
User profile
Home directory
Last logon 6/12/2007 10:54:29 PM

Logon hours allowed All

Local Group Memberships *Administrators
Global Group memberships *None
The command completed successfully.


Unquote:
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-13-2007
kuan wai
 

Posts: n/a
RE: How Vista determines to move a file to VirtualStore?
File virtualization is enabled by default for all User level accounts, but
somehow isn't always true for administrator accounts.

When you first install the application, the setup was elevated to
administrative priviledes (so that the setup can write to C:\\Program Files).
After installation, when the application is executed, it is done without
admin privilege, thus any writes to C:\\Program Files from this point of time
will be done in the virtualstore.

There are 2 solutions to this problem
1) Run the application with virtualization enabled always. to do this,
execute the application for the first time, then open the Task Manager.
Select the application in the Process tab, right click and check on
'Virtualization' (a tick will be shown if Virtualization is enabled) from
then on, all read and writes will be forwarded to the virtual store.

2) Run the application with admin level access always. In this way, the
application will have direct access to C:\Program Files. To make it easier,
the application can be configured to run as administrator by default without
needing you to right click and select the 'Run as Administrator'. Simply go
to the properties window of the application, on the 'Compatibility' tab,
check 'Run this as administrator'.

"Narayanan" wrote:

> Hello all,
>
> I had read and understood (i guess) about the new security restrictions in
> Vista. But I could not figure out the reason why and how Vista decides to
> move a file to virtual store!
>
> Here is my actual problem:
>
> I am using Windows Vista Home Basic edition for installing a product. This
> is done using an administrator (not the hidden Administrator) previlaged
> account. The installer of the product writes files to [C:\Program Files\Foo]
> folder and to [C:\ProgramData\Foo] and no problem arises.
>
> In [C:\ProgramData\Foo] it creates a blank license file named
> [FooLicense.dat] and the installation routine ends normally.
>
> There was no redirection to virtualstore till now and it was checked
> manually by inspecting the [C:\Users\Admin\AppData\Local\VirtualStore] folder.
>
> During the next step which follows immediately after the finish of setup,
> the licensing manager starts and gets the license details from user and
> appends the [FooLicense.dat] file in [C:\ProgramData\Foo]. At this point, a
> new file with same name is getting created in VirtualStore with update
> license content, leaving the old blank license file intact.
>
> Due to this even though the application is licensed, the app sees the
> situation as unlicensed and does not run as it still refers to the file at
> [C:\ProgramData\Foo] and does not know about the virtualstore.
>
> My doubt is why Vista moved the [FooLicense.dat] ONLY during the 2nd
> instance to virtualstore? Or what made it to move? Had if the
> [C:\ProgramData\Foo] is restricted, the first instance of creating should
> also be redirected, which did not happen.
>
> If we know the reason, we can correct it in our code and make sure that it
> does not move to VirtualStore and our program can run successfully.
>
> Any help?
>
> Thanks,
> Narayanan
>
> PS: The screen dump of the command "Net user":
>
> Quote:
> Microsoft Windows [Version 6.0.6000]
> Copyright (c) 2006 Microsoft Corporation. All rights reserved.
>
> C:\Users\Admin>net user
>
> User accounts for \\ADMIN-PC
>
> -------------------------------------------------------------------------------
> Admin Administrator Guest
> The command completed successfully.
>
>
> C:\Users\Admin>net user admin
> User name Admin
> Full Name
> Comment
> User's comment
> Country code 000 (System Default)
> Account active Yes
> Account expires Never
>
> Password last set 6/8/2007 5:09:37 PM
> Password expires Never
> Password changeable 6/8/2007 5:09:37 PM
> Password required No
> User may change password Yes
>
> Workstations allowed All
> Logon script
> User profile
> Home directory
> Last logon 6/12/2007 10:54:29 PM
>
> Logon hours allowed All
>
> Local Group Memberships *Administrators
> Global Group memberships *None
> The command completed successfully.
>
>
> Unquote:

Reply With Quote
  #3 (permalink)  
Old 06-14-2007
Narayanan
 

Posts: n/a
RE: How Vista determines to move a file to VirtualStore?
Thanks kuan wai.

Your second answer was tried by us and all went smooth. But there is a
glitch. The licensing can be done for our product in two ways. In first way,
the licence manager can be launched (by right-click "run as admin") and get
the license info and patch the license file. This way works fine as per your
second suggesstion.

In the second way of licensing, the user can request license over email and
will receive the license info as a file. This file can be placed in any
local drive and double clicked to launch the license manager. In this
method, the double click launches license manager in normal mode and not in
"Administrator mode". If I can make the license manager to run in
"Administrator mode" once the associated file is double clicked, my problem
will be solved. But how to run the license manager in admin mode in this way?

Any clues? Your time and effort towards this problems are highly
appreciated...

Thanks,
Narayanan

"kuan wai" wrote:

> File virtualization is enabled by default for all User level accounts, but
> somehow isn't always true for administrator accounts.
>
> When you first install the application, the setup was elevated to
> administrative priviledes (so that the setup can write to C:\\Program Files).
> After installation, when the application is executed, it is done without
> admin privilege, thus any writes to C:\\Program Files from this point of time
> will be done in the virtualstore.
>
> There are 2 solutions to this problem
> 1) Run the application with virtualization enabled always. to do this,
> execute the application for the first time, then open the Task Manager.
> Select the application in the Process tab, right click and check on
> 'Virtualization' (a tick will be shown if Virtualization is enabled) from
> then on, all read and writes will be forwarded to the virtual store.
>
> 2) Run the application with admin level access always. In this way, the
> application will have direct access to C:\Program Files. To make it easier,
> the application can be configured to run as administrator by default without
> needing you to right click and select the 'Run as Administrator'. Simply go
> to the properties window of the application, on the 'Compatibility' tab,
> check 'Run this as administrator'.
>
> "Narayanan" wrote:
>
> > Hello all,
> >
> > I had read and understood (i guess) about the new security restrictions in
> > Vista. But I could not figure out the reason why and how Vista decides to
> > move a file to virtual store!
> >
> > Here is my actual problem:
> >
> > I am using Windows Vista Home Basic edition for installing a product. This
> > is done using an administrator (not the hidden Administrator) previlaged
> > account. The installer of the product writes files to [C:\Program Files\Foo]
> > folder and to [C:\ProgramData\Foo] and no problem arises.
> >
> > In [C:\ProgramData\Foo] it creates a blank license file named
> > [FooLicense.dat] and the installation routine ends normally.
> >
> > There was no redirection to virtualstore till now and it was checked
> > manually by inspecting the [C:\Users\Admin\AppData\Local\VirtualStore] folder.
> >
> > During the next step which follows immediately after the finish of setup,
> > the licensing manager starts and gets the license details from user and
> > appends the [FooLicense.dat] file in [C:\ProgramData\Foo]. At this point, a
> > new file with same name is getting created in VirtualStore with update
> > license content, leaving the old blank license file intact.
> >
> > Due to this even though the application is licensed, the app sees the
> > situation as unlicensed and does not run as it still refers to the file at
> > [C:\ProgramData\Foo] and does not know about the virtualstore.
> >
> > My doubt is why Vista moved the [FooLicense.dat] ONLY during the 2nd
> > instance to virtualstore? Or what made it to move? Had if the
> > [C:\ProgramData\Foo] is restricted, the first instance of creating should
> > also be redirected, which did not happen.
> >
> > If we know the reason, we can correct it in our code and make sure that it
> > does not move to VirtualStore and our program can run successfully.
> >
> > Any help?
> >
> > Thanks,
> > Narayanan
> >
> > PS: The screen dump of the command "Net user":
> >
> > Quote:
> > Microsoft Windows [Version 6.0.6000]
> > Copyright (c) 2006 Microsoft Corporation. All rights reserved.
> >
> > C:\Users\Admin>net user
> >
> > User accounts for \\ADMIN-PC
> >
> > -------------------------------------------------------------------------------
> > Admin Administrator Guest
> > The command completed successfully.
> >
> >
> > C:\Users\Admin>net user admin
> > User name Admin
> > Full Name
> > Comment
> > User's comment
> > Country code 000 (System Default)
> > Account active Yes
> > Account expires Never
> >
> > Password last set 6/8/2007 5:09:37 PM
> > Password expires Never
> > Password changeable 6/8/2007 5:09:37 PM
> > Password required No
> > User may change password Yes
> >
> > Workstations allowed All
> > Logon script
> > User profile
> > Home directory
> > Last logon 6/12/2007 10:54:29 PM
> >
> > Logon hours allowed All
> >
> > Local Group Memberships *Administrators
> > Global Group memberships *None
> > The command completed successfully.
> >
> >
> > Unquote:

Reply With Quote
  #4 (permalink)  
Old 06-19-2007
kuan wai
 

Posts: n/a
RE: How Vista determines to move a file to VirtualStore?
the simplest way is to set the application to runas administrator always.
this can be done through the the 'Compatibility' tab on the properties window
of the application.

Microsoft has published an article regarding UAC (w/ file & registry
virtualization) for developers. It includes the rather comprehensive guide on
how file and registry virtualization is performed. It is recomended to browse
through it and maybe you can improve on the application compatibility with
Vista. running applications with administrative priviledge is not the best
solution.

"Narayanan" wrote:

> Thanks kuan wai.
>
> Your second answer was tried by us and all went smooth. But there is a
> glitch. The licensing can be done for our product in two ways. In first way,
> the licence manager can be launched (by right-click "run as admin") and get
> the license info and patch the license file. This way works fine as per your
> second suggesstion.
>
> In the second way of licensing, the user can request license over email and
> will receive the license info as a file. This file can be placed in any
> local drive and double clicked to launch the license manager. In this
> method, the double click launches license manager in normal mode and not in
> "Administrator mode". If I can make the license manager to run in
> "Administrator mode" once the associated file is double clicked, my problem
> will be solved. But how to run the license manager in admin mode in this way?
>
> Any clues? Your time and effort towards this problems are highly
> appreciated...
>
> Thanks,
> Narayanan
>
> "kuan wai" wrote:
>
> > File virtualization is enabled by default for all User level accounts, but
> > somehow isn't always true for administrator accounts.
> >
> > When you first install the application, the setup was elevated to
> > administrative priviledes (so that the setup can write to C:\\Program Files).
> > After installation, when the application is executed, it is done without
> > admin privilege, thus any writes to C:\\Program Files from this point of time
> > will be done in the virtualstore.
> >
> > There are 2 solutions to this problem
> > 1) Run the application with virtualization enabled always. to do this,
> > execute the application for the first time, then open the Task Manager.
> > Select the application in the Process tab, right click and check on
> > 'Virtualization' (a tick will be shown if Virtualization is enabled) from
> > then on, all read and writes will be forwarded to the virtual store.
> >
> > 2) Run the application with admin level access always. In this way, the
> > application will have direct access to C:\Program Files. To make it easier,
> > the application can be configured to run as administrator by default without
> > needing you to right click and select the 'Run as Administrator'. Simply go
> > to the properties window of the application, on the 'Compatibility' tab,
> > check 'Run this as administrator'.
> >
> > "Narayanan" wrote:
> >
> > > Hello all,
> > >
> > > I had read and understood (i guess) about the new security restrictions in
> > > Vista. But I could not figure out the reason why and how Vista decides to
> > > move a file to virtual store!
> > >
> > > Here is my actual problem:
> > >
> > > I am using Windows Vista Home Basic edition for installing a product. This
> > > is done using an administrator (not the hidden Administrator) previlaged
> > > account. The installer of the product writes files to [C:\Program Files\Foo]
> > > folder and to [C:\ProgramData\Foo] and no problem arises.
> > >
> > > In [C:\ProgramData\Foo] it creates a blank license file named
> > > [FooLicense.dat] and the installation routine ends normally.
> > >
> > > There was no redirection to virtualstore till now and it was checked
> > > manually by inspecting the [C:\Users\Admin\AppData\Local\VirtualStore] folder.
> > >
> > > During the next step which follows immediately after the finish of setup,
> > > the licensing manager starts and gets the license details from user and
> > > appends the [FooLicense.dat] file in [C:\ProgramData\Foo]. At this point, a
> > > new file with same name is getting created in VirtualStore with update
> > > license content, leaving the old blank license file intact.
> > >
> > > Due to this even though the application is licensed, the app sees the
> > > situation as unlicensed and does not run as it still refers to the file at
> > > [C:\ProgramData\Foo] and does not know about the virtualstore.
> > >
> > > My doubt is why Vista moved the [FooLicense.dat] ONLY during the 2nd
> > > instance to virtualstore? Or what made it to move? Had if the
> > > [C:\ProgramData\Foo] is restricted, the first instance of creating should
> > > also be redirected, which did not happen.
> > >
> > > If we know the reason, we can correct it in our code and make sure that it
> > > does not move to VirtualStore and our program can run successfully.
> > >
> > > Any help?
> > >
> > > Thanks,
> > > Narayanan
> > >
> > > PS: The screen dump of the command "Net user":
> > >
> > > Quote:
> > > Microsoft Windows [Version 6.0.6000]
> > > Copyright (c) 2006 Microsoft Corporation. All rights reserved.
> > >
> > > C:\Users\Admin>net user
> > >
> > > User accounts for \\ADMIN-PC
> > >
> > > -------------------------------------------------------------------------------
> > > Admin Administrator Guest
> > > The command completed successfully.
> > >
> > >
> > > C:\Users\Admin>net user admin
> > > User name Admin
> > > Full Name
> > > Comment
> > > User's comment
> > > Country code 000 (System Default)
> > > Account active Yes
> > > Account expires Never
> > >
> > > Password last set 6/8/2007 5:09:37 PM
> > > Password expires Never
> > > Password changeable 6/8/2007 5:09:37 PM
> > > Password required No
> > > User may change password Yes
> > >
> > > Workstations allowed All
> > > Logon script
> > > User profile
> > > Home directory
> > > Last logon 6/12/2007 10:54:29 PM
> > >
> > > Logon hours allowed All
> > >
> > > Local Group Memberships *Administrators
> > > Global Group memberships *None
> > > The command completed successfully.
> > >
> > >
> > > Unquote:

Reply With Quote
  #5 (permalink)  
Old 06-19-2007
kuan wai
 

Posts: n/a
RE: How Vista determines to move a file to VirtualStore?
I had forgotten to include the link. Sorry for that.

http://www.microsoft.com/downloads/t...displayLang=en
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ReadyBoost/move page file to H.D. SevenPointOne microsoft.public.windows.vista.performance maintenance 4 05-26-2007 11:05
Culture Determines Which Emoticon You Use Steve General Technology News 0 05-13-2007 12:21
File Virtualization (VirtualStore) Non-functional Brent microsoft.public.windows.vista.file management 1 03-23-2007 14:31
Move Maker file to DVD Maker isnt holding scenes =?Utf-8?B?S2V2aW4=?= microsoft.public.windows.vista.music pictures video 4 03-01-2007 16:23




All times are GMT +1. The time now is 05:17.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120