DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Adding a desktop icon under Windows 8  (Read 4,577 times)

note-taker

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 34
Adding a desktop icon under Windows 8
« on: July 31, 2013, 08:38 PM »
Hi,

I wonder if any of you have been able to add a desktop icon to a windows 8 desktop.
Our batch script works for XP, Vista and Windows 7 but not Windows 8.  Hmm, what's going on with Windows 8?

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,954
Re: Adding a desktop icon under Windows 8
« Reply #1 on: August 01, 2013, 02:47 AM »
Do you run the batch script with elevated rights (administrator  mode)?

Batch scripts are on their way out since Windows 7 and are supposed to be replaced by Powershell scripts.

Executing batch scripts on Win7 as limited user and UAC in default setting can already give a lot of headache, I learned.

For years I use batch scripts to install a service, adjust the state to manual and then either start it or stop and remove it.
But my scripts wouldn't run on a vanilla Win7 installation.

I suspect that Win8 will be even more harsh in blocking batch scripts. You could try to change the extension from your batch file from *.bat to *.ps1 and test the script with Powershell.

There are some free IDE's for PowerShell that can show you where things go wrong during the execution of your script.

Do take a look at the websites from Devfarm Software (free and paid) and Idera (free).

While the paid offering trumps the free version, from personal experience I can tell you that both freeware offerings are solid products that will help you on your way.

After seeing what you can do with PowerShell, you might even grow to love it. I know that those tools did that for me.

Note that PowerSE does require you to register after which you receive a free license for one copy.
The easy path is usually downhill...

Original address: https://www.donationcoder.com/forum/index.php?topic=35618.0