Page 1 of 1

UNC and/or Administrator Share as variable without copying to clipboard

Posted: 29 Oct 2026 21:02
by hermhart
I am wondering if there is a way to set a UNC and/or Administrative Share as a variable without it also copying to the clipboard?

I can assign it to a variable like this, but it also copies it to the clipboard:

Code: Select all

 #114;
 $unc = <clp>;
 echo $unc;
Is there another way of accomplishing this without it copying?

Re: UNC and/or Administrator Share as variable without copying to clipboard

Posted: 29 Oct 2026 21:17
by highend
Not if you don't construct this kind of path yourself (via scripting)...

Where's the problem that it lands in the clipboard? You can just store (ok, only text) what's inside the clipboard before invoking the command id and restore it back after having assigned the path to the variable...

Re: UNC and/or Administrator Share as variable without copying to clipboard

Posted: 29 Oct 2026 21:41
by hermhart
Thanks. I was just curious if there was a way around it. But I can live with this.

Re: UNC and/or Administrator Share as variable without copying to clipboard

Posted: 29 Oct 2026 23:24
by jupe
If you are just using the script on your own config, you could enable Clip History, then you can restore prev clipboard with single command, no matter what it was image/file/text.

@Don: I think having the UNC path available as a custom property would be useful, since constructing it via scripting takes a bit of effort.

Re: UNC and/or Administrator Share as variable without copying to clipboard

Posted: 29 Oct 2026 23:31
by hermhart
Thanks, @jupe. Always looking for ideas. :D