Can any one help? I'm trying to use System.Diagnost ics.Process.Sta rt to open
legacy MS access aplications (ade and mdb files) and vb 6 .exe's using
asp.net. There is something confusing going on?!?
The files are all in the same network location, when I try and start the
MSaccess files I get a "file not found" error (it does go as far as opening
Msaccess, but doesn't load the DB), when I try to start the exe, the .exe is
found and runs, but the ini file is not found (you have to browse to it on
the local machine) then the SQL connection fails because its trying to log on
as the local machine name. All the files have inherited information from the
parent folder so are identical. This is the code I'm using:
Dim ProcessStartInf o As New System.Diagnost ics.ProcessStar tInfo
ProcessStartInf o.FileName = stb.ToString
ProcessStartInf o.WorkingDirect ory = [local dir]
ProcessStartInf o.WindowStyle = ProcessStartInf o.WindowStyle.M aximized
ProcessStartInf o.UseShellExecu te = True
ProcessStartInf o.CreateNoWindo w = False
System.Diagnost ics.Process.Sta rt(ProcessStart Info)
I've tried it with and without:
'Dim impersonationCo ntext As
System.Security .Principal.Wind owsImpersonatio nContext
'Dim currentWindowsI dentity As
System.Security .Principal.Wind owsIdentity
'currentWindows Identity = CType(User.Iden tity,
System.Security .Principal.Wind owsIdentity)
'impersonationC ontext = currentWindowsI dentity.Imperso nate()
and my machine config is set up as this:
<identity impersonate="tr ue" userName="domai n\administrator "
password="passw ord"/>
<processModel userName="machi ne" password="autog enerate" />
have also tried:
<processModel userName="syste m" password="autog enerate" />
Someone please help..... 5 14107
Toby,
Did you already try it this way.
(Typed here so watch typos)
\\\
Dim ProcessStartInf o As New Process
ProcessStartInf o.FileName = stb.ToString
ProcessStartInf o.WorkingDirect ory = [local dir]
ProcessStartInf o.WindowStyle = WindowStyle.Max imized
Process.StartIn fo.Arguments = "whatever"
ProcessStartInf o.UseShellExecu te = True
ProcessStartInf o.CreateNoWindo w = False
ProcessStartInf o.Start
///
I hope this helps?
Cor
Yep, have tried that. gives the same result :( The problem doesn't seem to be
with the vb code itself but the way asp authenticates.
Thanks, anyhow tho......
"Cor Ligthert" wrote: Toby,
Did you already try it this way. (Typed here so watch typos) \\\ Dim ProcessStartInf o As New Process ProcessStartInf o.FileName = stb.ToString ProcessStartInf o.WorkingDirect ory = [local dir] ProcessStartInf o.WindowStyle = WindowStyle.Max imized Process.StartIn fo.Arguments = "whatever" ProcessStartInf o.UseShellExecu te = True ProcessStartInf o.CreateNoWindo w = False ProcessStartInf o.Start /// I hope this helps?
Cor
Toby,
I did nowhere read in your question that this was in an ASP application. Is
it an ASP application? And when it is maybe can you than next time give that
information, can save a lot of time for the ones who want to help you.
Cor
"toby" <to**@discussio ns.microsoft.co m> Yep, have tried that. gives the same result :( The problem doesn't seem to be with the vb code itself but the way asp authenticates.
Thanks, anyhow tho......
"Cor Ligthert" wrote:
Toby,
Did you already try it this way. (Typed here so watch typos) \\\ Dim ProcessStartInf o As New Process ProcessStartInf o.FileName = stb.ToString ProcessStartInf o.WorkingDirect ory = [local dir] ProcessStartInf o.WindowStyle = WindowStyle.Max imized Process.StartIn fo.Arguments = "whatever" ProcessStartInf o.UseShellExecu te = True ProcessStartInf o.CreateNoWindo w = False ProcessStartInf o.Start /// I hope this helps?
Cor
You can't do this (kind of).
When doing this from asp.net with userName="machi ne" or
userName="syste m", your exe will run as "aspnet" or "LOCALSYSTE M"
respectively (both are local accounts). In this case, the credentials used
on the network is the "machine account" .
If you run in a W2K Active Directory domain, you can grant access rights to
this machine account, else you have to set userName to a domain acount that
has access privileges to your DB.
Willy.
"toby" <to**@discussio ns.microsoft.co m> wrote in message
news:E5******** *************** ***********@mic rosoft.com... Can any one help? I'm trying to use System.Diagnost ics.Process.Sta rt to open legacy MS access aplications (ade and mdb files) and vb 6 .exe's using asp.net. There is something confusing going on?!? The files are all in the same network location, when I try and start the MSaccess files I get a "file not found" error (it does go as far as opening Msaccess, but doesn't load the DB), when I try to start the exe, the .exe is found and runs, but the ini file is not found (you have to browse to it on the local machine) then the SQL connection fails because its trying to log on as the local machine name. All the files have inherited information from the parent folder so are identical. This is the code I'm using:
Dim ProcessStartInf o As New System.Diagnost ics.ProcessStar tInfo ProcessStartInf o.FileName = stb.ToString ProcessStartInf o.WorkingDirect ory = [local dir] ProcessStartInf o.WindowStyle = ProcessStartInf o.WindowStyle.M aximized ProcessStartInf o.UseShellExecu te = True ProcessStartInf o.CreateNoWindo w = False System.Diagnost ics.Process.Sta rt(ProcessStart Info)
I've tried it with and without:
'Dim impersonationCo ntext As System.Security .Principal.Wind owsImpersonatio nContext 'Dim currentWindowsI dentity As System.Security .Principal.Wind owsIdentity 'currentWindows Identity = CType(User.Iden tity, System.Security .Principal.Wind owsIdentity) 'impersonationC ontext = currentWindowsI dentity.Imperso nate()
and my machine config is set up as this:
<identity impersonate="tr ue" userName="domai n\administrator " password="passw ord"/> <processModel userName="machi ne" password="autog enerate" />
have also tried:
<processModel userName="syste m" password="autog enerate" />
Someone please help.....
Tobby,
I see now that I could have seen that you are using ASPNET because you are
using machine.config.
However maybe it is better when you tell that next time direct.
I do not assume that you want to start a windows UI application on the
server, while it is on the client AFAIK impossible (or should be impossible)
Cor
"Cor Ligthert" <no************ @planet.nl> I did nowhere read in your question that this was in an ASP application. Is it an ASP application? And when it is maybe can you than next time give that information, can save a lot of time for the ones who want to help you.
Cor
"toby" <to**@discussio ns.microsoft.co m>
Yep, have tried that. gives the same result :( The problem doesn't seem to be with the vb code itself but the way asp authenticates.
Thanks, anyhow tho......
"Cor Ligthert" wrote:
Toby,
Did you already try it this way. (Typed here so watch typos) \\\ Dim ProcessStartInf o As New Process ProcessStartInf o.FileName = stb.ToString ProcessStartInf o.WorkingDirect ory = [local dir] ProcessStartInf o.WindowStyle = WindowStyle.Max imized Process.StartIn fo.Arguments = "whatever" ProcessStartInf o.UseShellExecu te = True ProcessStartInf o.CreateNoWindo w = False ProcessStartInf o.Start /// I hope this helps?
Cor
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Daniel Reber |
last post by:
I am trying to start a process from a windows service but when the process
starts the command window that the process runs in never shows. Is this
because I am calling it from a windows service? Is there something else
that I need to do?
Here is my code:
System.Diagnostics.ProcessStartInfo info = new
System.Diagnostics.ProcessStartInfo();
|
by: marccruz |
last post by:
Given an instance of System.Diagnostics.Process, how can I get the parent process
o
Given an instance of System.Diagnostics.Process, how can I get the child processes
For example, I start a process which executes a script that starts a java program
System.Diagnostics.Process proc = System.Diagnostics.Process()
proc.StartInfo.FileName = "test.bat"
|
by: solex |
last post by:
Hello All,
Hopefully someone has run into this error. I have written a class(source
below) that launches a thread to monitor the StandardOutput of a
System.Diagnostics.Process, in particular I am executing the find.exe
program.
The application works perfectly in the development environment. As soon as
I execute the compiled program and start the find process I get an
"Application Error". The error states that the instruction...
|
by: andreas |
last post by:
hi,
In windows xp in the start launch menu when i put
notepad "c:\test.txt"
i get notepad with test.txt in it.
in vb.net when i state
system.diagnostics.process.start("notepad.exe"
i get notepad
but
|
by: Nurit N |
last post by:
This is the third newsgroup that I'm posting my problem.
I'm sorry for the multiple posts but the matter becoming urgent.
I hope this is the right place for it...
I have created a very simple batch file (echo hello world) and was trying to
retrieve the standard output but every time I run the code it returns
ExitCode as 1.
| |
by: Daniel |
last post by:
System.Diagnostics.Process.Start fails on windows server 2003
the process returns process.ExitCode == 0 but executing any process with
System.Diagnostics.Process.Start on windows xp works fine.
anything to do different for windows server 2003? some special permission
for the process that executes another executable with
System.Diagnostics.Process.Start ??
here is the code:
|
by: Daniel |
last post by:
C# windows service freezes on System.Diagnostics.Process.Start(info)
When I launch PSCP from a C# windows service and launch pscp 0.53 there are
no issues. but when I use C# windows service to launch pscp 0.58 C# freezes
in System.Diagnostics.Process.Start(info)? pscp 0.58 works fine at command
line, but causes C# to freeze on ystem.Diagnostics.Process.Start(info) also
i noticed that the pscp process does not show in taske manager while...
|
by: Colin Williams |
last post by:
I am using the code below to map network drive and then fire up an app
in a sub dir of that drive. However when using the file open dialog
from that app, drive K: appears just as Network drive K: (this could
confuse users) rather than showing the path it is mapped to like in
explorer.
Using a batch file to execute these commands works great. Any ideas?
System.Diagnostics.Process.Start("net.exe", "use K:...
|
by: test3 |
last post by:
Hello folks,
I'm using System.Diagnostics.Process to start a thirdparty program
(that works perfectly when started via command line). I'm using
Process.StandardOutput to get the output of the program. That works
for 95 %, but the other 5 % it doesn't. It seems to me that the
started process just hangs, and therefor my program hangs, too
(p.WaitForExit()). I researched that this only happens when the output
of the program is longer than...
|
by: kimiraikkonen |
last post by:
Hello,
I want to ask this:
If i do: System.Diagnostics.Process.Start("c:\lame", "--preset
standard c:\blabla.wav c:\blabla.mp3") it works.
But i don't want this. I want my 2 textboxes must take place as
variable like: System.Diagnostics.Process.Start("c:\lame", "--preset
standard textbox1" textbox1.text +
textbox2.text). But that doesn't work. Meanwhile textboxes are the
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |