jslegers

Run a program in subdir?

5 posts in this topic

Hello,

 

I have made the following script :

#include <MsgBoxConstants.au3>

If @ProcessorArch = "X86" Then
        MsgBox($MB_OK, "Tutorial", "32 Bit")
        Run("tc86\calc.exe", "")
Else
        MsgBox($MB_OK, "Tutorial", "64 Bit")
        Run("tc64\notepad.exe", "")
EndIf

I can't get in this case notepad run from the subdirectory tc64. I have also tried .\tc64\notepad.exe and ..\tc64\notepad.exe no luck with both.

 

What am I doing wrong ?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I tried this in a x64 PC and it is working for me.

 

#include <MsgBoxConstants.au3>

If @ProcessorArch = "X86" Then
        MsgBox($MB_OK, "Tutorial", "32 Bit")
        Run("tc86\calc.exe", "")
Else
        MsgBox($MB_OK, "Tutorial", "64 Bit")
        Run("tc64\notepad.exe","")
EndIf

 

Edited by Anoop

Share this post


Link to post
Share on other sites

 .\tc64\notepad.exe

Is working for me!


Share this post


Link to post
Share on other sites

Got it :> Notepad was broken at this side. Sorry guys for this noob question. 

Share this post


Link to post
Share on other sites

You can try this:

If @ProcessorArch = "X86" Then
        MsgBox($MB_OK, "Tutorial", "32 Bit")
        Run(@ScriptDir & "\tc86\calc.exe", "")
Else
        MsgBox($MB_OK, "Tutorial", "64 Bit")
        Run(@ScriptDir & "\tc64\notepad.exe", "")
EndIf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now