Search found 55 matches

by Rami
15 Aug 2016, 07:49
Forum: Ask For Help
Topic: Run As Admin then I get error Topic is solved
Replies: 8
Views: 2051

Run As Admin then I get error Topic is solved

Hi, My script starts with: #Persistent #SingleInstance, force #NoEnv #Include StdOutToVar.ahk ; *** Force to run as Administrator *** if not A_IsAdmin { Run *RunAs "%A_ScriptFullPath%" ExitApp } To insure that the script will run as admin. But what happen is when the elevator popup message appears a...
by Rami
12 Aug 2016, 12:27
Forum: Ask For Help
Topic: Best way to make ahk scripts run at start-up with admin rights?
Replies: 11
Views: 20696

Re: Best way to make ahk scripts run at start-up with admin rights?

It should look like: RunWait, %A_WinDir%\System32\schtasks.exe /create /TN [TaskName] /TR [Path\To\MyScript.exe] OR ["c:\program files\AutoHotkey\autohotkey.exe" "PathTo\MyScript.ahk"] /RL HIGHEST /SC ONLOGON Edit*: Added OR , and my question :) For more info see Schtasks.exe But the question how ca...
by Rami
09 Aug 2016, 15:47
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

On the Desktop it worked for me too :)
I really appreciate your time with me today. I will test everything again tomorrow (with killing the processes) based on last one since this one worked.
Thank you again Capn Odin!!
by Rami
09 Aug 2016, 14:50
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

Try changing this line processes := StrSplit(StdOutStream("""" A_ProgramFiles "\Tools\Handle.exe"" ""C:\Users\A_UserName\$.MonitoredFolder"""), "`n") to MsgBox, % StdOutStream("""" A_ProgramFiles "\Tools\Handle.exe"" ""C:\Users\A_UserName\$.MonitoredFolder""") Edit: *The changes that i made is open...
by Rami
09 Aug 2016, 14:30
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

I really appreciate your time with me. It didn't work as we're expecting. I changed the line: processes := StrSplit(StdOutStream("""" A_ProgramFiles "\Tools\Handle.exe"" ""D:\Monitored Folder"""), "`n") into: processes := StrSplit(StdOutStream("""" A_ProgramFiles "\Tools\Handle.exe"" ""C:\Users\A_Us...
by Rami
09 Aug 2016, 13:46
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

Handle is a utility that displays information about open handles for any process in the system. You can use it to see the programs that have a file open, or to see the object types and names of all the handles of a program https://technet.microsoft.com/en-us/sysinternals/handle.aspx As Example, if I...
by Rami
09 Aug 2016, 11:01
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

FYI I just tried adding msgboxES to check where is the problem:

Code: Select all

Handle(output, index){
	RegExMatch(output, "(?<=pid: )\d+", pID)
	msgbox, %pID%
	Process, Close, %pID%
I'm getting blank msg ... I think this is why it doesn't work in my script.
Any idea why it is blank msg?
by Rami
09 Aug 2016, 10:08
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

MsgBox, % comspec " /k """ A_ProgramFiles "\Tools\Handle.exe"" ""D:\Monitored Folder""" MsgBox, %comspec% /k "%A_ProgramFiles%\Tools\Handle.exe" "D:\Monitored Folder" there was an error in the expression it was missing a space, but it will probably not solve your problem. No, it didn't. the same er...
by Rami
09 Aug 2016, 09:29
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

Seems it's working for me using your code with my code, noted that i deleted the line: #Include <StdOutToVar> because it was giving me an error on this line, Is that OK ? I think I was editing my post while you were answering, is it OK to delete the above line? One more questions please, should i k...
by Rami
09 Aug 2016, 09:24
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

unfortunately, both are giving one of the CMD error that i was getting,
seems it reads it without ""
Capture.JPG
by Rami
09 Aug 2016, 08:47
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

I'm still very new to AHK, so I apologize if there will be any crazy questions :) very new to the level that i just figured out (and still not 100% sure) that to use function i have to write it at the beginning of my script :crazy: Seems it's working for me using your code with my code, noted that i...
by Rami
09 Aug 2016, 07:39
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Re: Handle Tool & split CMD Output Topic is solved

Thank you for your response , I will test that in few ...
by Rami
08 Aug 2016, 15:17
Forum: Ask For Help
Topic: Handle Tool & split CMD Output Topic is solved
Replies: 18
Views: 2610

Handle Tool & split CMD Output Topic is solved

Hi, Actually I have few questions, answering any one will help me with my next step. I'm trying to monitor a specific folder for any changes, and i'm thinking about the action if the folder has modified. one of the action is detect the process who causes the change in that folder and kill it, found ...
by Rami
19 May 2016, 09:38
Forum: Ask For Help
Topic: Run, software.exe (Passing UAC)
Replies: 2
Views: 813

Re: Run, software.exe (Passing UAC)

Hi Nextron, The problem is not on all computers (350+) i can run my script as Administrator. I'm actually looking for another solution using AHK, but I will try (again) using schtasks to create task. I will need the script to run immediately, (I may use the CurrentTime as variable and schedule the t...
by Rami
19 May 2016, 08:16
Forum: Ask For Help
Topic: Run, software.exe (Passing UAC)
Replies: 2
Views: 813

Run, software.exe (Passing UAC)

Hello, I'm new in AHK, and actually feel sad because i'm so late knowing this cool scripting language. but so excited to learn it :) I started scripting with success in very simple scripts, but i'm facing problem running scripts that contains (Run, software.exe) on remote computers when the UAC is o...

Go to advanced search