Shortcut file on Windows Desktop doesn't show in Windows Explorer - desktop

I am writing some program to get the list of shortcut files on Desktop.
and I find some strange things about this.
Most programs will create shortcut files on Windows Desktop like "Mozilla Firefox.lnk" or "Google Chrome.lnk" after installed. I can see these shortcuts on Desktop and use them to launch programs.
But I find that if you use Windows Explorer to open the desktop folder, you can't see these lnk files on the list. Some lnk files are visible while some are not (e.g. Mozilla Firefox, Google Chrome, Opera). That's the strangest part. I can't tell what's the different between them.
Then I try to open the cmd program and use "dir" command to list the files on Desktop and also can not see these files.
Then I try to write some code to test with C#
File.Exists(#"C:\Documents and Settings\user\Desktop\Google Chrome.lnk")
The result is "False", that means the lnk file is not exist on the Desktop.
Then I move the "Google Chrome.lnk" from desktop to a folder and move it back.
Now I can see it on Windows Explorer and cmd "dir" command
and the result of the code
File.Exists(#"C:\Documents and Settings\user\Desktop\Google Chrome.lnk")
is "True".
I have no idea what has been changed after the lnk file move out from desktop and move back, but now it appears like a normal file.
Does anyone notice this and know why it likes this?
Thanks.

The answer is:
Some lnk files are in the "All Users\Desktop" folder
not in the current user's Desktop
Thanks to #DanielA.White

I know this is a really old thread, but I thought I'd share anyway. I had a .Ink file on my desktop that would not delete. After trying to delete it a number of times in different ways I decided to just right click the desktop and click refresh. It disappeared! Sounds too easy to be true doesn't it?

There they were. C: > Users > Public > Desktop

Related

Visual Studio isn’t running a Hello World script - even the one that it included in the build

I’ve began to use Visual Studio, and I’m trying to make a simple hello world script. However, when i try to run the hello world script that they included, nothing shows up - except for 437 errors, all along the lines of:
cannot open source file “ctype.h”
I assume that it’s doing this for every single one of the extra files, however, I’m not too sure. I’ve been looking everywhere for help on this - so some help here would be much appreciated! Thank you :)
It seems that you couldn't install or use the windows SDK correctly. I suggest you could try to reinstall the windows sdk. Open the VS Installer window, you could click on "Individual Components", then scroll quite a ways down to get to the "SDKs, libraries and frameworks" section. In there, you could choose download and install the SDK which you want.
And then right click the project-> Properties -> General -> Windows SDK Version to set the Windows SDK.

C++ Setup in Visual Studio Code fails to run

I just downloaded VSC in order to start learning C++. Previously I had just used Notepad++ for web design and Python IDE for Python, but I decided to move onto Visual Studio Code for a more sophisticated code editor.
However, when trying to run a basic program, I don't have the option to run in the first place. This picture is what's supposed to come up when you right-click on the text area (from multiple YouTube tutorials):
However, this is what comes up on my screen.
Additionally, there is no "run" button on the top-right of the screen like the tutorials show.
My folders regarding VSC in File Explorer are quite simple. I have a folder for my .cpp code, and MinGW as a compiler. My build is Windows 10.
Obviously, this depends from person to person, but is there any key way this situation can be resolved? Thank you in advance.

After using QFileDialog program crashes after few seconds

I am making app to increase productivity in our company. It reads the whole .csv file and puts its contents to a table in .pdf format. I am using QT as GUI library and PoDoFo as .pdf library.
The thing is, after I let user select .csv file to get data from and path to save generated .pdf, the program crashes in two minutes or so. It varies from case to case. I was able to "track" the issue down to the QFileDialog.
It doesn't matter if I created it on the stack, or dynamically still the same thing happens. From the moment you press "Choose" in the GUI, which opens up file dialog, program will crash in something around a two minutes giving this in Visual Studio Community 2017
I was able to create minimalistic code, to reproduce the error. I am using Windows 7 Pro, Microsoft Visual Studio Community 2017, compiling 32-bit debug
.h,.cpp,.ui files: https://www.dropbox.com/sh/cf057p4lnumesol/AAD39zDJnrxGChXAuE7y27Kra?dl=0
Any help would be appreciated, I've spent 5 days of my free time trying to figure this out. Thanks
EDIT: I understand that the "Frame not in module" means that visual studio doesn't have debugging symbols for the part of code where crash occurred, since I did not built qt myself, that makes sense.
EDIT2: I am using QT Visual Studio Tools addon version 2.3.2
Qt version is 5.12.2
EDIT3: Crashes only occurs when compiling for 32-bit arch.
EDIT4: Crash is happening only if using native file dialog. If option QFileDialog::DontUseNativeDialog is set, then no crash occurrs.
Not sure if this is related, but I had an issue where if I gave a path to the FileDialog it would grind away for a few seconds because it was somehow interpreting it as a network path. To fix this I gave it a path that had a prefix of "file://". To accomplish this I did this:
QUrl().fromLocalFile(cell_info->progDir()).toString()
The original path came from cell_info->progDir(). Somehow that path was a regular windows specific path. Once I wrapped it in the from LocalFile call it produced what I needed for all platforms I was using it with.
Again, I have no idea if this is related to your issue, but it sounds fishy like it is grinding away in the background on something. If this is not related feel free to ignore.

C++ extract .reg file to registry

Can anyone tell me please how to extract the data from a .reg file into the registry?
I've tried:
system("regedit /s product.reg");
It doesn't work, I have also looked at various other questions on here but have had no joy and I have also trouble understanding them.
Can anyone shed any light or send me a link that has a good example please?
Thanks
The following things applies to Windows Vista / Windows 7 and later version.
You won't be able to successfully execute regedit.exe unless your application is not running with Administrator privilege.
If you're using Visual Studio 2005/2008/2010, go to the property window of your project, expand the 'Linker' options, and select 'Manifest File'. Change UAC Execution Level to 'requireAministrator'. Save your project and rebuild your project.
According to this, the correct command is:
reg IMPORT <FileName>
system("product.reg")
should also work. This is akin to double-clicking the file.
Since you're on Windows anyway: ShellExecuteA("product.reg"). Unlike system, this won't start a console window.

WebStorm: When working with remote files, "Error: Could not save project: null"

I'm having a problem with WebStorm only when working with files that are on a mapped drive. I can work with / save files with no problem, but I do get an error prompt saying Could Not Save Project: null.
This happens if I either work in a director or project on a different drive. I have sufficient rights on that drive. Files save fine, but are followed by the error. I have tried completely creating a project on a remote drive instead of having moved it from local, and still receive the same message.
I am a Mac installation, and the files are on a Windows 2K8 box.
All other editors (textmate, aptana, vs) do not give me any indication that I have problems saving to this drive, so it seems to be localized to WebStorm.
WebStorm is on the latest version.
As CrazyCoder says, its unsupported. I'm having the same problem with PhpStorm and posted this:
http://youtrack.jetbrains.com/issue/WI-10692?projectKey=WI
The response from jetbrains:
Directly opening project from remote/mapped storage is unsupported.
Use "new project from existing files" wizard to create a local copy
and set up auto sync.
Mapped drives are strictly unsupported by WebStorm. Please file an issue with idea.log attached at http://youtrack.jetbrains.net/issues/WI so that this problem can be investigated by WebStorm developers.