Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
Spaces are supported have you actually tried using the example I provided, you only need to change the paths and names etc. to suit your own. @REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v TestEntry^ /d "CMD /C START \"\" /DC:\Users\Yz”wl\ \"E:\File Name.bat\"">NulThe above has been tested successfully by me. However, I see little point in using the start command path switch for setting the working directory of a batch file, that could be set directly in that batch file.
-
batch script to run reg keys
Yzöwl replied to JayDogg's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
I'm a little busy ATM, so I'll take a look at your problem when I've got more time. Until then, see if this 'floats your boat' -
Here's a batch file example not using fsutil as above. To use it use your file size in bytes as the first parameter and optionally your chosen filename as an additional parameter. e.g. dummy.cmd 213 MyDummy The filename DummyFile will be used if you elect not to include the second parameter. dummy.zip
-
You need to get them to remove these: O4 - HKLM\..\Run: [prunnet] "C:\WINDOWS\system32\prunnet.exe" O4 - HKCU\..\Run: [prunnet] "C:\WINDOWS\system32\prunnet.exe"Both of them!
-
batch script to run reg keys
Yzöwl replied to JayDogg's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Change the name of your script, preferably to something which is also not the name, (without extension), of an existing file in %Path%. Instead of: Del %0You could also use this as your last line: Start/b %Comspec% /c @Del "%~f0" -
batch script to run reg keys
Yzöwl replied to JayDogg's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Try the attached. fixed.zip -
batch script to run reg keys
Yzöwl replied to JayDogg's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
This should do: @Reg add "HKCR\Directory\shell\Command Prompt\command" /ve /d "cmd.exe /k cd \"%%1\"" /f>Nulor as I said before @Reg add "HKLM\SOFTWARE\Classes\Directory\shell\Command Prompt\command" /ve /d "cmd.exe /k cd \"%%1\"" /f>Nul Incidentally .bat is for legacy use and for your purposes is not required, you should rename those .bat files to .cmd. You can run scripts from another either directly using the Start command or using the Call command. -
batch script to run reg keys
Yzöwl replied to JayDogg's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Technically you shouldn't add things directly to HKEY_CLASSES_ROOT, this key is mapped from HKEY_LOCAL_MACHINE\SOFTWARE\Classes, so you should add it there as a rule. If it makes it easier for the explanation then we'll use this: @Reg add "HKCR\*\shell\Open with ResHacker\command" /ve /d "\"C:\Program Files\ResHacker\ResHacker.exe\" \"%%1\"" /f>Nul The preceding @ is there to prevent the following command from being echoed to the console window. The key name is in double quotes because I used one or more spaces in its name. /ve is used to add a blank/default value name which is what you're after this is shown as @ in a reg file and (Default) directly in the Registry Editor Backslashes are used to escape the internal double quotes. Because the value data string is contained within double quotes we need to make sure that those containing quotes are maintained and read correctly by reg.exe /d "\"C:\Program Files\ResHacker\ResHacker.exe\" \"%%1\"" The additional percent, (%), is used to to escape a single percent as required in batch files. You'll note it usually in a For loop, when you'll require a single one directly in the console [For %A In (], but in a batch file doubling up is required. [For %%A In (] I hope this helps you a little. -
Try running the attached batch file and see if it helps. Here's what I see with it: I Hope it helps vgsangiuliano.zip
-
batch script to run reg keys
Yzöwl replied to JayDogg's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
This one has been tested to add the appropriate entry too! yourtest.zip -
batch script to run reg keys
Yzöwl replied to JayDogg's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
It may not work for you, but it works on all of my systems running three different Operating Systems. Did you try rebooting or restarting explorer.exe in order for the context menu entry to be added. If you are running Vista you will need to run the batch file as administrator too because you will not have access to that branch of the registry. There is a common theme here, your 'working' exported reg file isn't working and my '100% definitely working' script isn't either. If the above advice doesn't work for you, then I'd suggest you start to provide us with a lot more information to work with. -
Go here, and read! Pay particular attention to 12. and 2.a. Then try again, thank you. Topic Closed.
-
batch script to run reg keys
Yzöwl replied to JayDogg's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
reshack.cmd @Reg add "HKLM\SOFTWARE\Classes\*\shell\Open with ResHacker\command" /ve /d "\"C:\Program Files\ResHacker\ResHacker.exe\" \"%%1\"" /f>NulThis is a single line so replace any carriage return with a single space if wrapping occurs. -
[Help] Batch - Remove Trailing Space
Yzöwl replied to twig123's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Well your biggest error was that you'd have needed to enable delayed expansion! Here's an alternative @Echo off&Setlocal enableextensions For /f "delims=" %%# In (FileList.txt) Do Set "Ifiles=%%~#"&&Call :SUB %%Ifiles%% Goto :Eof :SUB Echo:"%*">>CorrectedFiles.txt -
Stopping services
Yzöwl replied to cyber_killer's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Okay, although it appears to me that this is pretty one-sided affair! Goal: Check to see if the user has logged on successfully to a Domain. If so, Stop the non-required service Method: Parse the output of NET CONFIG WORKstation If LOGON DOMAIN is not the same as the FULL COMPUTER NAME then the user is logged onto a domain and the service is stopped. There may be other ways to do it, but since the information you provided was sparse, I was unable to provide anything better. -
Stopping services
Yzöwl replied to cyber_killer's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Here's a quick idea using a Windows NT Command Script: this is most likely English Language dependant @Echo off&Setlocal enableextensions (Set FW=ServiceName.ext) For /f "tokens=3*" %%a In ( 'Net Config Work^|Findstr/ib /c:"Full Computer Name" /c:"Logon Domain"' ) Do If %%b' Neq ' (Set C_=%%b) Else (Set D_=%%a) If /i %D_% Neq %C_% Net Stop %FW%You'd need to change ServiceName.ext in line 2 to the name of the service you need to stop. -
Stopping services
Yzöwl replied to cyber_killer's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
More information is required, if you want help you must be willing to provide sufficient information for us to work with! -
Well although I'd readily hold my hand up to this had it been me, I actually agree that the topic should have been placed in that correct Forum area initially. Just because you decide to distance yourself from the computing world with your choice of Operating System, doesn't mean you should distance yourself from the other Forums too, you are free to visit them all. Why do you think we have a Software Hangout and a Malware Prevention and Security Forum. If all users of specific OSes confined all related questions to their own OS Forum group there'd be no need for them. As an additional note, I don't think that the Administration team should be 'forced' to have to account for every decision they make, I'm sure that most of us are happy to attempt explanation for our actions but forcing the issue I feel is unnecessary. If you actually knew how much work our Moderators etc. put in to making this the Best Forum on Earth, you'd understand why additional 'forced' impositions would be a bad idea. Most of us do try, time permitting, to include an inline note or additional post if they feel it's necessary although sometimes it does slip our minds. We'll take your post 'on board' however and at least try to minimize our number of 'slip-ups' in future. Thank you.
-
My first thought, without looking at the individual entries in your log is that you need to do some serious housework on your PC. You've got far too much unnecessary stuff auto-running and wasting resources and if you prune those down you may just find that you've removed a potential conflict. Incidentally since portable versions of Chrome and Firefox are available you could use either of those as a test to see if something is blocking the executables.