Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
The problem I have is that when stepping through the code using F11, it performs the elevation, but then on the next statement says "Can't continue debugging: Script has been modified".
Now I'm not modifying it, I'm just stepping through it. I've been programming in WB a long time, so you can assume the basic troubleshooting steps have been followed before I wrote this. Yes I have all of the elevated rights you need to run wntRunAsUser; I have all of the account information entered properly; and I have reproduced this on any machine which runs Winbatch. Seems like a WBStudio "feature".
Interestingly enough, I can turn on debug(@ON) and it'll step through my code just fine, but F11 debug doesn't.
WinBatch 2004A Jan 8, 2004
The function wntRunAsUser causes the script to run under the new user environment. WinBatch Studio (when in debug mode) recognizes this shift and attempts to notify you.
A similar issue arises with a RunWithLogon script that re-launches itself with elevated permissions.
When using 'Run As' functionality, I prefer to use DebugTrace (@on,"Trace.txt") to debug.
Article ID: W16531
File Created: 2005:02:18:12:21:16
Last Updated: 2005:02:18:12:21:16