Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8997079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:50:24+00:00 2026-06-15T23:50:24+00:00

I found this thread very helpful and I would like to ask Ian Norton

  • 0

I found this thread very helpful and I would like to ask Ian Norton about his wrapper. HERE is the link to the wrapper I was trying that IanNorton had posted. I’m not sure if this is the right place to ask and I also don’t want to create a new thread when it pertains to his response. So I will go ahead and suffer whatever backlash may come my way.

I am currently trying to use your wrapper and i cannot seem to seem to get it to trigger anything when I run it. I do not want to use options as i just want to set this as an .exe that runs on a timer. Quite simply, I would like to use the p4 opened -a cmd and print the out puts to a file. That is it. Any help would be greatly appreciated by this NooB.

Thank you very much!

This is as far as I got with just using the Command Line. Unfortunately I could not output my info to a text file.

using System;
using System.Diagnostics;
using System.IO;

namespace P4OpenCMD
{
    class P4Opened
    {
        // Main begins program execution.
        static void Main(string[] args)
        {
            string temp = string.Empty;

            if (temp != string.Empty)
            {
                Process p = new Process();
                ProcessStartInfo info = new ProcessStartInfo();
                info.FileName = "cmd.exe";
                info.RedirectStandardInput = true;
                info.UseShellExecute = false;

                p.StartInfo = info;
                p.Start();

                StreamWriter sw = p.StandardInput;

                using (sw = p.StandardInput)
                {
                    if (sw.BaseStream.CanWrite)
                    {
                        sw.WriteLine("set P4PORT=####");
                        sw.WriteLine("set P4USER=####");
                        sw.WriteLine("set P4CLIENT=####");
                        sw.WriteLine("set P4PASSWD=####");
                        sw.WriteLine("p4 opened -a //Depot/...");
                        sw.WriteLine("pause;");
                    }
                    Console.WriteLine();
                }
                sw.Close();
                p.WaitForExit();
                p.Close();
            }
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:50:25+00:00Added an answer on June 15, 2026 at 11:50 pm

    If you do this, you should be in good shape:

    info.FileName = "cmd.exe";
    info.Arguments = "/c p4 opened > opened.txt";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found this thread which describes a very interesting OnSessionStart event, but I
I found some source code in this thread posted by Rex Logan here on
I've used some code I found on this thread about random divs to create
I found this forum thread in google, but no one here seems to encounter
I found the following thread very useful http://groups.google.com/group/jqplot-users/browse_thread/thread/1986 ... I would like to get
I found this thread as a reference: How do I wait for an asynchronously
I was reading through this thread: Hidden Features of JavaScript? and found this post:
I'm trying to select an select element by name I found this thread showing
Okay, I have done a bit of searching online and found this thread, but
I have set a property across threads before and I found this post Cross-thread

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.