Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Here's the problem. I need to disconnect a network share using:
net use X: /delete /yes
I get the error "The device is being accessed by an active process."
No amount of scripting seems to let me get past this but if I simply open the My Computer and right click on the X: drive and hit disconnect, it works without a hitch. I don't understand why I cannot do it from a command window but I absolutely need to within a script.
This is Windows Server 2003
Even if I could determine what processes to kill, that may be a way out. I don't know.
Any help would be greatly appreciated!
For posterity, even though I could NOT disconnect the network drive with the Map use /delete method, I WAS able to create a cscript file as follows:
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.RemoveNetworkDrive "E:"
Why this works is beyond me. But it does. I did the entire script in VBS instead of a CMD file but, of course, you can mix them.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 10 months ago.
Improve this question
Three or four times recently, I've tried shutting down my Windows 10 PC, only for it (mysteriously) to instead go back to the normal Windows login screen. And when I then try to shut the PC down from there, it (again mysteriously) warns me that this will shut down any connected users' sessions (but without giving any useful details).
All of which makes suspect (in a slightly paranoid, but probably justified way) that someone else might possibly now be logging in to my PC from time to time.
So: is there anything (i.e. application / trick / hack / whatever) I can use to find out / track who (or what) is currently (remotely) logged in to my Windows 10 PC?
Because I work from home, I guess it's conceivable that a client company's firewall / antivirus bot is doing something nasty (but legit) that I'm unaware of. But... I'd just like to know. Thanks!
Type query user in a command prompt. No need for elevation.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I tried to run a program called MSIAfterburner with no windows
But nothing works
I tried
Quiet.exe
Nircmd.exe
I tried some python scripts and JavaScript & Powershell and VBS. And every time it was showing the window of the program
Can somebody help me?
Neither quiet.exe nor nircmd.exe come with windows by default. I believe this MSIAfterburner program you are referring to is a graphics overclocking utility, which is a windows application, as opposed to a console application.
Therefore, if you for whatever reason want to run it without a window, the easiest way I can think of would be to launch the program in a different session using psexec -i 0 (run it as admin) from here.
If you want to run it without a window without admin privileges, the best I can think of would be to use the winapi ShowWindow(handle_to_the_app_main_window, SW_HIDE).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I´m using a school computer, so I don´t own administrator permissions.
anyway I want to launch the command line, but since the school pc´s are restricted I don´t have the permission to install or launch software like terminal, powershell, system settings.
I´m sure that somehow I can create a batch file that allows me to open the shell, but since I don´t know DOS, I don´t exactly know how.
please help me, I´m not a hacker and don´t wanna damage the school computer system, It´s for ethical purpose only, but it could be useful to hit on girls XD.
Ok, I found it:
#echo off
:loop
set /p _cmd= “%CD%>”
%_cmd%
goto :loop
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a logon batch script that runs a .reg file for all user when they log in. here's my script
#echo running
REGEDIT.EXE /S "C:\user_files\user.reg"
Now my concern is that the batch file itself is located in
C:\Windows\System32\GroupPolicy\User\Scripts
Every user has access to this directory. So anyone can change the batch and may cause security threat. Is there a way to make it more secure. or is can I do something similar with PowerShell scripting so there's no batch. If someone could point me to the right direction would be very helpful.
your script needs to be readable by your users, but you can take away their rights to modify it -- that's a typical file system feature that every Windows since NT has (aside from windows 9x, of course).
Hence, simply remove the write privileges from the user group in which your users are, and you're fine.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm facing a strange issue, when I executed the following command in a CMD.exe, will get different result in diff WKS. All WKS are windows-xp sp3.
c:\> echo %temp%
one is: C:\DOCUME~1\HWU\LOCALS~1\Temp
the other is: C:\Documents and Settings\HWU\LOCALS~1\Temp
I know, both results are the same position, but the second one will block our some batch file and I cannot modify batch file.
So how can I modify some settings let result looks like the first one?
Would anyone please advise?
Thanks a lot!!!
You need to manually adjust the %TEMP% variable for all user profiles on the host in question.
After you did that, check the value of NtfsDisable8dot3NameCreation in the registry key [HKLM\SYSTEM\CurrentControlSet\Control\FileSystem] on that host. Change it to 0 in case it's set to 1 (requires a reboot). That doesn't fix the exisiting %TEMP% variables (those are static after being created during profile creation), but it will prevent future profiles from being created with non-8.3 paths in the %TEMP% variable.
Still, I'd strongly recommend to get your scripts fixed. It's the solution to the root-cause of the problem.