• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 455
  • Last Modified:

Logon Script Extension

Does anybody know what the difference is between a logon script that would end in .bat and one that ends in .cmd?

0
andrewjones1987
Asked:
andrewjones1987
  • 2
2 Solutions
 
Farhan KaziSystems EngineerCommented:
No difference in behavior. .BAT extensions are executed in a 16bit VDM (mean executed by the old 16-bit command processor)while .CMD extensions are executed in a 32bit (executed by the new 32-bit cmd processor) VDM. This has implications for scripts that may need to access shared memory from other processes or applications.

(The CMD extension is limited to newer Windows systems and is not recognized in Windows 9x/Me systems.)
0
 
KCTSCommented:
You also need to be a bit careful when scripting - if you can do something in a BAT file you can do it in a CMD file but the opposite is not awlays true - see http://www.computerworld.com/blogs/node/2948
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
Actually there is a difference in behavior and by default both .bat and .cmd are executed in the 32-bit VMD (cmd.exe) not 16-bit (command.exe).
Have a look at posts 8 and 9 in this thread http://www.petri.co.il/forums/showthread.php?t=15026&goto=#8
0
 
Jeremy WeisingerSenior Network Consultant / EngineerCommented:
Correction: when I said "32-bit VHD" it should be "32-bit command shell"
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now