• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 882
  • Last Modified:

Windows 7.0 Public Desktop Problem

I am trying to copy some files (LNK and URL files) to the Public Desktop under Windows 7 (C:\Users\Public\Public Desktop) via VB.NET.  The copy works OK but for some reason a second Public Desktop folder is always created and the files are copied into the newly created location hence the links do not actually display on the actual Desktop.  I have tried running the program with the Read Only Flag and Hidden flags removed but to no avail.  I always end up with 2 folders both named C:\Users\Public\Public Desktop.  I have already checked for any hidden characters in the name of the original folder but nothing appears to exist.  Can anyone please help with a solution.
0
bertpet
Asked:
bertpet
  • 5
  • 3
1 Solution
 
CSecurityCommented:
That's impossible. You can't have same named folder in same location. You have some hidden chars, like space, etc. if It's Linux file system like ext3, capital and small letters may have difference also.
0
 
bertpetAuthor Commented:
Not impossible as that is exactly what has happened - no hidden characters either. See file example attached - the second folder is the one that has been created by my program and contains all of the links that I wanted to be placed into the first folder.  Also forgot to mention that UAC is set to the lowest possible value.
Doc1.doc
0
 
CSecurityCommented:
Are you sure you don't have space after Public Desktop word? in the end of it I mean?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
bertpetAuthor Commented:
Absolutely.  Here is the variable I use             strDesktopMenu = "C:\Users\Public\Public Desktop" (onlly one space between Public and Desktop) to which is appended a "\" then the file name, ie, a File called "Control Panel.lnk" (example only) shows as "C:\Users\Public\Public Desktop\Control Panel.lnk".  All works OK with Windows XP to C:\Documents and Settings\All Users\Desktop.  The only thing I can think of and I am not sure on how to verify it is that the Default "Public Desktop" folder name might have a hidden character (other than a space) between the words Public and Desktop.  This seems to be the case as when doing it manually Windows Explorer allows the creation of a second "C:\Users\Public\Public Desktop" without generating an error - the only difference appears to be what is between the two words Public and Desktop.
0
 
bertpetAuthor Commented:
I eventually worked this out.  Even though the Windows display says C:\Users\Public\Public Desktop it is addressed for copying files or directory displays as C:\Users\Public\Destop (leave off the word Public).  This applies to all of the Public folders - do a Dir of C:\Users\Public and see what is returned.  Is this another one of Micrsoft's funnies OR as usual are they doing this just to make life difficult - god only knows of what logic exists that they would display it in Windows Explorer at "Public Desktop" when it should only be displayed and accessed as "Desktop".  It's very hard not to be cirtical when they do these type of things.  You have earned your points because your prompting helped me to eventuall to solve this.
0
 
bertpetAuthor Commented:
Points allocated for prompting me to solve this problem.
0
 
CSecurityCommented:
Thanks, I was sure having same directory is impossible, just I don't have Vista or Windows 7 and I hate both of them and never I'll install them, I was not able to see their new structure, like Users instead of Documents and Settings and public desktop etc.

If I had Windows 7 I would help you sooner, sorry. I'll install a Windows 7 in virtual machine just to be more helpful, but I hate both (Vista and 7)...

Anyway... I'm glad you solved it out
0
 
bertpetAuthor Commented:
No worries.  I am trialling Windos 7.0 and am finding it quite OK except for the occasional bout of stupidity from Microsoft.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now