I am trying to create a post install task that will start a program and leave it running and continue through the rest of the post install tasks.

I have tried uploading the file (ShiftTABEnter.exe) as an application and then used the commands below:
Start ShiftTABEnter.exe

This does not run because it fails execution with the Error Description: The system cannot find the file specified.

ShiftTABEnter.exe
This command will run the .exe and the tasks stop running until I close the program.
Start "" ShiftTABEnter.exe
This does not run because it fails execution with the Error Description: The system cannot find the file specified.

I am trying to run it this way as to not generate a "Run" security prompt.

Bonus Info: The program I am trying to run was created in autoit with the intentions of hitting "Shift + Tab" then "Enter" to get through the security prompts (pesky run button) for bat files out on the network. I tried everything I could think of, but could not get those pesky boxes to go away.

P.S. Windows 10 Build 1709 is giving me headaches

Here is the code to the Autoit Script in case anyone else is interested:
while 1
Opt("WinTitleMatchMode", 2)
WinWaitActive("Open File - Security Warning")
Sleep(50)
Send("+{TAB}")
Sleep(250)
Send("{ENTER}")
Sleep(50)
WEnd
2 Comments   [ + ] Show Comments

Comments

  • Do you have an example for one of your post-install tasks that causes the "run" security prompt you're talking about? I have dozens of post-installer tasks on the 1709 build and haven't seen what you're describing.
  • This was happening because I had install files located on the network and it would not run the files from the network because they were not trusted. If you have a way for me to make them trusted, through scripting that would be great. I found a clunky work-around for now.
Please log in to comment

Answers

0
I ended up just writing a script that copied this program to the startup folder.

This is the command I used in the bat file:
C:\Windows\System32\xcopy.exe "%~dp0ShiftTabEnter.exe" C:\ProgramData\Microsoft\Windows\"Start Menu"\Programs\StartUp /q /y 

I put the program and the bat file in a zip folder and uploaded that as an application with the command line just being the bat file name:

CopyToAllUsersStartup.bat



Then I just created another bat task at the end to kill the program and delete it off of the computer:

TASKKILL /F /IM ShiftTabEnter.exe

del "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\ShiftTabEnter.exe"

Answered 02/07/2018 by: ISEKOLD
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity