Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Cannot run an exe file in RunOnce

$
0
0

I put a ps1 file in HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce on a Windows 7 PC with powershell 1.0

The file include a few exe files. After logging in, the ps1 script run all the exe files OK except one that shows AutoIt Error:

Line -1:

Error: Subscript used with non-Array variable.

I tried to put only one line in the script just running this exe file and got the same error.

I tried to run it with no luck by using

C:\app.exe, &C:\app.exe or Start-Process C:\app.exe

However I can manually run this ps1 file or exe OK


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>