473,395 Members | 1,608 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,395 software developers and data experts.

functions not working in Vista while in windows it goes smoothly.....

51
Hi,

I am starting a process which is an excel file.what it does is opens the excel file with the data content on the click of a button .now when i again click this or another button which uses this file m not able to delete it n gets the message file in use..so i found out another method whose code snippet is given below.First i start the process then i kill it if the process if already running..but the problem am facing is in Vista it gives the error when i try to kill the process saying the file is in use..In windows xp it works smoothly..

Please its urgent..waitign for reply..


Expand|Select|Wrap|Line Numbers
  1. buton1click()
  2. {
  3. process = Process.Start(excelFilePath4Cal);//excelFilePath4Cal..its an excel file which has the data from the datagrid
  4. }
  5.  
  6.  
  7. buton2click()
  8. {
  9. if (process != null)
  10.                     {
  11.                         process.Kill();
  12.                    }
  13. }
  14.  

thanx..
Feb 25 '09 #1
3 1194
PRR
750 Expert 512MB
This may be because your application is running under limited user... You will have to run your program as administrator ...
Feb 25 '09 #2
tlhintoq
3,525 Expert 2GB
wrap your attempt to kill the process in a try...catch block this way the exception will be handled, even if the handling is to do nothing.
Feb 25 '09 #3
PRR
750 Expert 512MB
what i meant was, Vista runs all programs under "limited user" (programs don't have rights to do anything malicious) ... if your program need admin privileges you need to run it as administrator....
Feb 26 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

99
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less...
8
by: smerf | last post by:
I haven't delved into the beast that is Vista from a programming standpoint yet. But, if the blog at http://west-wind.com/WebLog/posts/4983.aspx is any indication of what we're in for.....I say we...
4
by: =?Utf-8?B?TWlrZSBSaWRlcg==?= | last post by:
Can i have windows vista home premium english version as the base and install the windows vista ultimate as an upgrade in the Spanish language. Will it work, or will i have any problem.
2
by: mindspring | last post by:
A pc that was created in MS office xp's Access 2002 has been working fine on a windows vista Ultimate pc that has MS OFfice Vista Edition. But all of the sudden it stopped working and gives this...
1
by: =?Utf-8?B?TGlvbmVsIEI=?= | last post by:
I have just installed Windows Vista onto my Toshiba Equium and found that my toughpad dosn't work. It did when I used XP. Can anyone help. I cant find anything to help on the Toshiba website.
60
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
On May 3, 8:09 am, apati...@gmail.com wrote: A programmer that uses Vista? :O Vista is a hog of an operating system. Downgrade to Windows XP or get yourself a Linux distro.
7
by: Volkan Senguel | last post by:
Hi i'm searching a solution to avoid that the user can go in the standby mode while a app is runing. i have searched and readed a lot in the web and have not found a working solution... for the...
1
by: =?Utf-8?B?a2xyNzd1aw==?= | last post by:
Please help! I have windows vista, my automatic updates will not download, My firewall will not switch on, and I cannot back up files as windows keeps freezing and not responding. I have AVG and...
1
by: techtonator | last post by:
Hi, I was trying to install XP on my HP laptop having the Vista Home Premium 64 bit preinstalled. I found out the steps that I need to take through google but my pains don't seem to end there. ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.