B4J Question jshell - running an exe from a button

Mark Turney

Active Member
Licensed User
Longtime User
I've seen some references to this issue, but unfortunately I still cannot get the application I want to run to launch. I set the folder and file permissions in Windows 10 file manager to "Full Control" for all users and processes.

IAWriter is the application that will not launch, and no error are logged:
Run iAWriter:
Sub TVBut_MouseClicked (EventData As MouseEvent)
    Dim shl As Shell
    shl.Initialize("shl", "iAWriter.exe", Null)
    shl.WorkingDirectory = "C:\Program Files\iA Writer"
    shl.Run(-1)
    'StartMessageLoop 'need to call this as this is a console app.
End Sub

I am able to successfully launch the Windows calculator with no issues:
Run calc.exe:
shl.Initialize("shl", "calc.exe", Null)
shl.WorkingDirectory = "C:\Windows\System32"

Any thoughts?
Thanks in advance!
 

drgottjr

Expert
Licensed User
Longtime User
runs for me. iAWriter lives in its own folder. you went straight to the .exe.
 
Upvote 0

Mark Turney

Active Member
Licensed User
Longtime User
Go figure ... works if I simply put the full path where the exe goes, and comment out the working directory:
B4X:
shl.Initialize("shl", "C:\Program Files\ia writer\iawriter.exe", Null)
'shl.WorkingDirectory = "C:\Program Files\ia writer"
Thanks for the thoughts ... always appreciate the comments and collaboration.
 
Upvote 0
Top