desktop

How do I change my Windows desktop wallpaper programmatically?

大城市里の小女人 提交于 2019-12-18 10:24:14
问题 I'd wish to set a wallpaper for Windows XP using C#. I've developed the code so it perfectly works in Windows 7, but apparently it's not the same for XP. I add that wallpaper as a resource, set its compile action as Content and Always copy. It, curiously, sets the correct Wallpaper name inside the Desktop's properties dialog. However, the wallpaper is not set. My code looks like this: public sealed class Wallpaper { Wallpaper() { } const int SPI_SETDESKWALLPAPER = 20; const int SPIF

Inno Setup Create individual shortcuts on all desktops of all users

匆匆过客 提交于 2019-12-18 06:14:16
问题 I'm creating a shortcut on users Desktop with Inno Setup: Name: "{commondesktop}\Setup"; Filename: "{app}\Setup.exe"; WorkingDir: "{pf}\Program"; IconFilename: "{app}\Setup.ico" But users, with no admin rights, cannot delete this Shortcut, how to grant permissions to regular users, to delete this icon? Icon should be created on every user's desktop, but user should have permission to delete it. 回答1: The {commondesktop} shortcut is shared on a common desktop . So there's only one copy of the

How to change windows Applicatoin's default icon in Setup Project

老子叫甜甜 提交于 2019-12-17 21:56:37
问题 How to change the Windows Application's default icon with other one in C# desktop application. I am trying to change it in Setup Project but it is not. I want to show my own icon with Application's shortcut rather then windows default icon 回答1: It is truly odd that when you are creating a deployment (set up) project, and you create a shortcut to the "Primary output" (an .exe), the shortcut does not automatically get the .exe's icon. Instead it gets a generic document shortcut icon. Some of

What's the difference between SpecialFolder.Desktop and SpecialFolder.DesktopDirectory?

让人想犯罪 __ 提交于 2019-12-17 15:46:52
问题 I'm confused about the differences between these two special folders. Here's a code snippet that writes the output of each, but they output the same thing. string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); string pathTwo = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); Console.WriteLine(path); Console.WriteLine(pathTwo); Console.ReadKey(); According to the MSDN documentation ( for .NET 1.1 ): Desktop The logical Desktop rather than the

How to get Desktop location?

安稳与你 提交于 2019-12-17 15:46:34
问题 I'm using Python on Windows and I want a part of my script to copy a file from a certain directory (I know its path) to the Desktop. I used this: shutil.copy(txtName, '%HOMEPATH%/desktop') While txtName is the txt File's name (with full path). I get the error: IOError: [Errno 2] No such file or directory: '%HOMEPATH%/DESKTOP' Any help? I want the script to work on any computer. 回答1: You can use os.environ["HOMEPATH"] to get the path. Right now it's literally trying to find %HOMEPATH%/Desktop

npm使用介绍

╄→尐↘猪︶ㄣ 提交于 2019-12-17 13:06:06
1、npm介绍 NPM是随同NodeJS一起安装的包管理工具,能解决NodeJS代码部署上的很多问题,常见的使用场景有以下几种: 允许用户从NPM服务器下载别人编写的第三方包到本地使用。 允许用户从NPM服务器下载并安装别人编写的命令行程序到本地使用。 允许用户将自己编写的包或命令行程序上传到NPM服务器供别人使用。 由于新版的nodejs已经集成了npm,所以之前npm也一并安装好了。 同样可以通过输入 "npm -v" 来测试是否成功安装。 升级npm npm install npm -g MacBookPro:Desktop zhangxm$ sudo npm install npm -g /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js + npm@6.13.2 added 22 packages from 14 contributors, removed 18 packages and updated 59 packages in 46.768s MacBookPro:Desktop zhangxm$ npm -v 6.13.2 MacBookPro

How to identify Windows 10 background store processes that have non-displayed windows that are programmatically visible and minimizable?

痴心易碎 提交于 2019-12-17 12:42:31
问题 I have a Win32 application that determines whether there are any visible, non-iconic, minimizable windows being shown. To the best of my knowledge it's worked fine for Win9x through to Win8.1, but under Windows 10 it often finds several windows that aren't actually visible on the screen. To try to identify what's going on I've written a simple test application that enumerates and records all such windows. Here's the essence of the EnumWindows callback code: BOOL CALLBACK EnumFunc( HWND hWnd,

In java under Windows, how do I find a redirected Desktop folder?

好久不见. 提交于 2019-12-17 06:53:31
问题 I know using .NET languages such as C#, one can do something like Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) to find the redirected location of the Desktop. However, under Java, I cannot think of a good way to do this. What is the most appropriate way to find a redirected user Desktop directory from Java, without using JNI? The specific purpose here is for the purposes of managing a desktop shortcut, if the user wants one, for a Java Web Start application. This

How to get the Desktop path in java

假装没事ソ 提交于 2019-12-17 03:18:57
问题 I think this will work only on an English language Windows installation: System.getProperty("user.home") + "/Desktop"; How can I make this work for non English Windows? 回答1: I use a french version of Windows and with it the instruction: System.getProperty("user.home") + "/Desktop"; works fine for me. 回答2: I think this is the same question... but I'm not sure!: In java under Windows, how do I find a redirected Desktop folder? Reading it I would expect that solution to return the user.home, but

Linux中网络磁盘iscsi的使用

百般思念 提交于 2019-12-16 21:49:06
Linux中网络磁盘iscsi的使用 1. 什么是iscsi ISCSI (Internet Small Computer System Interface),Internet小型计算机系统接口,又称为 IP - SAN 是一种基于因特网及 SCSI - 3 协议下的存储技术,由 IETF 提出,并于 2003 年 2 月 11 日成为正式的标准 iscsi是直接对设备进行共享的服务 1 2 2. iscsi与nfs比较 nfs是对文件系统的共享: 是将服务器的磁盘以文件系统的形式映射到内核上面,然后在内核上面开启一个nfs服务,就可以把自己的文件系统共享出去了 也就是客户端在本地直接可以远程修改nfs上面的东西,并且同步到nfs 现在我们想把服务器的磁盘直接划分一块出来放到内核上面,在内核上面直接下载iscsi服务,直接将设备共享 此时客户端就可以发现并且使用服务端的共享磁盘了 之前共享出来的文件系统叫做nfs 现在共享出来的设备叫iscsi 1 2 3 4 5 3. ISCSI服务器的搭建 实验准备:此实验需要两台虚拟机,一台desktop虚拟机做测试端,一台server虚拟机做服务器端 配置desktop的静态ip为172.25.254.114,配置server的静态ip为172.25.254.214,并且配置好两台虚拟机的yum源 在服务端搭建iscsi服务器 :