Prev: Regular Expression to detect repeating decimal?
Next: Change Folder View When Using an Iframe to Display a Folder Contents
From: J on 14 Jan 2010 16:33 Using a wscript (vbs) to zip and copy user data/files to a backup folder on the network. For some reason this user (a new client) has all his quicken files in: "C:\Users\robert\AppData\Local\VirtualStore\Program Files\Quicken\" The script file opens a cmd windows to run the zip program. But none of the files get copied. I figger it is a permissions issue for running the cmd window not as an administrator. Suggestions please as to how to open an elevated cmd windows from a vbs script. Current syntax: (this is called 3 times for different folders) destFile = newFolder & "\quicken.7z" srcDir = "C:\Users\robert\AppData\Local\VirtualStore\Program Files\Quicken\Quicken Backup\*" Set oShell = CreateObject("WScript.Shell") oshell.Run "c:\progra~1\7-zip\7za.exe a -r " & destFile & " " & srcDir, 1, true The above works fine for the documents and contacts. Guidance please. J
From: mayayana on 15 Jan 2010 10:13 > Using a wscript (vbs) to zip and copy user > data/files to a backup folder on > the network. >For some reason Some reason: virtualization on Vista/7 when UAC is enabled. Apparently Quicken is trying to write to its own Program Files folder, and "Robert" has UAC enabled. I don't generally run with restrictions, so I'm not very familiar with the issue. But since nobody else has offered help .... I wonder if it might work to copy from C:\Program Files\Quicken? That's where Windows is pretending to let Quicken write to. Maybe Windows will also allow you to pretend to copy those files in the same way. > this user (a new client) has all his quicken > files in: > "C:\Users\robert\AppData\Local\VirtualStore\Program Files\Quicken\" > > The script file opens a cmd windows to run the zip program. But none of the > files get copied. I figger it is a permissions issue for running the cmd > window not as an administrator. > > Suggestions please as to how to open an elevated cmd windows from a vbs > script. > > Current syntax: (this is called 3 times for different folders) > > destFile = newFolder & "\quicken.7z" > srcDir = "C:\Users\robert\AppData\Local\VirtualStore\Program > Files\Quicken\Quicken Backup\*" > Set oShell = CreateObject("WScript.Shell") > oshell.Run "c:\progra~1\7-zip\7za.exe a -r " & destFile & " " & srcDir, 1, > true > > > The above works fine for the documents and contacts. > > Guidance please. > > J > > >
From: J on 15 Jan 2010 12:06 Thank you for your suggestion. The files are actually in the virtual folder and not in the programs folder. Obviously, the next step is to move the files and attempt to get Quicken to access them correctly. "mayayana" <mayaXXyana(a)rcXXn.com> wrote in message news:OahzCUflKHA.5040(a)TK2MSFTNGP06.phx.gbl... >> Using a wscript (vbs) to zip and copy user >> data/files to a backup folder on >> the network. >>For some reason > > Some reason: virtualization on Vista/7 when UAC > is enabled. Apparently Quicken is trying to write > to its own Program Files folder, and "Robert" has > UAC enabled. > > I don't generally run with restrictions, so I'm not > very familiar with the issue. But since nobody else has > offered help .... I wonder if it might work to copy > from C:\Program Files\Quicken? That's where Windows > is pretending to let Quicken write to. Maybe Windows > will also allow you to pretend to copy those files in the > same way. > > >> this user (a new client) has all his quicken >> files in: >> "C:\Users\robert\AppData\Local\VirtualStore\Program Files\Quicken\" >> >> The script file opens a cmd windows to run the zip program. But none of > the >> files get copied. I figger it is a permissions issue for running the cmd >> window not as an administrator. >> >> Suggestions please as to how to open an elevated cmd windows from a vbs >> script. >> >> Current syntax: (this is called 3 times for different folders) >> >> destFile = newFolder & "\quicken.7z" >> srcDir = "C:\Users\robert\AppData\Local\VirtualStore\Program >> Files\Quicken\Quicken Backup\*" >> Set oShell = CreateObject("WScript.Shell") >> oshell.Run "c:\progra~1\7-zip\7za.exe a -r " & destFile & " " & srcDir, > 1, >> true >> >> >> The above works fine for the documents and contacts. >> >> Guidance please. >> >> J >> >> >> > >
From: mayayana on 15 Jan 2010 14:24
> The files are actually in the virtual folder and not in the programs folder. > Yes, that's what I was getting at. They would have been put into the virtual folder because of UAC virtualization, when Quicken tried to write to the program folder. So I was thinking that if user Robert can write to the virtual folder (via Quicken) by trying to write to the program folder, then why not copy from there by trying to copy from the program folder? Just a thought. I don't know whether it will work. It would be highly ironic if one could do such a thing while not having permission to actually access the virtual folder directly -- but it wouldn't surprise me if it works that way. |