#๐Ÿ”’ how to fix script Please ?

31 messages ยท Page 1 of 1 (latest)

modest kiln
#

in virtual box no work

drowsy hareBOT
#

@modest kiln

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

lunar crown
# modest kiln in virtual box no work
  • system32 first of all is a protected folder, meaning windows will NOT let you delete it
  • You forgot to put double backslashes, since a backslash is a special escape character in python
  • the == operator is for comparing 2 conditions/values, but you're using it for assigning a value
  • the input function is where your Type 1 or 2 should go, since at the moment you're just using the function object
  • You have to use colons when you're doing stuff like an if statement, for loops and such
  • elif can't be used when there's only that elif, you should make the choose == 1 elif into an if statement, since elif literally means else if
  • Indentation, you have to use indentation when you're inside the "scope" of an if statment or a statement that includes colons, because indentation is what python uses to tell what to run in a control flow (basically if and else statements)
#

also i'm pretty sure system32 is a folder, not a binary

lunar crown
simple smelt
#

Also, what you've planned doesnt work, the normal user/admin user does not have TrustedInstaller permissions.

lunar crown
simple smelt
#

You'd need to change the File Ownership, etc. would not recommend doing that though.

lunar crown
simple smelt
#

Yeah, not that much into Windows anyway, just wanted to give some context I actually didnt read the whole convo your message seemed like a bot Message ๐Ÿ˜‚

lunar crown
simple smelt
#

๐Ÿ˜‚

normal hedge
# lunar crown lmao yeah i see how somebody would mistake that

You should use "raw strings" for Windows paths. i.e. r'C:\.....'
This is because the backslash \ is interpreted by Python, for example \n means a newline character.
These are not interpreted in raw strings, so you should use the leading r' so that the backslashes in Windows paths are preserved intact.

cerulean linden
#

the only problem is with trailing \

normal hedge
#

Code inside an if-statement should be indented:

if this:
    print("this!")
elif that:
    print("that!")
else:
    print("neither")
cerulean linden
#

which can be resolved by just doing / instead

normal hedge
cerulean linden
#

well, they did put a trailing \

normal hedge
lunar crown
#

they go into a system32.exe binary which would immediately error out

normal hedge
#

Did @modest kiln ever come back?

cerulean linden
#

pretty sure it was just a troll post

simple smelt
#

Whenever I work on Windows dirs I would write the paths as follows: path = "C:\\Users\\MyUser\\Desktop\\System32.exe"

normal hedge
#

Gets cumbersome.

#

Anyway, your call.

simple smelt
#

where there is defenitly Libs that can perform this operation better since Static Paths are not always good but I think for his example it makes sense.

drowsy hareBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.