#Updating System

1 messages · Page 1 of 1 (latest)

cosmic rover
#

Thanks for replying, like I said, i did use the command prompt and PowerShell using System.Diagnostics.Process. But when i use that, for some reason it still says the folder is in use (even with the app force stopeed in command prompt)

ebon canopy
#

The "folder" or the exe task is in use? And do you have a print or some bool or something to confirm your console app actually ended the task? (and isnt still waiting for the task to respond/close)

cosmic rover
ebon canopy
# cosmic rover When I try to delete the whole folder it says folder still in use. I did try ad...

Well Unity will always have powershell as a child, probably several since they are used for computing shaders and im sure other background activity both while running and closing the editor - if this is specific for a build, I think you should test in the exe build itself, as Unity might have some locks on editor files while the editor is open - if its for the editor specifically, and its not a folder you originally created (ie: its managed by Unity), then you might just have to add a sub-folder and control it that way

#

Though I would imagine usually youd be able to just force-close a folder even if its "in use" most apps just look at whats in a folder and thats about it, I cant see anything (even Unity) reserving access to a folder, unless its a Unity-created and managed folder like the Assets folder or something

cosmic rover
#

I dont think you understand what im trying to do

Im trying to make an button the my app, where if you press it, it will download a zip file from google drive, then it extracts the zip file to the "Vidoes" folder. Then it opens command prompt. Command prompt goes and force stops the .exe file (the app). Then it trys to delete the old app version's folder, and then cut (copy and delete) the new version to the same directory.

cosmic rover
#

When i look in the task manger, i see after command prompts froce stops the .exe file, the .exe file is still open, but with the Command prompt as one of its childs

ebon canopy
#

Then you could probably just Application.Quit from Unity after launching your command prompt, and have your command prompt wait for that task to close itself before proceeding

cosmic rover