|hi nbrane, thanks for your reply.|
I have set pause to debug and find out this is the line that causes the script to exit. This line appear in the beginning of the script which is to verify current user account and store to this nowuser variable and would be compared to a local variable useradmin before proceeding to other tasks.
This script is to be run only in admin account and this check is to prevent the script to be run from other user account.
I have manually entered 'call who' in command prompt and it managed to output administrator as the first token. I guess its the script unable to store this token to nowuser variable. So how do i proceed from here?
This batch file has been set full control access under admin account and is already running admin account.