Jump to content

XenonKilla

Member
  • Posts

    18
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About XenonKilla

Profile Information

  • OS
    Windows 7 x86

XenonKilla's Achievements

2

Reputation

  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 my computer, I completely forgot about NirCmd
  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 changed and Windows Defender is now Disabled. So obviously I know RunAsSystem can get the job done, however the hard part is getting this to work in a batch script. When I say it doesn't work, I simply mean that everything executes as expected, however, the registry value just never gets changed. I've tried this... From a command window (as admin)RunAsSystem reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender" /f /v DisableAntiSpyware /t REG_DWORD /d 00000001No errors are given and everything executes as expected, however, the DisableAntiSpyware value isn't changed. I've also tried this... From a command windows (as admin)RunAsSystem test.bat(test.bat)reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender" /f /v DisableAntiSpyware /t REG_DWORD /d 00000001Once again no errors are given and everything executes as expected, however, the DisableAntiSpyware value isn't changed. And lastly, per your suggestion, I tried compiling with BATtoEXE (which I already use regulary BTW) and I got the same results as running with test.bat
  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 to launch a new command window and then run my reg add it works just fine. But I'm trying to get this all to run automatic without any user intervention.Ideas?
  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 remote systems rather than locally. I dunno if there is a workaround for this or if I just need to search for a new tool or what. Any ideas?
  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 using regini or subinacl to change the permissions of the key and they run the reg file but I can't seem to come up with anything that works. Any ideas?
  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 off cause I have an ssd and update was sitting there offering me something but I have it set ask. But I am injecting into install.wim I just need to figure out how to send mse a cmd to disable Yeah I hear ya. I wouldn't have thought that having Windows Update set to check for updates would slow me down while installing either but yeah it was bogging me down almost as bad if not worse than what you described MSE as doing. At least now you know though
  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...