Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×


  • Content Count

  • Joined

  • Last visited

  • Donations


Community Reputation

2 Neutral

About XenonKilla

Profile Information

  • OS
    Windows 7 x86
  1. Yeah I was pretty disappointed when PsExec didn't work when trying to run commands on a LOCAL computer without an active network connection. Then RunAsSystem looked promising but clearly lacks the ability to pass arguments to the process it's opening. But NirCmd definitely seems to do the trick just fine
  2. FINALLY! NirCmd did the trick! nircmdc runassystem reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender" /f /v DisableAntiSpyware /t REG_DWORD /d 00000001Out of all the dam registry tweaks I have in my script, this stupid Windows Defender key is the only one to give me trouble. You would expect the UAC key to have the same issues but of course that one can be modified with no issues lol. Now hopefully I don't run into any other issues like I did with PsExec Thanks to everyone for their help and especially jaclaz for suggesting NirCmd. As many NirSoft programs as I have saved on
  3. Yeah I'm using VMware Workstation to test. I'm working with a clean install of Windows 7 x64 and NOTHING modified. UAC enabled etc etc. I'm simply trying to disable Windows Defender with a batch script so that I can implement it into my "Tweaks" script that I've made. If I open a command window (as admin) and run this... RunAsSystem cmd This obviously opens a new command window as SYSTEM. So now if I run my reg script reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender" /f /v DisableAntiSpyware /t REG_DWORD /d 00000001 Then everything works great. Registry value gets chan
  4. Well I tried creating TWO bat files. My first one uses this command... test1.bat RunAsSystem test2.battest2.bat reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender" /f /v DisableAntiSpyware /t REG_DWORD /d 00000001This didn't work either. So I guess RunAsSystem won't work for this situation then. If it only opens the process but doesn't pass any parameters to the process then it's pretty much useless for this situation. At the very most I would have to launch the cmd process from my original batch file and then manually type the reg add command. Ideas?
  5. Yeah I tried that before and upon your suggestion I tried it again, however, I'm having the same issue as the first time I tried which is that I can get it to launch a command window as SYSTEM, however, I cannot get it to pass a command to that new command window with the same batch script. Here's what I've tried... RunAsSystem reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender" /f /v DisableAntiSpyware /t REG_DWORD /d 00000001RunAsSystem cmd /c reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender" /f /v DisableAntiSpyware /t REG_DWORD /d 00000001If I use RunAsSystem
  6. Looks like I spoke too soon. I just discovered an issue today when I was rebuilding a system and doing an OS install from scratch. My script worked fine however PsExec would not run because the computer didn't have a network connection enabled. The computer has a network controller however the drivers weren't installed yet so this was causing PsExec to throw this error... I was running the exact code I listed above locally so I dunno why it would throw this error. I'm assuming it just has something to do with the way PsExec works being that it's a tool targeted for running commands on rem
  7. I recall many times where I start a thread and figure out the answer before posting. Sometimes, going over the problem whether typing it out or talking to someone, will put some new idea in your brain and sometimes that is all you need. I know right! I ALWAYS make sure to post as a very last resort. I searched for almost 2 hours and was like OK I'm just gonna post up and see if anyone knows. Then I posted and decided to hit Google a little bit more and finally came across what I needed
  8. Figures, I spent like 1.5hrs trying to get this to work and no sooner than I create this thread I figure it out Well just in case anyone runs across this via search in the future, turns out you have to use DE instead of D but for some reason the Icacls reference page doesn't show there being a DE parameter. icacls MyFolder /deny Administrators:(oi)(ci)(de,dc)
  9. I'm trying to set deny "delete folder" and "delete file" permissions on a folder and all of it's contents. So far here is what I have come up with... icacls MyFolder /deny Administrators:(oi)(ci)(d,dc)This sets the deny permissions correctly however I cannot even access the folder after setting permissions this way. If I set the deny permissions manually then it works fine. Any ideas?
  10. Worked great!! Thanks!! Here is what I ended up with... PsExec -accepteula -s reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender" /f /v DisableAntiSpyware /t REG_DWORD /d 00000001
  11. I've got a registry script I made that I run after every new clean install of Windows which makes several changes to the OS enables/disables features, tweaks the interface etc. I've got ALL my tweaks in the file working EXCEPT the Disabling of Windows Defender. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender]"DisableAntiSpyware"=dword:00000001I know this isn't working due to a permissions error being that the Windows Defender key is owned by SYSTEM and Administrators or User don't have sufficient privileges. So I'm in search of how to script around this issue. I was thinking perhaps
  12. For Clean Installs, I've created an AIO Thumbdrive that has WIndows 7 x86, x46, and Server 2008 R2 which has all current updates already slipstreamed into the AIO WIM. For systems with Windows already installed I have a folder with updates where I can just run a batch file to process the updates manually. For NET Framework updates I keep a separate folder with those updates and process those via batch file as well. Dam PITA Updates
  13. Is that marvellous adviceonly if you intend to install updates from a batch script if you intend to run any batch script best practice for running Windows. Are you insinuating that I was implying that those items should be left DISABLED all the time? I've been around since pkgmgr.exe injecting updates. Early mse did not slow me down this bad. But I install a lot of software and a boatload of tweaks and modded files and such so I ididn't know if it was a combination of any of those. Only way is start clean and add things and test. It was plain and simple MSE was it alone cause restore is o
  14. Yup tried to tell you that it don't take that long. Why you think I started this thread? I don't know how that didn't dawn on you sooner having the AV turned on like that. It's best to just DISABLE all of the following... - AntiVirus - System Restore - Windows Update
  15. I've actually created a batch script which uses DISM to integrate the updates. The main part of the script that does all the integrating is... dism /Image:%mnt% /Add-Package /PackagePath:%updates% I've got the following amount of updates that I currently integrate... Win7 x86: 104 Updates Win7 x64: 103 Updates Server2008 R2: 96 Updates Takes about 20 minutes per OS Version to integrate updates this way.
  • Create New...