windows-7

How to set a variable for the current OS session only

这一生的挚爱 提交于 2019-12-19 09:41:08
问题 setx permanently modifies environment variables. set only makes variables available during batch script duration. Is there any way to set a variable in order to hold its value until the system is restarted? E.g. in my batch file, I'm checking if the variable is set like this: if %MYVAR% == 1 ( <block> ) 回答1: @ECHO Off IF NOT EXIST q25244121.org GOTO done :: reset to original FOR /f "tokens=1*delims==" %%a IN (q25244121.org) DO ( IF DEFINED %%a FOR /f "tokens=1*delims==" %%p IN ('set %%a') DO

How to set a variable for the current OS session only

╄→гoц情女王★ 提交于 2019-12-19 09:40:30
问题 setx permanently modifies environment variables. set only makes variables available during batch script duration. Is there any way to set a variable in order to hold its value until the system is restarted? E.g. in my batch file, I'm checking if the variable is set like this: if %MYVAR% == 1 ( <block> ) 回答1: @ECHO Off IF NOT EXIST q25244121.org GOTO done :: reset to original FOR /f "tokens=1*delims==" %%a IN (q25244121.org) DO ( IF DEFINED %%a FOR /f "tokens=1*delims==" %%p IN ('set %%a') DO

C# Fullscreen, hiding the taskbar

随声附和 提交于 2019-12-19 09:03:59
问题 I have recently written an application for my daughter, which is a kid-free zone where she has all unnecessary key presses ignored (windows key, Esc etc) but the problem I am having is that when I use the following code: targetForm.WindowState = FormWindowState.Maximized; targetForm.FormBorderStyle = FormBorderStyle.None; targetForm.TopMost = true; I am able to HIDE the taskbar, but it is not truly overlayed. When I move the mouse to where the taskbar would be, and click, it pops up, also,

Why is the NTOSKRNL.exe IMAGE_MACHINETYPE header field set to x86 on only certain editions of Windows 7 x64?

萝らか妹 提交于 2019-12-19 07:49:57
问题 I am using windows 7 home premium x64. I was wondering why exactly the IMAGE_MACHINETYPE field in the header of ntoskrnl in my system32 directory specifies x86. IDA will even let me disassemble it as native x86. Yet on my windows 7 pro machine, image_machinetype is x64. Am I just missing something.. or why is ntoskrnl 32 bit on a 64 bit OS? 回答1: My guess is on x64 architecture with a BIOS boot ntoskrnl.exe's main() entry point is called before the switch to long mode (64bit). Thus it would be

Installing/compiling in Cygwin/MinGW - How to set the include “path”? (symbolic link?)

ぐ巨炮叔叔 提交于 2019-12-19 07:09:06
问题 I have been trying to install/compile C libraries in Windows 7 using Cygwin and MinGW. However, I am getting errors like these during make : sys/resource.h: No such file or directory sys/times.h: No such file or directory I previously thought it might be a problem with the specific libraries and asked here: Various issues installing igraph in Visual Studio 2010 and Cygwin/MinGW ("sys/time.h not found"), but after encountering the same error with different libraries, I think the problem lies

Modal dialogs opened by a fullscreen OpenGL window on Windows 7 are not showing

和自甴很熟 提交于 2019-12-19 04:49:09
问题 It seems that my problem may be the same as an unanswered related question (OpenGL with GLUT on windows 7, fullscreen mode not showing the message box). Since I switched to Win7 as a development environment, and a possible target platform for my applications, I noticed a regression in their behaviour. Whenever I have a fullscreen window containing a fullscreen OpenGL context, the applications have problems displaying modal dialog boxes (such as message boxes, file open dialog, etc.) The

Access the Windows 7 Boot Configuration Data using C#

蓝咒 提交于 2019-12-19 04:23:24
问题 I need to be able to access the identifier GUID of the current running installation of Windows from the Boot Configuration Data Store using c#. It can be returned from the command line running: bcdedit /enum {current} /v The problem I have is that in c# if I try to directly run this command (even though the program is running as Administrator) I'm told that bcdedit does not exist. I'm using: ProcessStartInfo procStartInfo = new ProcessStartInfo("bcdedit.exe", "/enum {current} /v"); The other

genymotion: “player.exe sttoped working”

蹲街弑〆低调 提交于 2019-12-19 04:19:09
问题 I installed the package of GENYMOTION for windows(7) from their official web. It installed me the Oracle VM VirtualBox and the Genymotion. After that I opened the VirtualBox and then the Genymotion and downloaded the Galaxy Nexus-4.3-API 18-720x1280 and some others (all with API 18). Then I tried to run it but after a while appered a message saying: "player.exe stopped working". I've been a lot of time trying to make it work but I really don´t know how to fix it... Here I leave a link to my

Installing Ruby on Rails on windows

五迷三道 提交于 2019-12-19 04:09:42
问题 I am in the process of installing Ruby on Rails on windows 7. I installed ruby-1.9.2 (in c:\ruby) and I've installed rails using the gem install rails command (doing this from c:\ruby\bin since this is the only place i can call the command). I've then run rails new my_app command. The problem that I have is trying to run the rails server command from inside the apps folder (c:\ruby\bin\my_app) I get the message: 'rails' is not recognized... . What have I done wrong? 回答1: On Windows you need

What are the differences between “Run as administrator” and a manifest with requireAdministrator?

為{幸葍}努か 提交于 2019-12-19 04:08:17
问题 I've written a program with a manifest that includes requireAdministrator. On Windows 7 systems with UAC enabled, Windows pops up a dialog asking for permissions, as it should. Works great. If a user starts my program by right-clicking it and choosing "Run as administrator", then Windows 7 also pops up a dialog asking for permissions. However, there are some slight differences in how my program operates in some of the more esoteric parts of my program. So what are the differences between "Run