473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Security problem w/ VB.Net and Word/Excel on Vista 32bit

Hi, I have a VB.Net application that I have recently upgraded from
Visual Studio 2003 to Visual Studio 2005. The VB.Net app accesses
Word and Excel. When I run the newly compiled VB.Net app on the
Windows XP Pro system the app can interact with Word and Excel just
fine. I'm pretty certain I have the correct Microsoft Word 11.0
Object Library and Microsoft Excel 11.0 Object Library references.
All of my library references have Local Copy set to true.

When I run the app on a Vista 32bit system I get the following error.

Source: Microsoft.Office.Interop.Word
System.InvalidCastException {"Unable to cast COM object of type
'Microsoft.Office.Interop.Word.ApplicationClass' to interface type
'Microsoft.Office.Interop.Word._Application'. This operation failed
because the QueryInterface call on the COM component for the interface
with IID '{00020970-0000-0000-C000-000000000046}' failed due to the
following error: could not be found. (Exception from HRESULT:
0x80030002 (STG_E_FILENOTFOUND))."} System.InvalidCastException

Now for the odd part. On the Vista system when I right-click on the
new app .exe and select 'Run as administrator' the app runs without
error and can interact with Word and Excel with no problem. When I
just run the app as myself (I am a member of the local administrators
group) I get the exception.

This seems like some sort of conflict with new security in Vista.
Anybody got any ideas?

Thanks,
John

Oct 17 '07 #1
2 5946

"John Heitmuller." <jo*************@jrfcorp.netwrote in message
news:11**********************@z24g2000prh.googlegr oups.com...
Hi, I have a VB.Net application that I have recently upgraded from
Visual Studio 2003 to Visual Studio 2005. The VB.Net app accesses
Word and Excel. When I run the newly compiled VB.Net app on the
Windows XP Pro system the app can interact with Word and Excel just
fine. I'm pretty certain I have the correct Microsoft Word 11.0
Object Library and Microsoft Excel 11.0 Object Library references.
All of my library references have Local Copy set to true.

When I run the app on a Vista 32bit system I get the following error.

Source: Microsoft.Office.Interop.Word
System.InvalidCastException {"Unable to cast COM object of type
'Microsoft.Office.Interop.Word.ApplicationClass' to interface type
'Microsoft.Office.Interop.Word._Application'. This operation failed
because the QueryInterface call on the COM component for the interface
with IID '{00020970-0000-0000-C000-000000000046}' failed due to the
following error: could not be found. (Exception from HRESULT:
0x80030002 (STG_E_FILENOTFOUND))."} System.InvalidCastException

Now for the odd part. On the Vista system when I right-click on the
new app .exe and select 'Run as administrator' the app runs without
error and can interact with Word and Excel with no problem. When I
just run the app as myself (I am a member of the local administrators
group) I get the exception.

This seems like some sort of conflict with new security in Vista.
Anybody got any ideas?
It's called setting up a Vista UAC Manifest that an application/program will
use to present the proper credential such as Run As Administrator to Vista
so that Vista will allow the program to run with the proper credentials
needed.

Look it up and find out how to create a .Net solution that uses the Vista
UAC Manifest -- use Google.

Oct 18 '07 #2
Thanks.

Oct 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: DavidGeorge | last post by:
I have made a fundamental error in design and ignored security until the end of the project. This is largely because the whole process was a steep learning curve (helped enormously by this group)...
9
by: salad | last post by:
Due to an earlier posting I read in this newsgroup regarding Office 2007 beta, I downloaded it. After I DL'd it, I got an invitation from MS to get WinVista. I am now wondering if, since both...
2
by: =?Utf-8?B?TW9vZHlCbHVl?= | last post by:
Hi - I installed Word 2002 from my Small Business Enterprise disc which was for XP. Excel and Outlook are fine, but I cannot open or save documents in Word format, they default to Wordpad and...
4
by: Dking | last post by:
Just reciently using comp. with Vista. Worked fine for about a month, now i cant open Word, Excel or Explorer. The word and excel are 2007 versions. any help would be appreciated. Thanks in advance....
0
by: John Heitmuller. | last post by:
Hi, I have a VB.Net application that I have recently upgraded from Visual Studio 2003 to Visual Studio 2005. The VB.Net app accesses Word and Excel. When I run the newly compiled VB.Net app on...
0
by: =?Utf-8?B?bWo=?= | last post by:
Hello, I am planning on developing a windows service in C# using VS 2005 on a Vista 32bit operating system. I am going to be deploying this windows service on a 2003 server in our Production...
7
by: Nicolas Hinze | last post by:
Dear all, I installed Vista SP1 on my Vista x64 Enterprise machine. Now my Visual Basic 2005 (.Net 2) does not behave correctly. It appears that 'for loops' have a problem of some sort. For...
2
by: Tam | last post by:
Im running into problems installing either VS 05 or 08 on a Vista Premium 64 bit machine and, ahem, it isnt going sweetly. When installing i get an "Error 1935.An error occured during the...
1
by: Cupric | last post by:
I have a python script that runs fine from the command line or from within IDLE, but doesn't work through the Vista Task Scheduler. The script downloads some csv files and then uses pywin32 to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.