Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by mdagreda · Jan 02, 2013 at 04:24 PM · accesscommand

How do I access command prompt from Unity

I need to access command prompt to send it a command for phamtomJS to run a javascript file. So I need to tell command prompt to send this command at a certain point in the game and I'm not sure how I would have unity access command prompt to do this. I hope that was not too confusing. Any help would be great. Thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by gbelini · Jan 02, 2013 at 04:32 PM

Hi, if i understand what you need, you could try this:

 void Start()
 {
           
    string strCmdText;
    strCmdText= "/C notepad";   //This command to open a new notepad
    System.Diagnostics.Process.Start("CMD.exe",strCmdText); //Start cmd process
 }
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mdagreda · Jan 02, 2013 at 04:37 PM 0
Share

Thank you very much. So far that seems to work very well. You saved me alot of searching. Thanks again.

avatar image
0

Answer by yogha001 · Dec 03, 2019 at 10:12 AM

I'm using almost the same Method, it works in Play Mode. But when I build my Project this will not gone work. Anybody had a similar Problem? I would be so grateful for that

 void Start()
 {
       string strCmdText;
       strCmdText = "ykush3 -u " + Port.ToString();   //This command to open a new notepad
       System.Diagnostics.Process.Start(ApplicationPath + "\\hubControl\\ykushcmd.exe", strCmdText); //Start cmd process
 }
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image twobob · Sep 25, 2021 at 09:18 AM 0
Share

Wild guess. When your app is built. that is then the wrong path

avatar image yogha001 · Sep 25, 2021 at 08:14 PM 0
Share

Yeah you‘re Right. I used to change the hubControl path inside my Strea$$anonymous$$gAssetss Path. And it did work ;) That was a long time ago! But thank you :)

void Start() { string strCmdText; strCmdText = "ykush3 -u " + Port.ToString(); //This command to open a new notepad System.Diagnostics.Process.Start(ApplicationPath + "\\Strea$$anonymous$$gAssests\\hubControl\\ykushcmd.exe", strCmdText); //Start cmd process }

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Trying to use System.Diagnostics.Process to access run a command 1 Answer

How do I tell command prompt to do a command after I open it through Unity? 1 Answer

Read boolean from parent's script 2 Answers

Command line feedback 4 Answers

[UNet] How I can send Command to non-player object? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges