I was browsing around and attempting to build a program with MS-DOS. I can't get the choice command to work in Windows 8, and I have browsed the internet searching for the problem and a solution. It seems that Microsoft has removed Choice from Windows 8 supported commands. Is there any way possible I can make this work? I also own a Windows XP desktop and I can make the codes on it, but I can't get them to run on Windows 8?
I accidentally set the file open of .bat files to Notepad. From a link in this forum (How to Restore Default File Extension Type Associations in Windows 8 and 8.1)was able to reset the registry back I think. The bat file not longer asks for notepad but instead opens "How do you want to open this file" and ask me to look for an app. The batch files still do not run.
I'm trying to create a NETSH batch file that sets my TCP/IP settings to DHCP.
The line I want to use is:
netsh interface ipv4 set address name="My Custom Named Network" dhcp
If I run the global cmd prompt and paste this line, it works as intended. However, if I create a batch file with the same line, I get "The filename, directory name, or volume label syntax is incorrect".This is bugging me plenty.
- Changed name to Connec8 - Compiled as exe. This is for the sole purpose to force Administrator privileges on double click - New icon - Administrator privilege check on startup. - Added option to restart the previous hotspot - Implemented an easier way to enable Internet sharing - Added blank lines for better readability
Download (dropbox) [URL] ....
Windows 8 is awesome. However it doesn't have the ability to create ad-hoc networks from Network and sharing center. The only way is to use netsh utility from CMD every time you want to start or stop your network. .
So I created a batch file to automate this process. All you have to do is to start it as administrator, follow the instructions and voila!. No need to open cmd again and again
This utility creates an adhoc network. You can use it for streaming Videos and Music or playing LAN games.
For Internet sharing aka Hotspot Go to Network and Sharing Center –> Change adapter settings Right click on the device which is connected to internet and select Proerties Now, open Sharing tab, enable Allow other network users to connect through this computer’s Internet connection, and then choose the newly created ad-hoc connection from the list
The attrib +s +h command that is used to make a file a system and hidden file is no longer working. When i try to use the command on a folder, the folder just shows up as a normal hidden folder which can be easily viewed using show hidden items in view option. It looks as if every system file is not recognizing itself as a system file.
Also every folder in my system has appeared a desktop.ini and thumbs.db folder.
-The first line sends the email. - The second and third use a program called Tail to delete all lines except the last one from the log file (the last line contains the output I'm looking for). -The next 2 lines then assign the contents of the log file to a variable then truncate the first 26 characters (date and time info that I don't need). -The next line creates a second variable that contains the desired output (i.e. "Mail sent successfully") -The next two lines echos the contents of the variables. -And finally, the last line compares the two variable and takes a particular action depending on whether the two variables are equal or not.
The comparison at the end is where I'm having problems. Every time I run the script, the last line I get printed on the screen is "Wrong" (i.e. the "Echo Wrong" command is executed meaning "Message" does not equal "Cmess"). This happens even when the email was sent successfully. I've tried various things and I haven't managed to get the "Echo Correct" command to ever execute, even when the output of the two Echo commands just before is exactly the same. I've even tried changing the "Set Cmess" line to:
Code: Set /p Cmess=<temp2.txt Set Cmess=%Cmess:~26%
And the output for the comparison is still "wrong". I can only think that there must be something wrong with how I structured the comparison.
How to get this script to work or script means of checking the log file for "Mail sent successfully"? This is what the log file contains if an email gets sent successfully:
Code: 07-Jun-2014 08:17:28.172: mailsend v@(#) mailsend v1.17b1407-Jun-2014 08:17:33.011: Mail sent successfully
I often format my laptop and uses virtual machine as well. So I had a batch (.bat) file to change all windows setting through registry. This batch file also changes command prompt screen size, buffer size and quick edit mode. However this does not work on Windows 8 command prompt setting.
Registry use to change the setting are: - HKCUConsole\%SystemRoot%_System32_cmd.exe - HKCUConsole\%SystemRoot%_SysWOW64_cmd.exe
Just wondering is there any way to change the setting in Windows 8 using batch file?
Every time I switch on my laptop I get a windows command processor black box pop up with writing in it i cant read what the writing says because it disappears quickly some one says its a virus or spyware. when i run a virus scan no problems are found and when i run a malware scan it says no problems. How can I get rid of it?
I accidentally installed an adware called Rocket tab however I uninstalled it but after restarting my computer, I am prompted with the following error message. Now, every time I start up my computer this message pops up .
I seem to be having a problem when command prompt needs to run anything as an admin.
This happens whenever it feels it needs to do so, like when setting a program to run as admin myself, or running an installer, like the setup for firefox (I'm in chrome right now, but I happen to prefer firefox)
Basically, whenever it needs to run anything, it'll open up to the user account controls window in this picture:
Upon clicking yes, it opens the command prompt you see in the left of the image for a split second, then closes. (it took many attempts to get a clear shot using printscreen, and I did edit it to have the UAC prompt in the same image to save space)
I'm guessing a manual regedit of some kind, as running any program is obviously blocked by the problem itself. (I cannot install any fixing programs, and anything that needs to run as admin to work is out as well).
I need to execute the command prompt as admin. When I try to do it the command prompt window doesn't open and there are no errors. If I run the command prompt without admin privs it works, but I then can't do what I need to do in the admin window.
Trivia question: max value for -w in ping command? I don't mean the max wait a ping can experience. I just mean the maximum value after -w on the command line that will not give an error. If they use a 32 bit integer then it's pretty big. But if it's only 16 bit maybe we're limited to 64k?
im getting random command prompts showing up then disappearing, and sometimes disabling my desktop and not allowing me to browse through folders saying paths dont exist, was able to sign out and back in to my account and was able to quickly open chrome to download hijackthis, and to post it to here. my problem is, i dont understand what it all means.
I have an hp laptop with windows 8, everything should be updated, and my spybot shows no problems.
Logfile of Trend Micro HijackThis v2.0.5
Scan saved at 1:30:40 PM, on 6/26/2014
Platform: Unknown Windows (WinNT 6.02.1008)
MSIE: Internet Explorer v11.0 (11.00.9600.17126)
Boot mode: Normal
C:Program Files (x86)Norton Internet SecurityEngine188.8.131.52NIS.exe
I am trying to elevate a command given (in this case just another cmd.exe) if the user is not admin. However i get the error:
C:Usersmetul_000>runas /user:administrator cmd.exe Enter the password for administrator: Attempting to start cmd.exe as user "WINDOWS8administrator" ... RUNAS ERROR: Unable to run - cmd.exe 1326: The user name or password is incorrect. C:Usersmetul_000>
This is a personal pc, and I know i put in the password correctly as i have done it a few times slowly typing in my admin password to confirm that it is input correctly. So why am i getting this error? Initially my overall goal is to get this python script to say you are admin ...
Code: import ctypes import subprocess import sys import os
if you are admin its done, but if you are not admin then it reruns itself with the so called run as command to get admin rights. However currently it just pulls up the run as usage messages. The full command this script attempts to run then is:
Code: C:Usersmetul_000>runas /user:administrator "python3 test2.py" Enter the password for administrator: Attempting to start python3 test2.py as user "WINDOWS8administrator" ... RUNAS ERROR: Unable to run - python3 test2.py 1326: The user name or password is incorrect. C:Usersmetul_000>