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 08:05 PM · errorcommandwin32exception

Getting Win32Exception: error and not sure what to do

Hi everyone, So I'm trying to use System.Diagnostics.Process to access command propmt so I can tell a program(phantomjs) to run a javascript file. But I'm getting a Win32Exception error and I'm not sure what that means or what to do. Here is my code.

 import System.Diagnostics;
 var i:int;
 var command:String;
 var arguments:String;
 
 function Start()
 {
 
 var process = new Process();
 process.StartInfo.FileName=command;
 process.StartInfo.Arguments = arguments;            
 process.StartInfo.RedirectStandardError=true;
 process.StartInfo.RedirectStandardOutput=true;
 process.StartInfo.CreateNoWindow=true;
 process.StartInfo.WorkingDirectory = "C:\\Users\\m7a\\Documents\\StuffFromDevin\\D3 Demo\\phantomjs-1.8.0-windows";
 process.StartInfo.UseShellExecute=false;
 process.Start();
 
 }

I'd really love any help, I've sort of hit a wall. 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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Drakmyth · Jan 02, 2013 at 08:27 PM

The MSDN documentation for System.Diagnostics.Process mentions the following tidbit:

  • Note: A 32-bit processes cannot access the modules of a 64-bit process. If you try to get information about a 64-bit process from a 32-bit process, you will get a Win32Exception exception.

As of this past June, Unity did not have 64-bit support (this was before Unity 4, but I don't know if that is something they added or not). Since I don't see separate installers for 32 or 64-bit versions of phantomjs, I'm guessing it auto-detects, so if you're running on a 64-bit machine, it probably installed the 64-bit version of the program.

I'm not saying this is the problem, I don't know, but it definitely could be and it's a good place to start. Another thought I had was that you could be running into permission problems, though I'm not sure how to go about checking or resolving that.

Comment
Add comment · 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

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

9 People are following this question.

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

Related Questions

Error building Player: Win32Exception [Solved] 4 Answers

Error after importing assets (Survival Shooter tutorial), Win32Exception 0 Answers

Android build fail - Error building Player: Win32Exception 0 Answers

Error Building Player: 'aapt.exe' Win32Exception 3 Answers

Building Error 0 Answers


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