Draygoes Posted March 22, 2022 Share Posted March 22, 2022 Ok, this looks dumb, but for some reason the following code will not launch my portable Virtual Box application. I've no idea why. I debugged with message boxes to make sure that my directories were correct, which they are. And the code itself is just a run command. Run(@ScriptDir & "\VBoxFiles\Portable-VirtualBox.exe", @ScriptDir & "\VBoxFiles") MsgBox(0, "", @ScriptDir & "\VBoxFiles\Portable-VirtualBox.exe") Any idea what's going on? Please note that I've also made sure that you can run the program manually and with a Windows Shortcut. Both work. It's just that the script can't seem to launch it for some reason. Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Nine Posted March 22, 2022 Share Posted March 22, 2022 Have you checked if the return value of the run is a valid PID or does it return an @error ? Have you tried with FileExists to see if AutoIt sees your file ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Draygoes Posted March 22, 2022 Author Share Posted March 22, 2022 2 hours ago, Nine said: Have you checked if the return value of the run is a valid PID or does it return an @error ? Have you tried with FileExists to see if AutoIt sees your file ? 1. How do I check that? I'm still a bit of a noob in some areas of this language. 2. I just checked. Autoit can find the file. Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Solution Draygoes Posted March 22, 2022 Author Solution Share Posted March 22, 2022 (edited) Ok, wait. I got it solved. For some crazy reason, I had to #RequireAdmin to run a program in a folder on my desktop. Anyone have any idea why? Thanks for your input @Nine Edited March 22, 2022 by Draygoes Added question. Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Nine Posted March 22, 2022 Share Posted March 22, 2022 7 minutes ago, Draygoes said: How do I check that? I'm still a bit of a noob in some areas of this language $PID = Run("blahblahblah") ConsoleWrite (@error & "/" & $PID) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Earthshine Posted March 22, 2022 Share Posted March 22, 2022 (edited) UAC determines whether you need to be admin. It's better than letting any script run, more secure, that's why--windows is protecting you same in Linux, have to run as su (super user) to do anything that affects the system that is how it should always be, not the wild wild west. following this practice leads to a pc with a long, reliable well configured life. stable OS in fact, you should never operate from an elevated account unless you are installing software or doing OS related maintenance, you should be logged in and running as a standard user--much more safe--need to install something (you probably just want to, not need to) --then log in as admin or elevate to admin temporarily Edited March 22, 2022 by Earthshine TheDcoder and Draygoes 1 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Draygoes Posted March 29, 2022 Author Share Posted March 29, 2022 On 3/22/2022 at 11:18 AM, Earthshine said: UAC determines whether you need to be admin. It's better than letting any script run, more secure, that's why--windows is protecting you same in Linux, have to run as su (super user) to do anything that affects the system that is how it should always be, not the wild wild west. following this practice leads to a pc with a long, reliable well configured life. stable OS in fact, you should never operate from an elevated account unless you are installing software or doing OS related maintenance, you should be logged in and running as a standard user--much more safe--need to install something (you probably just want to, not need to) --then log in as admin or elevate to admin temporarily Right, but... why is it protecting the desktop? I probably should have worded my question that way. Also, thanks guys! I'm learning as we go, and it's very appreciated. Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Earthshine Posted March 29, 2022 Share Posted March 29, 2022 Why wouldn’t it protect the desktop as well? The ideas to stop anyone from running a rogue script My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Draygoes Posted April 4, 2022 Author Share Posted April 4, 2022 On 3/29/2022 at 6:35 PM, Earthshine said: Why wouldn’t it protect the desktop as well? The ideas to stop anyone from running a rogue script I just never thought of the desktop as being a folder that needed to be protected. But I suppose that protection is better than not right? Is it to prevent ransomware from being able to encrypt things in user folders perhaps? Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Earthshine Posted April 4, 2022 Share Posted April 4, 2022 (edited) Yes it’s to stop any application or anything that has execution privileges that can possibly elevate to admin without the users knowledge. That way if you click it anyway and let it run and if it infects you it’s not their fault it’s yours Edited April 4, 2022 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now