Why cant i get this simple codesample working, yes it does wat it must do but the result are not good. Kix32 gives me "ERROR : failed to find/open script!" even when i hardcode the same command line in de code it doesnt work, why?
If $CmdLine[0] < 2 Then Exit(1)
runKix($CmdLine[1], $CmdLine[2])
Func runKix($context, $script)
If $context == "/adm" Then
RunAsSet("administrator", @LogonDomain, "password")
$cmd = "kix32.exe " & $Script
MsgBox(4096, "Debug", $cmd , 10)
; 0 -> Do not display RunWait errors
Opt("RunErrorsFatal", 1)
RunWait($cmd, ".")
; Reset user's permissions
RunAsSet()
Exit(0)
EndIf
EndFunc