All Questions
15
questions
2
votes
1
answer
175
views
How do I keep programmatic shortcuts visible in Recent Items?
Using this answer, I can create shortcuts (.lnk files) for various executables and folders.
When I use the Recent Items directory (C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Recent) in the ...
0
votes
1
answer
1k
views
Delete folder in registry entry
I have a question regarding the problem of deleting a folder of a registry path with a .bat or cmd shortcut, preferably a .bat.
Here is my problem:
I want to delete (for example) the folder "...
0
votes
1
answer
414
views
How to get user defined variables in command prompt like Tab is used to get items in current directory?
I am having more that 10 command to run on cmd. I created variables for whole command. e.g
set create_unit=run -data -logfile=log.txt
set run_data= run -input=test.xml -output=Test.html
To run ...
0
votes
1
answer
57
views
Is there a way to create a command prompt shortcut open as administrator and start in another drive and folder on that server?
I would like to create a cmd.exe shortcut that will open as administrator. I have already done this. The default place it opens is on the C:\Windows\system32. I want it to open on E:\\bin instead. ...
1
vote
2
answers
3k
views
Doskey alias command from a cmd shortcut not working
Opening a cmd prompt and manually issuing my custom doskey macro commands works fine, but I figured that I could save time by creating cmd shortcuts that invoke these commands automatically.
So, I ...
0
votes
0
answers
82
views
Windows security window not showing up when calling shortcut from bat file
I have a shortcut on the desktop which links to a folder on a server. So when I double click it, a security window pops up asking me for my username and password as shown below
Now I am trying to ...
1
vote
6
answers
6k
views
Way to open a folder from Windows Explorer in cmd.exe under Windows 10 with one shortcut?
I'm looking for a shortcut kind of way in Windows 10 to open cmd.exe with a directory/folder from the Windows Explorer, so that I have this specific folder as actual working directory in the command ...
0
votes
1
answer
86
views
Cannot set DNS using command shortcut
I'm trying to set DNS (both primary and secondary) for a network adapter using command prompt. So I created a windows shortcut with the following command:
C:\Windows\System32\netsh.exe interface ipv4 ...
14
votes
2
answers
15k
views
How can I make a Windows shortcut that launches Bash and runs commands?
I've created a windows shortcut with a target that looks like
"C:\Windows\System32\bash.exe" php /c/script.php
(I know I could just use my windows verison of php cli to run this, but out of ...
11
votes
7
answers
104k
views
Create a batch file or shortcut to PuTTY (ssh) that opens a session and runs a command
I often find myself opening an SSH session to run the same single command. I have everything setup to login without entering a password (Via SSH Key-Based Auth), so I wondered if there was a way to ...
6
votes
2
answers
15k
views
How to make two shortcuts: Enable+Start service & Disable+Stop any windows service?
But at this time I need only shortcuts for windows update service. I don't keep windows update service running all time but windows store needs windows update service running. I want to enable+start ...
0
votes
1
answer
2k
views
Batch code to display target of a desktop application shortcut
I have been working on expanding a basic batch to pull ip information to include other information relevant to my IT department at work. My department does troubleshooting nationwide for our Cisco ...
1
vote
1
answer
5k
views
CMD command redirection (pipes) in shortcut/link on Windows 7?
I'd like to run a Python 3 script silently on system start using a shortcut/link (.lnk) in Autostart.
Python's pythonw.exe will run as windowless process with my script only if piping stdout and ...
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 ...
-1
votes
1
answer
569
views
How to create a shortcut to run a command and then exit?
I was looking for something like this:
.bat or .exe file to run "ipconfig /renew" ONCE and then exit.
Im planning on making this an autorun cause windows wont identify the network on its own unless ...