Jump to content

AutoIt Scripts fail to run or compile when @ScriptDir is a Google Drive File Stream drive.


Recommended Posts

As the title says, when a script that is stored on a Google Drive File Stream drive is ran or compiled, it fails to work at all.

Basically, Google Drive File Stream creates a G:\ drive where you can access all your files. The difference between this and Google Backup and Sync is your files are downloaded as needed rather than they always be downloaded and taking up storage. 

How to Reproduce Bug

1. Download and Install Google Drive File Stream

2. Sign into Google Drive File Stream with a G Suite account

3. Create a AutoIt Script and save it to Google Drive File Stream. (See attached file)

4. Attempt to run or compile this AutoIt Script. 

 

AutoIt appears to act like the script is (incorrectly) empty and ends immediately. (You can kind of tell based on file sizes from a successful and failed compile).

I've also attached a Process Monitor log file. Hopefully someone can figure this out, because having to move the script out of the drive just to run or compile it is super annoying and I lose version revisioning Google Drive provides me.

test.au3

Logfile.PML

 

 

Link to comment
Share on other sites

Im not sure i can consider this a bug, as we're talking about a script in a network that, in order to open, has to be in a local drive,

or otherwise the program in which it will open has to download this file first, at least into a temp folder, only then it can be opened.

 

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

You can do that with OneDrive Classic. I guess there is no way to manage your script with Google Drive File Stram since all file are not on premise.

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Developers

I can't test this as I don't have a GSuite account, but can imagine this is not the ideal way of doing stuff as you basically have a VERY slow drive attached to your computer which you want to use. So it feels like going back to floppydisks to me. :)

Either way: It should work when GSuite does adhere to the standards for mapped drives which it seems it doesn't, but doubt this is a AutoIt3 issue.

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 comment
Share on other sites

  • Developers

I hear you, but it seems that this particular virtual drive is the only one causing the issue, so I am not sure what it is we can do, and as stated, I have no option to test.
You did check whether the installed AntiVirus isn't causing this issue?

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 comment
Share on other sites

Not sure it is safe for you :( may you gonna pay for nothing. 

Please can you confirme you got this setup and then maybe people will try to assist you. 

With this configuration you will have your google drive file stream looking as a classic OneDrive ( Not exactly but data will apear like if on premise. this is what i mean )

I guess it is that solution that you must use. Say us if that solved your issue. 

 

Follow these steps : 

https://www.coretechnologies.com/products/AlwaysUp/Apps/RunDriveFileStreamAsAWindowsService.html 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

I have Google Drive File Stream installed the normal way, no service. I also wouldn't want to run it as a service, as I would lose the tray icon. I would no longer be able to pause sync while I game so I would end up lagging. However, I can certainly try what you suggested, however I really don't think it will change anything (not to mention anything of the security risk involved in running as a system service). I will let you know as soon as possible. Currently laying in bed trying to sleep. I'll do it when I get up in the morning.

I really don't mind paying for a separate G Suite Account so the AutoIt Dev Team will fix this issue. It's $5 USD a month. Really no issue. Just let me know if this is something the AutoIt Dev Team will be willing to debug. I will pay up to 6 months to get this fixed. I just need someone from AutoIt Dev Team to say they will look into it. No worries if you aren't able to fix it. I just want you to try.

 

 

Link to comment
Share on other sites

  • Developers

I just wanted to check what could be causing this issue, but will not be able to fix it for you as I do not really make modifications in the core AutoIt3/aut2exe source and stick to maintaining the SciTE version SciTE4AutoIt3, all its utilities and installer. 

Are you using the Full version of SciTE4AutoIt3 or just the Autoit3 installer supplied version of SciTE? Try running the Full version with autoit3wrapper in case you don't yet.
What exactly is shown when you run and Compile the script in the SciTE output pane?

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 comment
Share on other sites

50 minutes ago, BetaLeaf said:

I have Google Drive File Stream installed the normal way, no service. I also wouldn't want to run it as a service, as I would lose the tray icon. I would no longer be able to pause sync while I game so I would end up lagging. However, I can certainly try what you suggested, however I really don't think it will change anything (not to mention anything of the security risk involved in running as a system service). I will let you know as soon as possible. Currently laying in bed trying to sleep. I'll do it when I get up in the morning.

I really don't mind paying for a separate G Suite Account so the AutoIt Dev Team will fix this issue. It's $5 USD a month. Really no issue. Just let me know if this is something the AutoIt Dev Team will be willing to debug. I will pay up to 6 months to get this fixed. I just need someone from AutoIt Dev Team to say they will look into it. No worries if you aren't able to fix it. I just want you to try.

 

 

Far from me the urge to insist, just the desire of give more information : 

Google translate of what i want to say you: 

This is a translation of the official documentation. You dont download anything with the stream you just upload modification. That also mean you wont use netword ressources if you're not working on your files. But maybe this is faulse. I dont use the streamer too. 

Unlike Backup and Sync software, this solution does not download and store all data locally on the machine, saving disk space and network bandwidth.

 

 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

7 hours ago, Jos said:

I just wanted to check what could be causing this issue, but will not be able to fix it for you as I do not really make modifications in the core AutoIt3/aut2exe source and stick to maintaining the SciTE version SciTE4AutoIt3, all its utilities and installer. 

Are you using the Full version of SciTE4AutoIt3 or just the Autoit3 installer supplied version of SciTE? Try running the Full version with autoit3wrapper in case you don't yet.
What exactly is shown when you run and Compile the script in the SciTE output pane?

Jos

 

I was more hoping you could forward my request to the relevant team. I am and always use the full version of SciTE4AutoIt3, but like you said, it's not SciTE that's the problem, it's AutoIt3.exe and Aut2Exe.exe

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "G:\My Drive\test.au3" /UserParams    
+>14:24:56 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0   Keyboard:00000409  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\BetaL\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\BetaL\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:G:\My Drive\test.au3
+>14:24:56 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "G:\My Drive\test.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
+>14:24:56 AutoIt3.exe ended.rc:0
+>14:24:56 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 0.6737

 

 

 

Link to comment
Share on other sites

6 hours ago, caramen said:

 

 

Far from me the urge to insist, just the desire of give more information : 

Google translate of what i want to say you: 

This is a translation of the official documentation. You dont download anything with the stream you just upload modification. That also mean you wont use netword ressources if you're not working on your files. But maybe this is faulse. I dont use the streamer too. 

Unlike Backup and Sync software, this solution does not download and store all data locally on the machine, saving disk space and network bandwidth.

 

 

Downloaded files are stored at C:\Users\<USERNAME>\AppData\Local\Google\DriveFS\<GSUITEUSERID>\content_cache\ into many folders. Seems a sqlite db is responsible for knowing where the files are stored, but ultimately they are in this folder. In content_cache, there are folders from d0 to d66 (for me at least) and inside each of these folders is another set of folders from d0 to d150. Inside this set of folders are where the files are. The files are not encrypted, as I can easily identify them with TrID and even open them if I rename them to the correct file extension. Again, AutoIt3.exe and Aut2Exe.exe are the only programs that give me problems. I even have Osu! installed on my G:\ drive and I can play the game even in online only mode, despite it being super slow and sometimes freezing while it waits on files to download as needed

 

 

Link to comment
Share on other sites

  • 1 year later...

Sorry for posting in an old thread, but the problem presented by BetaLeaf, although it may not be a bug in AutoIt, it also doesn't hurt if we try to address what causes it.

Talking about the Google File Stream service by itself, in my experience, it behaves as a regular drive. I can create a script using regular API calls (CreateFile, ReadFile, etc) and it just works. If the file is not stored locally, it download the file behind the scenes (for the application, it is just a slow drive). It doesn't uses anything special (as UNC paths or anything), and any DOS command just work (type, cd, edit, etc).

Obviously, I can't run commands that are specific to NTFS drives (like NTFS Junctions). So I guess AutoIt is relying in some feature that avoid the script to work when it is not in a "standard mount".

When I run a file stored in Google File Stream using AutoIt, it runs and quits silently. No error (Exit Code 0), no message. As I was running an empty file (which is a bug, it should detect that something is wrong and warn the user). If you dive into AutoIt internals (using ProcMon, or any other debug tool), you can see that AutoIt is able to read the entire script file, but it is failing elsewhere (so I feel Google File Stream is not the real problem).

I tried to cheat AutoIt with "subst" and "mklink" commands to make copies of the files to C:\, but it also doesn't work.

Any help?

Link to comment
Share on other sites

  • 2 months later...
  • Developers
15 minutes ago, AndyN said:

Seeing the same issue.  Would love to see if we can figure out how to make this work.

Make a real local copy first? 

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 comment
Share on other sites

Hey,

Just curious, what if you make a file search within this folder and try running it instead? Would that work?

On 10/19/2018 at 10:04 PM, BetaLeaf said:

Downloaded files are stored at C:\Users\<USERNAME>\AppData\Local\Google\DriveFS\<GSUITEUSERID>\content_cache\ into many folders.

Link to comment
Share on other sites

  • 1 year later...

Hey. Still same issue end of 2021. AutoIt is the only tool that runs issues with this Google Drive sync setup. I'm able to compile C,Java and any script without any issue but AutoIt just runs and returns immediately without any error.
Quite boring since this was what we wanted to use as a "repo" for multiple users, we have to download files locally then recopy behind, leading to possible mistakes. (That git will handle)

Link to comment
Share on other sites

  • 4 weeks later...

Hi! I found a solution - you need to switch in the account settings from streaming to mirroring. It's all :)
Sorry, GUI screenshots are only in Russian:

Spoiler

image.png.3cf5842cf30d56d588ff91defae1c5ed.png image.png.62b753980134d2904c5d88f72fd709f7.png

 

 

 

 

 

 

 

Edited by Sergy
correct screenshot
Link to comment
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
 Share

×
×
  • Create New...