Skip to main content

All Questions

3 votes
1 answer
3k views

batch current directory when starting as administrator

Background: I like to have my computer clean. Especially I don't like programs and services starting with my windows, but I still want to use all my programs without having to manually start ...
Zaheylu's user avatar
  • 697
0 votes
1 answer
6k views

cmd error "The system cannot find the path specified."

I am getting this error when I am doing a cd into a directory I stored in environment variables. But the thing is, when I cd into the same directory using the same ev using vim, I can successfully cd ...
dw19's user avatar
  • 1
0 votes
0 answers
361 views

How to tell whether machine is on AD Domain when running as SYSTEM

I have a batch script run as the SYSTEM user, and I need to find out whether the machine is on an AD Domain or not. I don't know, or need to know, the AD Domain name, just whether it's on any AD ...
FrinkTheBrave's user avatar
0 votes
1 answer
249 views

Is there a way to reverse lookup which executable is being called?

I have multiple JDK's installed on my machine and I'm running on a system that has a pretty long path environment variable. Is there a way to see what my call to java resolves to? I'm looking for ...
jessehouwing's user avatar
1 vote
1 answer
5k views

Windows - How to use user defined environment variables in system path

As the question states, I have some variables defined in my user environment in windows 8.1. Now I want to have something like this as a path: C:\Program Files (x86)\Intel\iCLS Client\;%USER_V1%;C:\...
smac89's user avatar
  • 416
1 vote
1 answer
460 views

Batch script to take the output of a command and create a variable out of it?

For example, I want to search for a file where /r C:\ "myfile.txt" and then make the output of that command which would be the file path to "myfile.txt" a variable I choose, So then the path to ...
Cornbeetle's user avatar
  • 1,360
0 votes
1 answer
3k views

Why are the PATH environment variables handled differently when I run cmd.exe as admin?

Original post: When I start cmd.exe normally, my PATH variable only contains the paths from the system environment variable. Only when I start cmd.exe as admin does PATH contain a concatenation of ...
ctusch's user avatar
  • 219
3 votes
2 answers
2k views

Name "wmplayer" is not recognized as an executable file

I cannot run wmplayer from either cmd or PowerShell. My OS is Windows 7 64 bit. I can do it using start wmplayer but I cannot use parameters. Please, help me to handle it.
enedil's user avatar
  • 155
0 votes
0 answers
253 views

Driving me crazy. SETX /?

Rosalee is no longer a user, but her name remains everywhere. I am thinking of exporting the registry and performing a Find/Replace on all Rosalee's or trying to use setx, but I cannot figure out the ...
user avatar
2 votes
1 answer
2k views

Why doesn't environment variable get updated in cmd without restart?

CMD commands: setx SOMEVARIABLE "newpath" /M setx SOMEVARIABLE "%SOMEVARIABLE%;newpath2" /M Expected output on ECHO %SOMEVARIABLE%: newpath;newpath2 Actual output: %SOMEVARIABLE% Actual value ...
John Nevermore's user avatar
1 vote
2 answers
3k views

How put path changing .bat file inside %PATH%?

I have a problem described here (you can read it for better understanding). I need to write .bat file that change path. For example: While sending a command in cmd: cd ~ I want to go to %HOMEPATH%. ...
honkingForMoreSleeptime's user avatar
0 votes
2 answers
1k views

IF statements in batch files

I am currently using Cruise Control to schedule 'builds' for various internal websites. I use batch files to kick off each of these 'builds' (build meaning a specific webhelp output). Let's say ...
Richie086's user avatar
15 votes
1 answer
25k views

Why unload variables in Windows batch files

Is it considered necessary or good practice to unload variables used in Windows batch files? For example in the following code, is the set myFolder= at the end necessary? @echo off set myFolder="C:\...
ChrisB's user avatar
  • 1,626
4 votes
1 answer
128 views

Using a system variable with spaces without truncating prematurely

I need to do something similar to this: dir > %USERNAME%.txt But what I get is that if the filename has a SPACE(" ") in it, then the name is cut there. I know that if I do this: set tmp=%...
Diga's user avatar
  • 43
2 votes
5 answers
14k views

How to set the arithmetic precision in "set" batch files variables?

How do I set a precision to the SET arithmetic operation on divisions? eg. SET /A t=3/4 But that gives result as '0' and not '0.75' ( I want at least 2 decimal places ) Or is there any other ...
Irfan's user avatar
  • 241

15 30 50 per page
1 2 3 4
5