1.

Solve : How to get Startup folder in all versions of Windows??

Answer»

There seems several ways to get location of startup; such as
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
or
C:\Documents and Settings\%username%\Start Menu\Programs\Startup

But I wonder a general way to get the path to the folder of startup in all versions of Windows in DOS command box.You would make exceptions for each version of Windows.In Windows 8 it is here:

"c:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"

Should work for Vista/7/8.
Since there is no general method to get it, it causes another issue: how to know the version of Windows? There must be a way to know the version of Windows and then we can determine the way to get the Startup folder.You could use a VBScript:

getstartup.vbs
Code: [Select]WScript.Echo Wscript.CreateObject("Wscript.Shell").SpecialFolders.Item("Startup")
batch:
Code: [Select]FOR /F "delims=" %%i IN ('cscript /nologo getstartup.vbs') DO SET startupfolder=%%i
Quote from: Stan Huang on June 03, 2013, 06:36:33 PM

Since there is no general method to get it, it causes another issue: how to know the version of Windows? There must be a way to know the version of Windows and then we can determine the way to get the Startup folder.
Type VER at a cmd prompt.In my Windows 7, I typed "ver" in DOS Command and I got "Microsoft Windows [Version 6.1.7601]" which I can't get infer from it that this is a Windows 7 system.
In my POSReady 2009, I got "Microsoft Windows XP [Version 5.1.2600]".Quote from: Stan Huang on June 05, 2013, 01:42:37 AM
I typed "ver" in DOS Command and I got "Microsoft Windows [Version 6.1.7601]" which I can't get infer from it that this is a Windows 7 system.

Yes you can.

1.
http://www.robvanderwoude.com/ver.php

2.
http://en.wikipedia.org/wiki/Ver_(command)

Windows 1.0 1.04
Windows 2.0 2.11
Windows 3.0 3
Windows for Workgroups 3.11 3.11
Whistler Server Preview 2250
Whistler Server alpha 2257
Whistler Server interim release 2267
Whistler Server interim release 2410
Windows NT 3.1 3.10.528
Windows NT Workstation 3.5 3.5.807
Windows NT Workstation 3.51 3.51.1057
Windows NT Workstation 4.0 4.0.1381
Windows 95 4.0.950
Windows 95 OEM Service Release 1 (95A) 4.00.950
Windows 95 OEM Service Release 2 (95B) 4.00.1111
Windows 95 OEM Service Release 2.1 4.03.1212-1214
Windows 95 OEM Service Release 2.5 C 4.03.1214
Windows 98 4.1.1998
Windows 98 Second Edition 4.1.2222
Windows Millenium Beta 4.90.2476
Windows Me 4.90.3000
Windows NT 5.00 (Beta 2) 5.00.1515
Windows 2000 (Beta 3) 5.00.2031
Windows 2000 (Beta 3 RC2) 5.00.2128
Windows 2000 (Beta 3) 5.00.2183
Windows 2000 5.00.2195
Windows 2000 Professional 5.0.2195
Windows XP (RC 1) 5.1.2505
Windows XP 5.1.2600
Windows XP, Service Pack 1 5.1.2600.1105-1106
Windows XP, Service Pack 2 5.1.2600.2180
Windows XP, Service Pack 3 5.1.2600
Windows XP Professional X64 Edition 5.2.3790
Windows .NET Server interim 5.2.3541
Windows .NET Server Beta 3 5.2.3590
Windows .NET Server Release Candidate 1 (RC1) 5.2.3660
Windows .NET Server 2003 RC2 5.2.3718
Windows Server 2003 (Beta?) 5.2.3763
Windows Home Server 5.2.3790
Windows Server 2003 5.2.3790
Windows Server 2003, Service Pack 1 5.2.3790.1180
Windows Server 2003 5.2.3790.1218
Windows Longhorn 6.0.5048
Windows Vista, Beta 1 6.0.5112
Windows Vista, Community Technology Preview (CTP) 6.0.5219
Windows Vista, TAP Preview 6.0.5259
Windows Vista, CTP (December) 6.0.5270
Windows Vista, CTP (February) 6.0.5308
Windows Vista, CTP (Refresh) 6.0.5342
Windows Vista, April EWD 6.0.5365
Windows Vista, Beta 2 Preview 6.0.5381
Windows Vista, Beta 2 6.0.5384
Windows Vista, Pre-RC1 6.0.5456
Windows Vista, Pre-RC1, Build 5472 6.0.5472
Windows Vista, Pre-RC1, Build 5536 6.0.5536
Windows Vista, RC1 6.0.5600.16384
Windows Vista, Pre-RC2 6.0.5700
Windows Vista, Pre-RC2, Build 5728 6.0.5728
Windows Vista, RC2 6.0.5744.16384
Windows Vista, Pre-RTM, Build 5808 6.0.5808
Windows Vista, Pre-RTM, Build 5824 6.0.5824
Windows Vista, Pre-RTM, Build 5840 6.0.5840
Windows Vista, RTM (Release to Manufacturing) 6.0.6000.16386
Windows Vista 6.0.6000
Windows Server 2008 6.0.6001
Windows Vista, Service Pack 2 6.0.6002
Windows 7, RTM (Release to Manufacturing) 6.1.7600.16385
Windows 7 6.1.7600
Windows 7, Service Pack 1 6.1.7601
Windows Server 2008 R2, RTM (Release to Manufacturing) 6.1.7600.16385
Windows 8, RTM (Release to Manufacturing) 6.2.9200.16384
Windows 8 6.2.9200
Windows Server 2012, Developer Preview 6.2.8102
Windows Server 2012 6.2.9200
Also...

How to determine what version of Windows you are running in a batch file

http://thelostartofbatchscript.blogspot.co.uk/2010/09/how-to-determine-what-version-of.htmlIf you keep giving them the fish they will never learn to use google to learn how to fish. Give a man a fish ...he will eat for a Day...
Teach a man to fish...and he'll sit in a boat all Day drinkin Beer...More...
http://www.quoteland.com/topic/Teaching-Quotes/140/
after you teach a fish to swim
Quote from: patio on June 05, 2013, 04:35:54 PM
Give a man a fish ...he will eat for a Day...
Teach a man to fish...and he'll sit in a boat all Day drinkin Beer...
Give a man faith and he will starve to death praying for a fish...Quote from: Squashman on June 05, 2013, 04:26:19 PM
If you keep giving them the fish they will never learn to use google to learn how to fish.

The answers I have given in this THREAD are so very obvious, viz: Google for pages about the ver command, and check out Wikipedia, that I think fishing lessons may be pointless.


Discussion

No Comment Found