bombtrack Posted June 11, 2004 Posted June 11, 2004 (edited) hi, i was wondering if it wa possible to start a .exe file in compability mode XP through a batch file.like mabeysetup.exe /compab:2000or something like that, anybody know if its possible ??thx in advance bombtrack Edited June 11, 2004 by bombtrack
DarkPhoenix Posted June 11, 2004 Posted June 11, 2004 It is possible, but it's extremely hard to do, at least I believe so... the compability mode works in the registry, inHKEY_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.
[Sx]rednaS Posted June 16, 2004 Posted June 16, 2004 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.regTYPE ProfileList.reg > ProfileList.txtDEL ProfileList.regFINDSTR /R .*S-1-5-21.* ProfileList.txt > MyUsercode.txtDEL ProfileList.txtFOR /F "USEBACKQ TOKENS=1,2 DELIMS==" %%I IN (MyUsercode.txt) DO ( SET Usercode=%%I)DEL MyUsercode.txtSET Usercode=%Usercode:~77,-1%Just add 1 or more REG ADD lines, using the Usercode variable, to the batchfile and you'r done.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now