waster656 Posted September 12, 2011 Share Posted September 12, 2011 Guys, I wonder if anyone can help. I have written a simple script to set the Windows XP power policy using the "Powercfg.exe" command line utility. If I run the script using the "Run" command everything works OK, however if I run it using the "RunAs" command it doesn't seem to work. My command line is as follows: RunAs($sUserName, @ComputerName, $sPassword, 0, 'powercfg.exe /setactive "Always On"', @SystemDir) Can anyone help or suggest an alternative please? Link to comment Share on other sites More sharing options...
Manko Posted September 13, 2011 Share Posted September 13, 2011 Maybe a stupid question; You do have full path to executable in your code? It is specified you should include it. (In helpfile...) /Manko Yes i rush things! (I sorta do small bursts inbetween doing nothing.) Things I have rushed and reRushed:* ProDLLer - Process manager - Unload viri modules (dll) and moore...* _WinAPI_ProcessListOWNER_WTS() - Get Processes owner list...* _WinAPI_GetCommandLineFromPID() - Get commandline of target process...* _WinAPI_ThreadsnProcesses() Much info if expanded - optional Indented "Parent/Child"-style Processlist. Moore to come... eventually... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now