Hi again... 
Well, i've gotten SU working properly now... but I cannot seem to get it working when i've bat2exec (v.1.5), and secure.exe'd it.. :/
What I wanted to do was from the main script decide whether SU needs to be used or not (if @INWIN = 1, user has admin privilegues?), if SU needs to be launched for a separate script to work properly, I copy that script to the users %TEMP% (always renaming it to "AdmInst.kix") from within my main script, and then call the bat2exec'd + secure'd batch which launches a new KiX process that executes the script, like this:
code:
@ECHO OFF
REM *** Make a copy of the local kix32.exe file, so that another session can
REM *** be started with the administrator account.
REM *** "CD" to make sure that the system finds XCOPY & SU/SUSS...
CD "%WINDIR%\System32"
IF NOT EXIST "%TEMP%\kix32.exe" XCOPY "C:\kix32.exe" "%TEMP%\" /D /H /I /R >NULREM *** Start the KiXtart script as <domain>\Administrator.
REM *** Environment variable "SU_PASSWORD" must be set, otherwise SU might mess up...
SET SU_PASSWORD=<password>
IF NOT EXIST "%TEMP%\kix32.exe" GOTO NOCOPY
IF NOT EXIST "%TEMP%\AdmInst.kix" GOTO NOFILE
ECHO <password>|su Administrator "%TEMP%\kix32 %TEMP%\AdmInst.kix" <domain>
GOTO END
:NOCOPY
ECHO Couldn't copy kix32.exe!
GOTO END
:NOFILE
ECHO Couldn't find the script!
:END
EXIT
This script works flawlessly before I bat2exec + secure it... Any ideas? 
[ 03 October 2001: Message edited by: masken ]