How to disable remote assistance using batch file - windows

I am trying to disable remote assistance through batch file. But following code is not working. Is there any problem with this command?
#echo off
#echo Disable remote assistance
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v "fAllowToGetHelp" /t REG_DWORD /d "0" /f
pause

When I toggle the option in System Properties it is editing the key in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Remote Assistance

Related

Inserting variable into registry path

Im trying to the add the main program into my system startup using only variables. I've tried doing this:
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /V "My App" /t REG_SZ /F /D "C:%path%"
but I get a syntax error
Is there a way to fix this?
Thanks

Access Eventcreate parameter

I have a problem.
I create a Windows Event with the command:
EVENTCREATE /T INFORMATION /L APPLICATION /so BlahBlahBlah /ID 999 /D "%1 %2"
this event will trigger a .bat file. Is it possible to access the two parameter from the description (after the /D) in the .bat file?
Edit:
thank you,
Blue

Windows batch script reg add crashing

I am making a batch script and I am having trouble with this line
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f
When that line runs, the command prompt window closes suddenly. This line is supposed to turn on automatic updates. Thanks for your help.
The command you've shown should work okay, at least in the meaning of any syntas error.
The problem, as per you described in the comments, maybe is that you are not taking into account that when a script has finished, the window has any reason to still open. Or in other words, when all the sentences of you're script are done, the window closes "suddenlly" (the program ends execution).
To pause the batch execution, just use the PAUSE command as follows:
#Echo Off
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f
PAUSE
Exit /B 0

VS2013RC requires IE10 but i need (not want) IE8

I've been evaluating the VS2013preview since its release and was keen to install the RC. The problem is we need ie8 for legacy testing as many customers out in the field still use it.
As a possible workaround would it be possible to either, skip or fool the install package into thinking its installed? or install ie10 and then drop back to ie8 after installation?
I appreciate there may be some areas of things like browserlink to ie that I cannot use but this is OK as I mostly use chrome for initial dev work prior to testing in the various browsers.
Credit goes to Jimmy here, but here's a hack to make it work:
#ECHO OFF
:IE10HACK
REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer" /v Version /t REG_SZ /d "9.10.9200.16384" /f
REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer" /v svcVersion /t REG_SZ /d "10.0.9200.16384" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v Version /t REG_SZ /d "9.10.9200.16384" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v svcVersion /t REG_SZ /d "10.0.9200.16384" /f
GOTO EXIT
:REVERTIE
REG DELETE "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer" /v svcVersion
REG DELETE "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v svcVersion
REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer" /v Version /t REG_SZ /d "8.0.7601.17514" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v Version /t REG_SZ /d "8.0.7601.17514" /f
GOTO EXIT
:EXIT
The problem is you're trying to use the same machine for developing and testing. Don't rely on the local copy of IE on your machine for testing a legacy browser, instead rely on virtual machine copies of Windows and run that specific browser.
If you want a quick & dirty way to test your stuff in specific versions of IE use the IETester as mentioned by others in the comments. http://my-debugbar.com/wiki/IETester/HomePage
You might want to consider simply using a virtual machine to run a copy of Windows with IE8 in it for your testing, since you don't really use it for day to day stuff anyways.
Microsoft announced yesterday that they are removing the requirement.
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/4153040-remove-the-requirment-for-internet-explorer-10-to-

How to set value in registry via batch file in Windows?

I am going to set a value to windows registry.
I want to set variable shit for StupidMS in registry, but the result is wrong. Following is my code.
set stupidMS=shit
echo %stupidMS%
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v "StupidMS" /t REG_SZ /d ^%stupidMS^%
I think the problem is ^%stupidMS^%, but I quite have no idea how to correct it.
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v "StupidMS" /t REG_SZ /d "%stupidMS%"

Resources