winutil icon indicating copy to clipboard operation
winutil copied to clipboard

"Create WinUtil Shortcut" not working properly with latest release.

Open Squtzy opened this issue 1 year ago • 7 comments

Describe the bug

When trying to create a shortcut for winutil on the latest release it creates the shortcut but when going to open winutil using the shortcut it only opens "This PC" in my File Explorer. When right clicking the shortcut it does not give me any "open with" option either. Shortcuts made before current release has worked flawlessly on 2 of my Windows 11 Systems.

To Reproduce

Steps to reproduce the behavior:

  1. Go to "Tweaks" tab in winutil.
  2. Click on "Create Shortcut"
  3. Attempt to open shortcut in saved location.
  4. Met with file explorer being opened on the "This PC" tab.

Expected behavior

When clicking/opening the shortcut I expect Winutil to open like it has done with "older" shortcut versions before.

Screenshots

Adding screenshots that show steps of issue.

Additional context

Wanted to make a new shortcut as I had cleaned up my secondary PC and removed the old shortcut without realising. After attempting to make a new shortcut I am met with this issue. System is Windows 11: Version 23H2 (OS-version 22531.3880) image image image

Squtzy avatar Jul 30 '24 19:07 Squtzy

Apologies for my Windows being in Swedish. Hope the screenshots are still of some help

Squtzy avatar Jul 30 '24 19:07 Squtzy

Hey @Squtzy, tested it on my end using the Full-Release:

image

Will look into this, thanks for reporting!

EDIT: made a PR and linked it to the issue that will fix the issue.

MyDrift-user avatar Jul 30 '24 19:07 MyDrift-user

Hey @Squtzy, tested it on my end using the Full-Release:

image

Will look into this, thanks for reporting!

EDIT: made a PR and linked it to the issue that will fix the issue.

Oh wow that was some quick work :D Glad I could be of help :)

Squtzy avatar Jul 30 '24 20:07 Squtzy

I'm still having the same issue with the shortcut creation link just opening up this pc with latest update

Monodark86 avatar Jul 31 '24 23:07 Monodark86

Yes @Monodark86 , I have created the Pull Request. Chris now has to merge this PR wh3n he accepts the changes and make a release after. Sorry for the inconvenience.

MyDrift-user avatar Aug 01 '24 04:08 MyDrift-user

Yes @Monodark86 , I have created the Pull Request. Chris now has to merge this PR wh3n he accepts the changes and make a release after. Sorry for the inconvenience.

Question on the topic, is it possible to manually fix a/the shortcut for the moment? :)

Squtzy avatar Aug 01 '24 13:08 Squtzy

Question on the topic, is it possible to manually fix a/the shortcut for the moment? :)

Yes. I couldn't fix the shortcut WinUtil made, but I found I can manually create the shortcut by doing the following: (this is for win10 but win11 should be the same)

  • Right-click on your desktop and go to New -> Shortcut
  • It should ask for the location of the item, copy and paste the following:
"C:\Program Files\PowerShell\7\pwsh.exe" -ExecutionPolicy Bypass -Command "Start-Process pwsh.exe -verb runas -ArgumentList '-Command "irm https://christitus.com/win | iex"'
  • Press Next/Enter
  • It should ask what you want to name the shortcut, enter WinUtil
  • Right-Click the new WinUtil shortcut on your desktop, and select Properties
  • In the Shortcut tab, select Advanced...
  • Tick the box for Run as administrator
  • Press OK then press OK again.

You should now be able to run WinUtil from that shortcut.

To fix the missing icon try:

  • Right-Click the shortcut -> Properties -> Change Icon...
  • Below "Look for icons in this file:", replace everything there with:
%USERPROFILE%\AppData\Local\winutil\cttlogo.ico

Press Enter twice, then click OK

You should now have a manually created version of the shortcut that WinUtil would usually make. :)

NotYourAverageGamer avatar Aug 02 '24 12:08 NotYourAverageGamer

Question on the topic, is it possible to manually fix a/the shortcut for the moment? :)

Yes. I couldn't fix the shortcut WinUtil made, but I found I can manually create the shortcut by doing the following: (this is for win10 but win11 should be the same)

* Right-click on your desktop and go to `New -> Shortcut`

* It should ask for the location of the item, copy and paste the following:
"C:\Program Files\PowerShell\7\pwsh.exe" -ExecutionPolicy Bypass -Command "Start-Process pwsh.exe -verb runas -ArgumentList '-Command "irm https://christitus.com/win | iex"'
* Press Next/Enter

* It should ask what you want to name the shortcut, enter `WinUtil`

* Right-Click the new `WinUtil` shortcut on your desktop, and select `Properties`

* In the `Shortcut` tab, select `Advanced...`

* Tick the box for `Run as administrator`

* Press OK then press OK again.

You should now be able to run WinUtil from that shortcut.

To fix the missing icon try:

* Right-Click the shortcut -> Properties -> Change Icon...

* Below "Look for icons in this file:", replace everything there with:
%USERPROFILE%\AppData\Local\winutil\cttlogo.ico

Press Enter twice, then click OK

You should now have a manually created version of the shortcut that WinUtil would usually make. :)

HI, this worked great. The only thing that I failed was the icon. I can't find cttlogo.ico on de folder %USERPROFILE%\AppData\Local\winutil\cttlogo.ico

Where can I find the ico file? Thanks.

sergiodevelop78 avatar Dec 15 '24 18:12 sergiodevelop78

@sergiodevelop78 here you go, it's likely only there if WinUtil has created the shortcut previously. cttlogo

i found it in: %USERPROFILE%\AppData\Local\winutil\cttlogo.png (note that it's a .png now)

On a similar topic, @ChrisTitusTech I noticed the option to add a WinUtil shortcut has been removed at some point in the last few months, are there any plans to bring back this feature?

NotYourAverageGamer avatar Dec 18 '24 01:12 NotYourAverageGamer

Question on the topic, is it possible to manually fix a/the shortcut for the moment? :)

Yes. I couldn't fix the shortcut WinUtil made, but I found I can manually create the shortcut by doing the following: (this is for win10 but win11 should be the same)

* Right-click on your desktop and go to `New -> Shortcut`

* It should ask for the location of the item, copy and paste the following:
"C:\Program Files\PowerShell\7\pwsh.exe" -ExecutionPolicy Bypass -Command "Start-Process pwsh.exe -verb runas -ArgumentList '-Command "irm https://christitus.com/win | iex"'
* Press Next/Enter

* It should ask what you want to name the shortcut, enter `WinUtil`

* Right-Click the new `WinUtil` shortcut on your desktop, and select `Properties`

* In the `Shortcut` tab, select `Advanced...`

* Tick the box for `Run as administrator`

* Press OK then press OK again.

You should now be able to run WinUtil from that shortcut.

To fix the missing icon try:

* Right-Click the shortcut -> Properties -> Change Icon...

* Below "Look for icons in this file:", replace everything there with:
%USERPROFILE%\AppData\Local\winutil\cttlogo.ico

Press Enter twice, then click OK

You should now have a manually created version of the shortcut that WinUtil would usually make. :)

HI, this worked great. The only thing that I failed was the icon. I can't find cttlogo.ico on de folder %USERPROFILE%\AppData\Local\winutil\cttlogo.ico

Where can I find the ico file? Thanks.

@sergiodevelop78 here you go, it's likely only there if WinUtil has created the shortcut previously. cttlogo

i found it in: %USERPROFILE%\AppData\Local\winutil\cttlogo.png (note that it's a .png now)

On a similar topic, @ChrisTitusTech I noticed the option to add a WinUtil shortcut has been removed at some point in the last few months, are there any plans to bring back this feature?

Thank you!!

sergiodevelop78 avatar Dec 27 '24 00:12 sergiodevelop78

Question on the topic, is it possible to manually fix a/the shortcut for the moment? :)

Yes. I couldn't fix the shortcut WinUtil made, but I found I can manually create the shortcut by doing the following: (this is for win10 but win11 should be the same)

* Right-click on your desktop and go to `New -> Shortcut`

* It should ask for the location of the item, copy and paste the following:

"C:\Program Files\PowerShell\7\pwsh.exe" -ExecutionPolicy Bypass -Command "Start-Process pwsh.exe -verb runas -ArgumentList '-Command "irm https://christitus.com/win | iex"'

* Press Next/Enter

* It should ask what you want to name the shortcut, enter `WinUtil`

* Right-Click the new `WinUtil` shortcut on your desktop, and select `Properties`

* In the `Shortcut` tab, select `Advanced...`

* Tick the box for `Run as administrator`

* Press OK then press OK again.

You should now be able to run WinUtil from that shortcut. To fix the missing icon try:

* Right-Click the shortcut -> Properties -> Change Icon...

* Below "Look for icons in this file:", replace everything there with:
%USERPROFILE%\AppData\Local\winutil\cttlogo.ico

Press Enter twice, then click OK You should now have a manually created version of the shortcut that WinUtil would usually make. :)

HI, this worked great. The only thing that I failed was the icon. I can't find cttlogo.ico on de folder %USERPROFILE%\AppData\Local\winutil\cttlogo.ico

Where can I find the ico file? Thanks.

@sergiodevelop78 here you go, it's likely only there if WinUtil has created the shortcut previously. cttlogo i found it in: %USERPROFILE%\AppData\Local\winutil\cttlogo.png (note that it's a .png now) On a similar topic, @ChrisTitusTech I noticed the option to add a WinUtil shortcut has been removed at some point in the last few months, are there any plans to bring back this feature?

Thank you!!

Hi, out of curiosity is there a translation to put this into a bat(batch) file? I've tried messing around with the coding and it just flashes the powershell window open for a fraction of a second then nothing.

I ask because I wanted to pin it in the Start menu (Win11) and the only solution I could find for that was to use a batch file vs a shortcut. :| so if you have an answer for either way I'd appreciate it. By no means a mandatory thing just a quality of life thing I'd like. so don't spend a lot of time on it if it's complicated (I could see it being either a few changes in this code or completely different so I can't say it would be easy or hard. :|

This is what I had come up with

@Start "" "%AppDir%WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList '-Command "irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1 | iex"'" *

I had moved some things around with no different results. Using also some pointers from another bat file I had created before. I think there may be an issue with my placment or number of " ' symbols but not sure

Supastyles avatar Jan 28 '25 08:01 Supastyles

I use this in my Bitdefender manage exceptions

Image

FatBastard0 avatar Jan 28 '25 09:01 FatBastard0

@sergiodevelop78 here you go, it's likely only there if WinUtil has created the shortcut previously. cttlogo

i found it in: %USERPROFILE%\AppData\Local\winutil\cttlogo.png (note that it's a .png now)

On a similar topic, @ChrisTitusTech I noticed the option to add a WinUtil shortcut has been removed at some point in the last few months, are there any plans to bring back this feature?

Not unless the Antiviruses stop flagging my tool as a virus. That shortcut triggers them and until they stop flagging it, I won't add it back.

ChrisTitusTech avatar Jan 28 '25 19:01 ChrisTitusTech

I got a notification about my last message showing this:

https://i.imgur.com/QjtNBjc.png

Im sure this isn't the right place but I have been reading it and stratching my head about it for like 20 minutes. Seems to be referring to my post but indicating a "slash" error relating to ubuntu or something... I'm guessing it may have to do with some of the syntax in my post but it doesn't seem to directly reference anything I included.

Supastyles avatar Feb 11 '25 19:02 Supastyles