Questions tagged [processstartinfo]

269 questions
0
votes
0 answers

Why can't my .exe ALWAYS write a file from a webservice?

This is an issue that has me pulling my hair out. TL:DR; IIS 7.5 webservice calls .exe which writes a file. Works when I navigate to the .asmx page (not in debug/cassini, actual IIS in chrome/FF) but doesn't work when I call the service from an…
Lost78
  • 1
  • 1
0
votes
1 answer

How to pass command line arguments to batch file from c#

I want to execute a batch file from c#.net code. A batch file may take unknown number of the command line arguments. I want to pass these arguments from c# code. How this can be achieved through c#? Edit : I have written following code …
Sagar
  • 454
  • 10
  • 22
0
votes
2 answers

How can I force an ANYCPU .net app to run as 32 or 64 bit?

I have an Office Addin. It launches an app with runas=admin when it needs to set the license key in HKLM. up to Office 2007 Office is 32-bit. However Office 2010 comes in both a 32-bit or 64-bit version. That version determines if an HKLM key is in…
David Thielen
  • 28,723
  • 34
  • 119
  • 193
-1
votes
1 answer

Inputting file location with spaces as arguments for an executable

I need to input the file location from OpenFileDialog, as an argument to a .exe file, the problem is the file name has spaces and when they are called by the exe file as arguments, it breaks up on the spaces. For example if I where to get…
-1
votes
1 answer

.net Process.Start Method not Launching Excel File in Excel 2013 only when launched from whithin excel com addin

System.Diagnostics.Process.Start() not launching an excel file In Excel 2013 and that too launched from inside excel comaddin. string filename = @"C:\Users\centraluser\AppData\Roaming\STUDIO\CENTRAL\d7c98719-7aa9-4e7e-8fb6- bd5a5b23f560\New…
-1
votes
1 answer

Run DOS command with parameters in C#

If I run this command in a command window, it runs fine giving the results I expect. I first go to the FilePath via CD FilePath. Then run the command with a flag and send the output to the DestPath. C:\Program Files (x86)\ProgramName\FileName.exe -f…
Dev
  • 11
  • 3
-1
votes
1 answer

Run interactive process inside already-running console application without opening new window

I realize this looks like a lot of other questions out there, but I looked at all of them for hours and never found the real answer I needed, so hear me out: This is for a .NET C# console application. Within it, I wanted to call a Windows executable…
Paul
  • 420
  • 1
  • 5
  • 18
-1
votes
1 answer

Fast Directory Listing using Shell ( DIR )

I'm doing some work to optimise listing the contents of a Folder across a network drive in C#, file and folders. For files I need the FileName, File Size and DateModified, for folders just the Name and DateModified. I've searched on StackOverflow…
-1
votes
2 answers

startInfo.WorkingDirectory in Process

can someone explain what for is startInfo.WorkingDirectory in ProcessStartInfo, not sure how to use it. var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "folder\\code.exe"); I want run one .exe file…
-1
votes
2 answers

Copy-File vs XCopy

I am trying copy a file via xcopy under startup. But it doesn't work. Here is code: System.Diagnostics.ProcessStartInfo psi2 = new System.Diagnostics.ProcessStartInfo(@"xcopy.exe", @"E:\Debug\VipBat\*…
user3313131
  • 583
  • 2
  • 7
  • 9
-2
votes
1 answer

ProcessStartInfo problem with working directory

I'm starting a process with ProcessStartInfo, the process is started but is not able to access to any directory. If I start the same process manually, everything is working normally. var processStartInfo = new…
-2
votes
1 answer

Test Zip files in a UNC path using 7za

Here is my code: string prova = @"\\10.20.9.1\fold\BCK_Capriata\"; var process = new System.Diagnostics.Process(); var startInfo = new System.Diagnostics.ProcessStartInfo { WorkingDirectory = prova, …
Pietro Ariano
  • 113
  • 1
  • 2
  • 12
-2
votes
2 answers

Process.Start() does not work unless stepping over using F10

I would like to start a process using: ProcessStartInfo createProject = new ProcessStartInfo(); createProject.FileName = exePath; createProject.UseShellExecute = false; createProject.WorkingDirectory = projectDirectory; createProject.Arguments =…
Lati
  • 341
  • 6
  • 18
-2
votes
1 answer

Faulty ProcessStartInfo & Process.Start? (properly debugging?)

The question mainly is in the Read() method. public static void Read(object source, ElapsedEventArgs e) { serverID = File.ReadAllText(sidname); Console.WriteLine("Current ID: " + serverID); if (serverID != oldserverID && serverID !=…
DaFuze
  • 5
  • 3
1 2 3
17
18