MSFN Forum: compability mode via command line - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

compability mode via command line is it possible? Rate Topic: -----

#1 User is offline   bombtrack 

  • boooom
  • PipPip
  • Group: Members
  • Posts: 161
  • Joined: 02-January 04

Posted 11 June 2004 - 09:56 AM

hi, i was wondering if it wa possible to start a .exe file in compability mode XP through a batch file.

like mabey

setup.exe /compab:2000

or something like that, anybody know if its possible ??

thx in advance bombtrack

This post has been edited by bombtrack: 11 June 2004 - 09:58 AM



#2 User is offline   DarkPhoenix 

  • Codename: Kirby
  • PipPip
  • Group: Members
  • Posts: 201
  • Joined: 30-May 04

Posted 11 June 2004 - 10:25 AM

It is possible, but it's extremely hard to do, at least I believe so... the compability mode works in the registry, in

HKEY_USERS\<UserCode>\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\, where you'd add an entry, called for example "C:\Windows\Program.exe", a REG_SZ type (string), and set its value to "WIN2000". The hard part is figuring out what your UserCode is. I don't know a way, but maybe somebody else knows.

#3 User is offline   bombtrack 

  • boooom
  • PipPip
  • Group: Members
  • Posts: 161
  • Joined: 02-January 04

Posted 11 June 2004 - 12:03 PM

i hope somebody kows how :)

#4 User is offline   [Sx]rednaS 

  • Group: Members
  • Posts: 1
  • Joined: 13-June 04

Posted 16 June 2004 - 03:32 PM

I found a way to get the usercode. Below is my batchfile to get it. It only works if you are the only user on the pc because then there will be only one S-1-5-21 entry in the registry key below. To work on a multi-user pc more coding has to be done but that is a bit more difficult.

REG EXPORT "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" ProfileList.reg
TYPE ProfileList.reg > ProfileList.txt
DEL ProfileList.reg
FINDSTR /R .*S-1-5-21.* ProfileList.txt > MyUsercode.txt
DEL ProfileList.txt
FOR /F "USEBACKQ TOKENS=1,2 DELIMS==" %%I IN (MyUsercode.txt) DO (
 SET Usercode=%%I
)
DEL MyUsercode.txt

SET Usercode=%Usercode:~77,-1%


Just add 1 or more REG ADD lines, using the Usercode variable, to the batchfile and you'r done.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy