-
Posts
4,212 -
Joined
-
Last visited
-
Days Won
19
Draygoes last won the day on March 10 2023
Draygoes had the most liked content!
About Draygoes
- Birthday 12/12/1989
Profile Information
-
Member Title
ETA-404
-
Location
United States
-
Interests
Autoit programming, I.T., Tech support for anyone who needs it,
Recent Profile Visitors
1,532 profile views
Draygoes's Achievements
-
VenusProject2 reacted to a post in a topic: ISN AutoIt Studio
-
sylremo reacted to a post in a topic: Make CapsLock Great Again
-
I want to launch a .bat file from an autoit script. But I need it to be executed in an elevated command prompt. Normally you do this by right clicking & "run as admin"(My wording might be off), but my script is launching it. So, does the CMD window launched get the same privileges me, or do I need to use RunAs(ME)? If I have to use RunAs, I need to ask for help at this point because Micro$oft has made using runas mildly confusing. Which account name is it referring to my account nickname, my sign in email address, or the account name as given out by the "WHOAMI" command in cmd? Same question for the Password. Do I just use my Pin, or do I need to use my Microsoft account password? And as always, thank you for your time.
-
felix12123 reacted to a post in a topic: [Solved] How to run Powershell with AutoIt and use Get-RDUserSession command?
-
No, I put notepad in place of an executable that I have for a program that's installed so that everyone can use it. So I tried to update my code based on yoru suggestion. Local $iPID = Run(@ComSpec & "notepad", @SystemDir, @SW_HIDE) That doesn't work either. I'm trying to run CMD in a hidden window and launch an EXE, which is notepad in this case and will be my installed program once I put that in.
-
So all this script does is count a random number of minutes by counting to 60 seconds and resetting. It showes pretty much exactly what I think of when I imagined what a do loop should look like. I hope that makes sense. Anyway, code. $Seconds = 0 ;Set our seconds counter to zero. $Minutes = 0 ;Set our minutes counter to zero. $length = Random( 15, 300, 1) ;Set the veriable "length" to a number between 15 and 300. This will be the time we run our DO loop below until. Do ;Count Minutes Do ;Count Seconds Sleep( 1000 ) ;Pauses the code right here for exactly one second. $Seconds = $Seconds + 1 ;Adds 1 to the veriable that stores what second we are at, named Seconds. Until $Seconds = 60 ;Stops counting seconds at 60 seconds. $Seconds = 0 ;Resets the seconds to zero. If we don't do this, the count will start at 61. And as it keeps going, it will never equal 60 ;again, creating a constant count that never gets stopped by any conditions. The program will run like this until t's ;restarted in some way for some reason. $Minutes = $Minutes + 1 ;Adds 1 to the veriable that stores what minute we are at, named minute. Until $Minutes = $length ;Stops the do loop when the minute counter is the same number as the length we randomly generated on line 13. ;Here we execute whatever we wanted to at the random time. Can be a reminder or something along those lines. Believe it or not I just wrote that for a project I'm doing. You can easily throw it on top of any code you could ever need to run at random.
-
Ah, thanks for letting me know that. I'm so new to powershell, that I thought I had written that correctly. I'm learning. Okay, I think one of the reasons this code isn't working is because I'm not running powershell as admin. How do I do that? Run("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Set-MpPreference -DisableRealtimeMonitoring $true" )
-
Hey all! I'm going a bit crazy with this, so maybe you guys can help. (I'm also extreamly tired, but I'm pretty sure that's not effecting the fact that this doesn't work.) Right so, I'm trying to run this PS code that disables Windows Defender. Set-MpPreference -DisableRealtimeMonitoring $true But that code needs to be run as administrator. The other problem is, the code that I tried didn't work at all. And I have no idea why. Run("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Start-Sleep -Seconds 20 -Milliseconds 300" ) So, could someone help me figure out why that code doesn't work, so that I can get the other code to work? Basically I'm trying to do this, but I need it to be ran as Admin. Run("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Set-MpPreference -DisableRealtimeMonitoring $true" ) Thanks for yalls time.
-
Yes mod. You're a moderator right? Oh no, you're not? Strange because the Moderator that I messaged around an hour ago about weather or not I should reply here or start a new thread said that it would be fine to reply here since "A year isn't really that old". (I say this with most of the respect that is due to you. We normally agree about and get along about nearly everything.)
-
I'm getting frustrated to tears with this. So far I've tried this Run("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Start-Sleep -Seconds 20 -Milliseconds 300" )With no luck. And the command I need to run is "Set-MpPreference -DisableRealtimeMonitoring $True" to disable powershell. So that's going to need administrator permission. So my two questions are 1. Why didn't my run command work and 2. How do I run the command I really need to run as Administartor? I went with the pause command because I can allow people to test it and such without disabling their active protection. I want MY defender disabled, not the person who's trying to help me.
-
I took this code by itself and ran it from my documents folder, where the main script will be. It's not working, it refuses to write to registry. Let me make sure that it's not needing admin. EDIT: Nope, this didn't work either. I've tried both of these. #RequireAdmin RegWrite( "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "PCVRFixer", @ScriptFullPath ) RegWrite( "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "PCVRFixer", @ScriptFullPath ){/code]
-
@rudi@OJBakker Okay, so, now it's reading the registry, but for some reason, it refuses to write to the registry. Any chance you might be able to figure out why that's happening? ;If A If Not StringInStr(@ScriptFullPath, ".exe") = 0 Then ;If we are compiled then, ;If B If Not RegRead("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "PCVRFixer") = @ScriptFullPath Then ;Check if we are running on startup. If not then, ;Lets ask if the user wants to run us on startup, and offer to not bug them in case their answer is final. ;If C If Not RegRead("HKLM64\Software\OpenGenerationSoftware\PCVRFixer", "Asktorunonstartup") = "NoMore" Then ;Make sure the user hasn't already told us not to ask again. If they have not then, ;If D If Not IsDeclared("Startup") Then Local $Startup ;Declare Local $Startup ;Ask the question. $Startup = MsgBox(262179,"Would you like to add VR Fixer to startup?","Hi! PCVR Fixer has noticed that it's not running on startup. If you add it to startup, you won't have to run tihs program, making it set and forget software. Would you like for PCVR Fixer to add itself to startup? If you slect No, the program will ask next time you run it. " & @CRLF & "If you click 'Cancel', it won't offer to add itself to startup again. ") Select Case $Startup = 6 ;Yes RegWrite( "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "PCVRFixer", @ScriptFullPath ) Case $Startup = 7 ;No ;Nothing. We do nothing if te user clicks no. Case $Startup = 2 ;Cancel RegWrite( "HKLM64\Software\OpenGenerationSoftware\PCVRFixer", "Asktorunonstartup", "REG_SZ", "NoMore" ) EndSelect EndIf ;If A EndIf ;If B EndIf ;If C