User Tools

Site Tools


windows:windows

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
windows:windows [2013/11/02 11:52] – [Execute Tasks on System Events (e.g. by EventId)] skipidarwindows:windows [2020/12/27 20:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +==== Startupt Scripts ====
 +Use **gpedit.msc** to add Logon scripts: http://www.trishtech.com/win7/run_a_script_at_shutdown_in_windows_7.php
  
 +==== Execute Tasks on System Events (e.g. by EventId) ====
 +Use **TaskPlaner** (engl. **Task scheduler**)
 +http://www.netzwelt.de/news/88194-schritt-schritt-aufgabenplanung-windows-7.html
 +
 +Useful Events:
 +
 +== OnStartup ==
 +  * Log: System
 +  * Source:Power-Troubleshooter
 +  * Event ID: 1
 +==== Remote Desktop ====
 +“Der Terminalserver hat die maximal zugelassene Anzahl an Verbindungen überschritten”
 +umgehen.
 +<code>
 +mstsc /v:[Servername-oder-IP /admin]
 +</code>
 +
 +== Really disable auto updates of Windows ==
 +https://answers.microsoft.com/en-us/windows/forum/all/disable-windows-10-automatic-restart-after-updates/16f1826d-a796-4de8-ac99-1d625420d265
 +
 +<code>
 +Hello,
 +Try the process below:
 +1. Press Windows key + R keyboard shortcut to open the Run command.
 +2. Type the following path and click "OK":
 +%windir%\System32\Tasks\Microsoft\Windows\UpdateOrchestrator
 +3. Select the
 +Reboot ) (it does not have an extension)
 +file right-click it and select "Rename".
 +4. Rename the Reboot file to "Reboot.old".
 +5. Right-click inside the folder, select "New," and click on "Folder".
 +6. Name the New Folder "Reboot".
 +7. Now restart your computer.
 +
 +This will disable Window's ability to restart automatically.
 +
 +If this solution has the desired effect let me know.
 +</code>
 +
 +
 +==== OS Environment variables ====
 +
 +**Similar to the Eclipse system properties there are OS Environment variables**
 +
 +|Variable name | Read only | default Value on Windows 7 |
 +|ALLUSERSPROFILE | |C:\ProgramData|
 +|APPDATA | |C:\Users\{username}\AppData\Roaming|
 +|CD |Y| The current directory (string).|
 +|ClientName |Y| Terminal servers only - the ComputerName of a remote host.|
 +|CMDEXTVERSION |Y| The current Command Processor Extensions version number. (NT = "1", Win2000+ = "2".)|
 +|CMDCMDLINE |Y| The original command line that invoked the Command Processor.|
 +|CommonProgramFiles | |C:\Program Files\Common Files|
 +|COMMONPROGRAMFILES(x86) | |C:\Program Files (x86)\Common Files|
 +|COMPUTERNAME | |{computername}|
 +|COMSPEC | |C:\Windows\System32\cmd.exe or if running a 32 bit WOW - C:\Windows\SysWOW64\cmd.exe|
 +|DATE |Y| The current date using same region specific format as DATE.|
 +|ERRORLEVEL |Y| The current ERRORLEVEL value, automatically set when a program exits.|
 +|HighestNumaNodeNumber |Y (hidden)|The highest NUMA node number on this computer.|
 +|HOMEDRIVE |Y| C:|
 +|HOMEPATH |Y| \Users\{username}|
 +|LOCALAPPDATA | |C:\Users\{username}\AppData\Local|
 +|LOGONSERVER | |\\{domain_logon_server}|
 +|NUMBER_OF_PROCESSORS |Y| The Number of processors running on the machine.|
 +|OS |Y| Operating system on the user's workstation.|
 +|PATH | |User and|
 +|System | |C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem;{plus program paths}|
 +|PATHEXT | |.COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH; .MSC \\ The syntax is like the PATH variable - semicolon separators.|
 +|PROCESSOR_ARCHITECTURE |Y| AMD64/IA64/x86 This doesn't tell you the architecture of the processor but only of the current process, so it returns "x86" for a 32 bit WOW process running on 64 bit Windows. See detecting OS 32/64 bit|
 +|PROCESSOR_ARCHITEW6432 | |=%ProgramFiles% (only available on 64 bit systems)|
 +|PROCESSOR_IDENTIFIER |Y|Processor ID of the user's workstation.|
 +|PROCESSOR_LEVEL |Y| Processor level of the user's workstation.|
 +|PROCESSOR_REVISION |Y| Processor version of the user's workstation.|
 +|ProgramW6432 | |=%PROCESSOR_ARCHITECTURE% (only available on 64 bit systems)|
 +|ProgramData | |C:\ProgramData|
 +|ProgramFiles | |C:\Program Files|
 +|ProgramFiles(x86) 1 | |C:\Program Files (x86)|
 +|PROMPT | |Code for current command prompt format,usually $P$G \\ C:>|
 +|PSModulePath | |%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\|
 +|Public | |C:\Users\Public|
 +|RANDOM |Y| A random decimal number between 0 and 32767.|
 +|%SessionName% | |Terminal servers only - for a terminal server session, SessionName is a combination of the connection name, followed by #SessionNumber. For a console session, SessionName returns "Console".|
 +|SYSTEMDRIVE | |C:|
 +|SYSTEMROOT | |C:\Windows|
 +|TEMP and TMP | User Variable |C:\Users\{Username}\AppData\Local\Temp |
 +|TIME |Y| The current time using same format as TIME.|
 +|UserDnsDomain |Y \\ User Variable | Set if a user is a logged on to a domain and returns the fully qualified DNS domain that the currently logged on user's account belongs to.|
 +|USERDOMAIN | | {userdomain}|
 +|USERDOMAIN_roamingprofile | |The user domain for RDS or standard roaming profile paths. Windows 8/2012 or Windows 7/2008 with Q2664408|
 +|USERNAME | |{username}|
 +|USERPROFILE | |%SystemDrive%\Users\{username} \\ This is equivalent to the $HOME environment variable in Unix/Linux|
 +|WINDIR | |C:\Windows|