Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #1029 > unrolled thread

Operation Requires Elevation

Started byR C Nesbit <spam@ukrm.net>
First post2012-03-29 13:42 +0100
Last post2012-03-29 08:33 -0500
Articles 3 — 3 participants

Back to article view | Back to comp.lang.basic.visual.misc


Contents

  Operation Requires Elevation R C Nesbit <spam@ukrm.net> - 2012-03-29 13:42 +0100
    Re: Operation Requires Elevation "Mayayana" <mayayana@invalid.nospam> - 2012-03-29 09:34 -0400
    Re: Operation Requires Elevation ralph <nt_consulting64@yahoo.net> - 2012-03-29 08:33 -0500

#1029 — Operation Requires Elevation

FromR C Nesbit <spam@ukrm.net>
Date2012-03-29 13:42 +0100
SubjectOperation Requires Elevation
Message-ID<VA.00003a8b.3e017238@ukrm.net>
I have a VB6 app which is running quite happily in a number 
of mixed (XP/Vista?W7/2008) environments in a number of 
sites.

One W7 machine recently fried it's HDD and had to be 
completely re-installed from scratch.

It is running my app. from a share on a Vista machine.  
After a few stumbles we finally persuaded it to run Fine, 
except when it wants to generate an output via an excel 
template.

Code snipet:

Set oExcel = New Excel.Application
Set oWB = oExcel.Workbooks.Open(sFile)
Set oWS = oWB.ActiveSheet

'sFile' is a .xlt file in app.path\Templates on the server.

This machine fails every time, and my error log reports:
"the requested operation requires elevation"

-- 
Rob Pearson


[toc] | [next] | [standalone]


#1030

From"Mayayana" <mayayana@invalid.nospam>
Date2012-03-29 09:34 -0400
Message-ID<jl1o7h$eus$1@dont-email.me>
In reply to#1029
  Under normal conditions you don't have access to much
other than the user App Data folder on Vista/7. I was
recently testing a VBScript on Win7 that creates and
uses an IE instance as an HTA. I had no problem with
that, but Win7 wouldn't let me, as Admin, put an image
file on C drive (needed for the test) without elevation!

   When it comes to Vista/7, with the exception of
whatever you set up during program install, you have to
assume that you're running as a corporate employee who
has no right to do anything but send email or write MS
Office files that are auto-saved to their docs folder. That
employee is not even supposed to know about the file
system (from Microsoft's point of view), and Windows/MS
Office is increasingly designed to enforce that.

  You can change permissions programmatically on your
program subfolders during install. That's what I do, so that
I have a location to work with temp files, etc. Or you can
create a folder in App Data and then don't try to do
anything anywhere else. The standard protocol for that is
to create a company folder first, so it would be like:
...\CompanyName\ProgramName\Templates\

|
| One W7 machine recently fried it's HDD and had to be
| completely re-installed from scratch.
|
| It is running my app. from a share on a Vista machine.
| After a few stumbles we finally persuaded it to run Fine,
| except when it wants to generate an output via an excel
| template.
|
| Code snipet:
|
| Set oExcel = New Excel.Application
| Set oWB = oExcel.Workbooks.Open(sFile)
| Set oWS = oWB.ActiveSheet
|
| 'sFile' is a .xlt file in app.path\Templates on the server.
|
| This machine fails every time, and my error log reports:
| "the requested operation requires elevation"
|
| -- 
| Rob Pearson
|
|
| 

[toc] | [prev] | [next] | [standalone]


#1031

Fromralph <nt_consulting64@yahoo.net>
Date2012-03-29 08:33 -0500
Message-ID<hlo8n7henlkd34ld8561ttjlksjceu2k63@4ax.com>
In reply to#1029
On Thu, 29 Mar 2012 13:42:05 +0100, R C Nesbit <spam@ukrm.net> wrote:

>I have a VB6 app which is running quite happily in a number 
>of mixed (XP/Vista?W7/2008) environments in a number of 
>sites.
>
>One W7 machine recently fried it's HDD and had to be 
>completely re-installed from scratch.
>
>It is running my app. from a share on a Vista machine.  
>After a few stumbles we finally persuaded it to run Fine, 
>except when it wants to generate an output via an excel 
>template.
>
>Code snipet:
>
>Set oExcel = New Excel.Application
>Set oWB = oExcel.Workbooks.Open(sFile)
>Set oWS = oWB.ActiveSheet
>
>'sFile' is a .xlt file in app.path\Templates on the server.
>
>This machine fails every time, and my error log reports:
>"the requested operation requires elevation"

Most likely a confusion over "ownership" of the file. 

My guess is that these files were restored by harvesting from other
PCs and not from a backup. This is a common problem when restructuring
or otherwise performing a mass shuffling of files from one PC to
another. Plenty of examples online. Here is one.

http://answers.microsoft.com/en-us/windows/forum/windows_7-files/the-requested-operation-requires-elevation/4d45a50e-2e5d-49f7-950c-e6281057491f

-ralph

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.basic.visual.misc


csiph-web