Jump to content

I can't seem to get my code to run my portable Virtual Box.


Go to solution Solved by Draygoes,

Recommended Posts

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.
image.png.fe8b7afc7e218e9e7f752f128aa34ed8.png


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

Link to comment
Share on other sites

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

  • Solution

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 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

Link to comment
Share on other sites

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 by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

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

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

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 by Earthshine

My resources are limited. You must ask the right questions

 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...