Jump to content
Corsair Community

Run .Bat File?


rosscolcoo

Recommended Posts

Hey all,

 

I'm unable to run a .bat file using actions in iCue. It's a simple script that asks you if "you are sure" you want to sleep the system. So in case I accidentally hit the button it just brings up a command prompt instead of sleeping the system accidentally.

 

Halp!

Link to comment
Share on other sites

Can you elaborate, are you talking about a macro?
I'm clicking "Actions" then "Run the following program" then putting in the path to the .bat file.

 

This does not work. It will not open any .bat file even though it clearly states "*.exe *.bat & *.cmd" as acceptable files to have.

 

I am running the latest version. 3.7.99

Link to comment
Share on other sites

hey rosso, you are correct sorry i thought this had been fixed. the bat file does not work at all in this icue version either and this has been happening since before.

 

You can use the following workaround in the meantime although it is conviluded(sp?) and probable there is a better way:

 

Add this to the launch application line for example:

c:\users\username\desktop\acrun.exe "c:\users\username\desktop\test.cmd"

 

I made this batch file and saved it to the desktop i made it a .cmd but it could be a bat if you like i think it would work even as a ps1 but have not tested (you might need to run powershell first in that case):

@ECHO ON
ECHO HELLO
Timeout /t 3
EXIT

 

I made this AHK file and compiled it once, or if you like you can download it at the link below and save to your desktop:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input
SetWorkingDir %A_ScriptDir%
;"C:\Program Files\SketchUp\SketchUp 2018\SketchUp.exe"
;c:\Users\username\Desktop\acRun.ahk "C:\Program Files\SketchUp\SketchUp 2018\SketchUp.exe"
fullPathToExecutable=%1%
SplitPath, fullPathToExecutable, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive

IfWinNotExist, ahk_exe %OutFileName%
run %fullPathToExecutable%
;MsgBox %OutFileName%
IfWinExist ahk_exe %OutFileName%
WinActivateBottom ahk_exe %OutFileName%
return
Exit

 

you will need to install a recent version 1xx of Autohotkey if you do not use the exe. Link http://www.smithany.com/acRun.exe

 

That worked for me anyways. As to the re plug necessity you might want to try the bios settings and make sure legacy is disabled? sometimes using usb 2 or 3 can make a difference for some or even sometimes updating the bios drivers (but that is a last resort)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...