Jump to content

sno

Active Members
  • Posts

    21
  • Joined

  • Last visited

sno's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. My simple 3 line code that fails, any idea how to fix it? Or maybe to adress the xp firewall directly by a dll.... $objFwMgr = ObjCreate("HNetCfg.FwMgr") $objProfile = $objFwMgr.LocalPolicy.CurrentProfile $objProfile.FirewallEnabled = True
  2. Thx for the idea. One question tho, does compiling the wmi code into a AU exe require the pc to be wmi enabled?
  3. I espected this to be a simple question for some guys around, gues not. And I will be glad to get some help on this one if u have some free time wouter.
  4. No luck so far, i have found out that PDH.dll can give me some performance information. But as i posted b4 that goes beyond my understanding. Maybe some1 can point me a bit furder into the right direction? Thx.
  5. I would like to capture the cpu load of some processes. Depending on the average load (measured by a couple of samples) one action must take place. How do I take samples of the cpu load regarding a process?
  6. Guys! Excuse my stupid ness but i still don t know where to start. Can someone plz explain me how he or she develops a piece of code that calls a APi function?
  7. Dit u check the Macro Reference by any chance? @ComputerName or @LogonDomain
  8. Almost :-) $cmd = '"' & @LogonServer & '\netlogon\kix32.exe" "' & $Script & '"' MsgBox(4096, "Debug", $cmd , 10) RunWait($cmd, ".", @SW_MAXIMIZE ) This does the trick tho, man many thx for that """""" stuf!! Any idea where i can read about the syntax used (double "" and so on) i was looking for it in the help earlyer.
  9. I dont understand why it does not work, il be debuging some more when i get home. but for now all variations a tried fail (and i think i have tried quit a couple)
  10. Yes Yes, also tried variation as RunAsSet("administrator", @LogonDomain, "password") $cmd = "start " & @LogonServer & "\netlogon\kix32.exe " & $Script $cmd1 = (@ComSpec & " /c " & $cmd) Any idea? ANd yes i know that compiling the password is bad
  11. I am sry, i wants paying attention. I keep getting distracted here and the use of COM did my mind wander of in the direction of vbs.
  12. 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
  13. Thx for this nice sample, its a good alternative. But i really want to build a exe, this is more pointing in the direction of vbs. And as it is, some computers are not yet compatible whit running vbs code.
×
×
  • Create New...