Creating windows shortcuts with parameters


















As I said before, there is no problem in setting a shortcut's working folder to a mapped drive or folder. Create a desktop shortcut to program and specify a value in 'Start in'. Windows does not seem to take any notice of this. Has anyone come accross this? This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread.

Report abuse. Details required :. Cancel Submit. How satisfied are you with this discussion? Thanks for your feedback, it helps us improve the site. Previous Next. Frederik Long.

To illustrate your problem, please use snippingtool. Save the snapshot to your desktop, then attach it to your reply. But what if its an. Is there a way to create a.

LNK that does not expand the environment variables at creation time but rather when executed? Following up on the log file example above: We have a centralized location where we store various logs for all of our laptops.

The log file naming convention of the log files is 'ComputerName. We've got something like laptops which equates to, at least, log files. When we run into problems we're almost always troubleshooting from the problematic machine.

Part of our Help Desk's process is to review the log file for any obvious errors. Sure it should only take less than a minute to locate the file, but its a lot of files they have to filter out.

I would like to create a. LNK shortcut that, when launched, would always pull the log file for the machine its being run from. So one. LNK shortcut that:. How can I place an environment variable in a. LNK shortcut without the system expanding that variable?

I just tested a shortcut with a variable on my machine and as you can see below it kept the variable even after I ran the shortcut. You can see the Apply button has been hit so its a saved shortcut that hasn't changed. Something like Since after reading it over a few times it looks like your trying to add the variable as part of the file name your right that it won't work as windows will try to resolve it.

My method above will not resolve it until its actually run. In case you aren't familiar with scripts these all set variables and combine them for what you need with finally ending at opening the file. Second line sets the path to the log files, third line sets the extension you can change to. Last line simply opens the log file by calling just one variable.

This will work and solve your problem. Play with it as you see fit to customize for your needs. It seems clear to me, by lack of an answer, that there's no way to create a shortcut with an environment variable without Windows expanding at creation time.

I even tried leveraging VBscript to create the shortcut, thinking it might behave differently, but no. Again, I appreciate the workarounds and attention this got. These are all excellent alternatives. However, if I was certain that the remaining path in bold was permanent, what can I do to the Environment Variables for the shortcut to work?

Restriction: I do not and have no server permissions but I can possibly able to run a script within my department on each computer. In pathtext I've appended this:. I want 2 things to be able to happen: 1 Should the "NEW Z Drive" be removed and everything after that moved up, I'd like for the shortcut to still be able to work. How can I do this? However, this will only work on machines that have that variable set.

And once the server or path changes, you'll have to update the variable accordingly. The code above was just proof-of-concept - its not necessarily that its hard coding or a lot to code. I just wanted to show you step by step. Its really just 3 lines:. Details required :. Cancel Submit. Paulo GM Independent Advisor. Hi Ozoro99, I am Paulo and I'd like to help. The usual drag and drop on Windows 10 is not available yet in Windows I believe this is to be added to future updates.

But you can access the apps folder instead to create a shortcut. Disclaimer: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP Potentially Unwanted Products. Thoroughly research any product advertised on the site before you decide to download and install it.

How satisfied are you with this reply? Thanks for your feedback, it helps us improve the site. The drag and drop to the taskbar, which is not available yet in Windows 11, can be fixed by the tool from GitHub I mentioned earlier. In reply to Paulo GM's post on December 2, Thank you However, the drag and drop function doesn't appear to work. Hi Ozoro99, I understand your sentiments. If you mean the drag and drop to the taskbar, it is not available yet.



0コメント

  • 1000 / 1000