Jump to content

AutoIt won't run scripts inside shared drive (VirtualBox shared folder)


Recommended Posts

Hi everyone,

Ever since I have switched to Linux, I have been using Windows in a virtual machine so that I can use AutoIt and some other software which only runs on Windows. Suddenly since yesterday my AutoIt scripts inside shared drives (which are simulated shared folders by VirtualBox) have stopped working... they were working fully before!

No errors, warnings, messages or crashes. AutoIt.exe just exits with a 0 exit code :(. Here is a test script which does not work:

#include <MsgBoxConstants.au3>

If MsgBox($MB_YESNO, "Test", "Is it working?") = $IDYES Then
    ConsoleWrite("It is working!")
Else
    ConsoleWrite("It does not work...")
EndIf

ConsoleWrite(@CRLF)
>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "W:\Test.au3" /UserParams    
+>10:40:43 Starting AutoIt3Wrapper v.18.708.1148.0 SciTE v.4.1.0.0   Keyboard:00004009  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:W:\Test.au3
+>10:40:44 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "W:\Test.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
+>10:40:44 AutoIt3.exe ended.rc:0
+>10:40:44 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 1.051

The same script does work if I copy it to a normal drive (in my case I copied it to the Desktop which is inside the C drive) :think:

 

This is a really strange issue, did anyone experience this before? Maybe we will need the expertise of the AutoIt Devs with this one... Thanks for the help in advance!

EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to post
Share on other sites
  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I know this is an older thread but this exact issue started happening to me today, I tested everything I could thats been mentioned in this thread and all the exact same results. I started to not

@TheDcoder Did you try to disable UAC (temporarily)? Your issue seems something (but could not) related to UAC, as stated here

use the UNC path instead of the mapping ( https://forums.virtualbox.org/viewtopic.php?f=7&t=40036 )

@FrancescoDiMuro Doesn't seem to be related to UAC as it worked fine before, disabling it didn't work :unsure:

@argumentum Same result with both tests:

C:\Program Files (x86)\AutoIt3>AutoIt3 "\\VBOXSVR\Win10JailBox\Test.au3"

C:\Program Files (x86)\AutoIt3>echo %ERRORLEVEL%
0

C:\Program Files (x86)\AutoIt3>AutoIt3 W:\Test.au3

C:\Program Files (x86)\AutoIt3>echo %ERRORLEVEL%
0

 

EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to post
Share on other sites
Link to post
Share on other sites

@argumentum Nothing out of the ordinary in the file's permissions or attributes 😕

@FrancescoDiMuro They point to a directory on the host computer, VirtualBox provides a GUI to create shared folders: https://www.virtualbox.org/manual/UserManual.html#sharedfolders

hlgtUyg.png

@spudw2k Yes to both questions, everything works fine (including running EXEs from the shared drives) except AutoIt not being able to execute scripts within them :(

 

EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to post
Share on other sites

Hmmm, what a mystery.  If you just run AutoIt.exe from a command line without the script path as a parameter, does it open the file select window to choose the script file...and subsequently selecting it, does the script execute?

Link to post
Share on other sites

Sorry, just to clarify, running the AutoIt exe does show the file select window, but no script execution is observed?  Or do you not get the file select window either?

Link to post
Share on other sites
57 minutes ago, spudw2k said:

running the AutoIt exe does show the file select window, but no script execution is observed?

Yes that is correct. The issue seems to be only limited to the part where AutoIt actually performs the execution of the script... 😕

EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to post
Share on other sites
  • Developers

Could you try running it with the latest production version of SciTE4AutoIt3 (v19.102.1901.0) so we can check whether the command is reshelled ( like happens with UAC). The latest version will still show the console messages of the new PID?

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

@Jos I downloaded the latest version and updated SciTE, here is the full output for the same script:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "W:\Test.au3" /UserParams    
+>16:25:21 Starting AutoIt3Wrapper v.19.102.1901.0 SciTE v.4.1.2.0   Keyboard:00004009  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:W:\Test.au3
+>16:25:22 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "W:\Test.au3"    
+>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
+>16:25:22 AutoIt3.exe ended.rc:0
+>16:25:22 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.001

The only new thing which I have noticed is the "Setting Hotkeys" message.

EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to post
Share on other sites
  • Developers

mmm... strange. Can you add the directive to run au3stripper so we can see whether the scriptfile is actually read or it simply gets an empty file?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

@Jos I am not sure how to do that... and I don't think it is an issue of the file being read as empty (as other tools like SciTE are able to read it just file), the issue seems to be only related to the AutoIt interperter 😟

EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to post
Share on other sites
  • Developers
6 minutes ago, TheDcoder said:

I am not sure how to do that..

Simply add this line to the script:

#AutoIt3Wrapper_Run_Au3Stripper=y

 

7 minutes ago, TheDcoder said:

the issue seems to be only related to the AutoIt interperter

That would be strange as it it simply read the file. Have you also tried only using the AutoIt3.exe program to run the script without using SciTE & AutoIt3Wrapper ?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

@Jos The stripper doesn't seem to have worked, I added the wrapper directive at the top of the script and here is the output:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "W:\Test.au3" /UserParams    
+>18:31:32 Starting AutoIt3Wrapper v.19.102.1901.0 SciTE v.4.1.2.0   Keyboard:00004009  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:W:\Test.au3
+>18:31:32 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "W:\Test.au3"    
+>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
+>18:31:33 AutoIt3.exe ended.rc:0
+>18:31:33 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 4.238

 

1 hour ago, Jos said:

That would be strange as it it simply read the file.

Yes, indeed. I was wondering the same...

1 hour ago, Jos said:

Have you also tried only using the AutoIt3.exe program to run the script without using SciTE & AutoIt3Wrapper ?

Many times, I have also posted the output from my testing session in cmd:

19 hours ago, TheDcoder said:

 

C:\Program Files (x86)\AutoIt3>AutoIt3 "\\VBOXSVR\Win10JailBox\Test.au3"

C:\Program Files (x86)\AutoIt3>echo %ERRORLEVEL%
0

C:\Program Files (x86)\AutoIt3>AutoIt3 W:\Test.au3

C:\Program Files (x86)\AutoIt3>echo %ERRORLEVEL%
0

As you can see, AutoIt is not setting an error either 😕

EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to post
Share on other sites
  • Developers
8 minutes ago, TheDcoder said:

The stripper doesn't seem to have worked, I added the wrapper directive at the top of the script and here is the output:

So that would indicate nothing is read by AutoIt3Wrapper!
Just add some  debugging in AutoIt3Wrapper func Retrieve_PreProcessor_Info()  to check what is read from the scriptfile.  ( I assume you know how to do that ...right?)

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...