PDA

View Full Version : Why Style Xp Sometimes Wont Start



yxuz
03-17-2004, 02:19 PM
why

Lamsey
03-17-2004, 02:33 PM
Hear hear :huh:

yxuz
03-17-2004, 02:48 PM
my registered style xp sometimes wont start with windows xp
and it remains the old crappy theme
but sometimes it works fine

what is the reason behind it

Marius24
03-17-2004, 04:50 PM
open style XP and select REapply theme at startup :)

Lamsey
03-17-2004, 05:25 PM
Originally posted by Marius24@17 March 2004 - 15:50
open style XP and select REapply theme at startup :)
I do that... I just wonder why it doesn't work automatically all the time :unsure:

Lite
03-17-2004, 06:17 PM
One of the many reason i use a patched uxtheme.dll ;) :01:

Wolfmight
03-17-2004, 08:17 PM
Originally posted by Lite@17 March 2004 - 12:17
One of the many reason i use a patched uxtheme.dll ;) :01:
eh?

sharedholder
03-17-2004, 08:30 PM
http://www.softpedia.com/public/cat/9/3/9-3-8.shtml

vivitron 15
03-17-2004, 08:56 PM
Originally posted by Lite@17 March 2004 - 18:17
One of the many reason i use a patched uxtheme.dll ;) :01:
its so much easier and nicer to do it this way - takes less resources, and no crappy program to run. :D

Marius24
03-17-2004, 09:58 PM
Originally posted by vivitron 15+17 March 2004 - 19:56--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (vivitron 15 @ 17 March 2004 - 19:56)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-Lite@17 March 2004 - 18:17
One of the many reason i use a patched uxtheme.dll&nbsp; ;)&nbsp; :01:
its so much easier and nicer to do it this way - takes less resources, and no crappy program to run. :D [/b][/quote]
well I like running that &#39;crappy&#39; program :P

Lite
03-17-2004, 10:14 PM
#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT 0x0501

#include &#34;windows.h&#34;
#include &#60;stdio.h&#62;

void PreserveOriginal&#40;LPCTSTR szPath&#41;
{
char szOrg&#91;MAX_PATH&#93;;
char szNew&#91;MAX_PATH&#93;;

strcpy&#40;szOrg, szPath&#41;;
strcpy&#40;szNew, szPath&#41;;

strcat&#40;szOrg, &#34;uxtheme.dll&#34;&#41;;
strcat&#40;szNew, &#34;uxtheme_original.dll&#34;&#41;;

BOOL bCancel = FALSE;
// if it exists, leave it alone. &nbsp;its already backed up.
CopyFile&#40;szOrg, szNew, TRUE&#41;;
}

void PatchFile&#40;LPCTSTR pszDir, LPCTSTR pszFile, BOOL bNoMsg = FALSE&#41;
{
char szFilename&#91;MAX_PATH&#93;;
strcpy&#40;szFilename, pszDir&#41;;
strcat&#40;szFilename, pszFile&#41;;

HANDLE hFile = CreateFile&#40;szFilename, FILE_ALL_ACCESS, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL&#41;;
if &#40;hFile && hFile &#33;= INVALID_HANDLE_VALUE&#41;
{
&nbsp;// search sequence for XP
&nbsp;BYTE bSearchSeq&#91;8&#93; = {0x81, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x56, 0x57};
&nbsp;// search sequence for Server 2003
&nbsp;BYTE bSearchSeq2&#91;8&#93; = {0x81, 0xEC, 0x84, 0x00, 0x00, 0x00, 0xA1, 0x2C};

&nbsp;BYTE bRead&#91;8&#93; = {0, 0, 0, 0, 0, 0, 0, 0};
&nbsp;BYTE bPatch&#91;8&#93; = {0x33, 0xF6, 0x8B, 0xC6, 0xC9, 0xC2, 0x08, 0x00};
&nbsp;DWORD dwRead = 0;
&nbsp;DWORD dwWrite = 0;

&nbsp;while &#40;ReadFile&#40;hFile, &#40;void*&#41;&bRead&#91;7&#93;, 1, &dwRead, NULL&#41;&#41;
&nbsp;{
&nbsp; if &#40;dwRead == 0&#41;
&nbsp; &nbsp;break;

&nbsp; if &#40;&#40;memcmp&#40;bRead, bSearchSeq, 8&#41; == 0&#41; || &#40;memcmp&#40;bRead, bSearchSeq2, 8&#41; == 0&#41;&#41;
&nbsp; {
&nbsp; &nbsp;SetFilePointer&#40;hFile, -8, NULL, FILE_CURRENT&#41;;
&nbsp; &nbsp;WriteFile&#40;hFile, &bPatch, 8, &dwWrite, NULL&#41;;
&nbsp; &nbsp;CloseHandle&#40;hFile&#41;;
&nbsp; &nbsp;return;
&nbsp; }
&nbsp; else
&nbsp; {
&nbsp; &nbsp;bRead&#91;0&#93; = bRead&#91;1&#93;;
&nbsp; &nbsp;bRead&#91;1&#93; = bRead&#91;2&#93;;
&nbsp; &nbsp;bRead&#91;2&#93; = bRead&#91;3&#93;;
&nbsp; &nbsp;bRead&#91;3&#93; = bRead&#91;4&#93;;
&nbsp; &nbsp;bRead&#91;4&#93; = bRead&#91;5&#93;;
&nbsp; &nbsp;bRead&#91;5&#93; = bRead&#91;6&#93;;
&nbsp; &nbsp;bRead&#91;6&#93; = bRead&#91;7&#93;;
&nbsp; &nbsp;bRead&#91;7&#93; = 0;
&nbsp; }
&nbsp;}

&nbsp;CloseHandle&#40;hFile&#41;;
&nbsp;if &#40;&#33;bNoMsg&#41;
&nbsp; MessageBox&#40;NULL, &#34;Unable to find search bytes in UXTHEME.DLL&#33;&#092;nIt may already be patched.&#34;, &#34;UxThemePatch Error&#33;&#34;, MB_ICONERROR&#41;;
}
}

int WINAPI WinMain&#40;HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow&#41;
{
char szWinDir&#91;MAX_PATH&#93;;
char szDir1&#91;MAX_PATH&#93;; // sp files
char szDir2&#91;MAX_PATH&#93;; // dllcache
char szDir3&#91;MAX_PATH&#93;; // system32
char szDir4&#91;MAX_PATH&#93;;

GetWindowsDirectory&#40;szWinDir, MAX_PATH&#41;;

strcpy&#40;szDir1, szWinDir&#41;;
strcat&#40;szDir1, &#34;&#092;&#092;ServicePackFiles&#092;&#092;i386&#092;&#092;&#34;&#41;;

strcpy&#40;szDir2, szWinDir&#41;;
strcat&#40;szDir2, &#34;&#092;&#092;system32&#092;&#092;dllcache&#092;&#092;&#34;&#41;;

strcpy&#40;szDir3, szWinDir&#41;;
strcat&#40;szDir3, &#34;&#092;&#092;system32&#092;&#092;&#34;&#41;;

// move to the system32 dir to make the copy easier
SetCurrentDirectory&#40;szDir3&#41;;

if &#40;stricmp&#40;lpCmdLine, &#34;-uninstall&#34;&#41; == 0&#41;
{
&nbsp;DeleteFile&#40;&#34;uxtheme_patched.dll&#34;&#41;;
&nbsp;DeleteFile&#40;&#34;uxtheme_locked.dll&#34;&#41;;
&nbsp;DeleteFile&#40;&#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;&#41;;
&nbsp;CopyFile&#40;&#34;uxtheme_original.dll&#34;, &#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;, FALSE&#41;;
&nbsp;MoveFile&#40;&#34;uxtheme.dll&#34;, &#34;uxtheme_locked.dll&#34;&#41;;
&nbsp;CopyFile&#40;&#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;, &#34;uxtheme.dll&#34;, FALSE&#41;;
&nbsp;return 0;
}

// many pre-built pc mfg&#39;s put this dir there, so we&#39;ll patch it too.
strcpy&#40;szDir4, &#34;c&#58;&#092;&#092;i386&#092;&#092;&#34;&#41;;

PatchFile&#40;szDir4, &#34;uxtheme.dll&#34;, TRUE&#41;;
PatchFile&#40;szDir1, &#34;uxtheme.dll&#34;, TRUE&#41;;

PreserveOriginal&#40;szDir3&#41;;
MessageBox&#40;NULL, &#34;Preparing to patch UXTHEME.DLL.&#092;n&#092;nThe original has been saved as &#092;&#092;system32&#092;&#092;UXTHEME_ORIGINAL.DLL.&#34;, &#34;Information&#34;, MB_ICONINFORMATION&#41;;

// patch system32&#092;uxtheme_patched.dll first.
CopyFile&#40;&#34;uxtheme.dll&#34;, &#34;uxtheme_patched.dll&#34;, FALSE&#41;;
PatchFile&#40;szDir3, &#34;uxtheme_patched.dll&#34;&#41;;

// then copy it into &#092;dllcache
CopyFile&#40;&#34;uxtheme_patched.dll&#34;, &#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;, FALSE&#41;;
// &#092;system32&#39;s uxtheme is probably locked, so we need to rename it.
if &#40;&#33;MoveFile&#40;&#34;uxtheme.dll&#34;, &#34;uxtheme_locked.dll&#34;&#41;&#41;
{
&nbsp;MessageBox&#40;NULL, &#34;Please remove &#092;&#092;SYSTEM32&#092;&#092;UXTHEME_LOCKED.DLL and restart this application.&#34;, &#34;UxThemePatch Error&#33;&#34;, MB_ICONERROR&#41;;
&nbsp;return 0;
}
// then copy the patched version back in. &nbsp;WFP is a pain to work around isn&#39;t it?
CopyFile&#40;&#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;, &#34;uxtheme.dll&#34;, FALSE&#41;;

MessageBox&#40;NULL, &#34;Patch completed. &nbsp;Reboot for changes to take effect.&#092;n&#092;nIgnore any File Protection dialogs that may come up.&#34;, &#34;UxThemePatch Information&#34;, MB_ICONINFORMATION&#41;;
return 0;
}


:01:

shn
03-17-2004, 10:17 PM
Originally posted by Lite@17 March 2004 - 16:14

#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT 0x0501

#include &#34;windows.h&#34;
#include &#60;stdio.h&#62;

void PreserveOriginal&#40;LPCTSTR szPath&#41;
{
char szOrg&#91;MAX_PATH&#93;;
char szNew&#91;MAX_PATH&#93;;

strcpy&#40;szOrg, szPath&#41;;
strcpy&#40;szNew, szPath&#41;;

strcat&#40;szOrg, &#34;uxtheme.dll&#34;&#41;;
strcat&#40;szNew, &#34;uxtheme_original.dll&#34;&#41;;

BOOL bCancel = FALSE;
// if it exists, leave it alone. &nbsp;its already backed up.
CopyFile&#40;szOrg, szNew, TRUE&#41;;
}

void PatchFile&#40;LPCTSTR pszDir, LPCTSTR pszFile, BOOL bNoMsg = FALSE&#41;
{
char szFilename&#91;MAX_PATH&#93;;
strcpy&#40;szFilename, pszDir&#41;;
strcat&#40;szFilename, pszFile&#41;;

HANDLE hFile = CreateFile&#40;szFilename, FILE_ALL_ACCESS, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL&#41;;
if &#40;hFile && hFile &#33;= INVALID_HANDLE_VALUE&#41;
{
&nbsp;// search sequence for XP
&nbsp;BYTE bSearchSeq&#91;8&#93; = {0x81, 0xEC, 0x80, 0x00, 0x00, 0x00, 0x56, 0x57};
&nbsp;// search sequence for Server 2003
&nbsp;BYTE bSearchSeq2&#91;8&#93; = {0x81, 0xEC, 0x84, 0x00, 0x00, 0x00, 0xA1, 0x2C};

&nbsp;BYTE bRead&#91;8&#93; = {0, 0, 0, 0, 0, 0, 0, 0};
&nbsp;BYTE bPatch&#91;8&#93; = {0x33, 0xF6, 0x8B, 0xC6, 0xC9, 0xC2, 0x08, 0x00};
&nbsp;DWORD dwRead = 0;
&nbsp;DWORD dwWrite = 0;

&nbsp;while &#40;ReadFile&#40;hFile, &#40;void*&#41;&bRead&#91;7&#93;, 1, &dwRead, NULL&#41;&#41;
&nbsp;{
&nbsp; if &#40;dwRead == 0&#41;
&nbsp; &nbsp;break;

&nbsp; if &#40;&#40;memcmp&#40;bRead, bSearchSeq, 8&#41; == 0&#41; || &#40;memcmp&#40;bRead, bSearchSeq2, 8&#41; == 0&#41;&#41;
&nbsp; {
&nbsp; &nbsp;SetFilePointer&#40;hFile, -8, NULL, FILE_CURRENT&#41;;
&nbsp; &nbsp;WriteFile&#40;hFile, &bPatch, 8, &dwWrite, NULL&#41;;
&nbsp; &nbsp;CloseHandle&#40;hFile&#41;;
&nbsp; &nbsp;return;
&nbsp; }
&nbsp; else
&nbsp; {
&nbsp; &nbsp;bRead&#91;0&#93; = bRead&#91;1&#93;;
&nbsp; &nbsp;bRead&#91;1&#93; = bRead&#91;2&#93;;
&nbsp; &nbsp;bRead&#91;2&#93; = bRead&#91;3&#93;;
&nbsp; &nbsp;bRead&#91;3&#93; = bRead&#91;4&#93;;
&nbsp; &nbsp;bRead&#91;4&#93; = bRead&#91;5&#93;;
&nbsp; &nbsp;bRead&#91;5&#93; = bRead&#91;6&#93;;
&nbsp; &nbsp;bRead&#91;6&#93; = bRead&#91;7&#93;;
&nbsp; &nbsp;bRead&#91;7&#93; = 0;
&nbsp; }
&nbsp;}

&nbsp;CloseHandle&#40;hFile&#41;;
&nbsp;if &#40;&#33;bNoMsg&#41;
&nbsp; MessageBox&#40;NULL, &#34;Unable to find search bytes in UXTHEME.DLL&#33;&#092;nIt may already be patched.&#34;, &#34;UxThemePatch Error&#33;&#34;, MB_ICONERROR&#41;;
}
}

int WINAPI WinMain&#40;HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow&#41;
{
char szWinDir&#91;MAX_PATH&#93;;
char szDir1&#91;MAX_PATH&#93;; // sp files
char szDir2&#91;MAX_PATH&#93;; // dllcache
char szDir3&#91;MAX_PATH&#93;; // system32
char szDir4&#91;MAX_PATH&#93;;

GetWindowsDirectory&#40;szWinDir, MAX_PATH&#41;;

strcpy&#40;szDir1, szWinDir&#41;;
strcat&#40;szDir1, &#34;&#092;&#092;ServicePackFiles&#092;&#092;i386&#092;&#092;&#34;&#41;;

strcpy&#40;szDir2, szWinDir&#41;;
strcat&#40;szDir2, &#34;&#092;&#092;system32&#092;&#092;dllcache&#092;&#092;&#34;&#41;;

strcpy&#40;szDir3, szWinDir&#41;;
strcat&#40;szDir3, &#34;&#092;&#092;system32&#092;&#092;&#34;&#41;;

// move to the system32 dir to make the copy easier
SetCurrentDirectory&#40;szDir3&#41;;

if &#40;stricmp&#40;lpCmdLine, &#34;-uninstall&#34;&#41; == 0&#41;
{
&nbsp;DeleteFile&#40;&#34;uxtheme_patched.dll&#34;&#41;;
&nbsp;DeleteFile&#40;&#34;uxtheme_locked.dll&#34;&#41;;
&nbsp;DeleteFile&#40;&#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;&#41;;
&nbsp;CopyFile&#40;&#34;uxtheme_original.dll&#34;, &#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;, FALSE&#41;;
&nbsp;MoveFile&#40;&#34;uxtheme.dll&#34;, &#34;uxtheme_locked.dll&#34;&#41;;
&nbsp;CopyFile&#40;&#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;, &#34;uxtheme.dll&#34;, FALSE&#41;;
&nbsp;return 0;
}

// many pre-built pc mfg&#39;s put this dir there, so we&#39;ll patch it too.
strcpy&#40;szDir4, &#34;c&#58;&#092;&#092;i386&#092;&#092;&#34;&#41;;

PatchFile&#40;szDir4, &#34;uxtheme.dll&#34;, TRUE&#41;;
PatchFile&#40;szDir1, &#34;uxtheme.dll&#34;, TRUE&#41;;

PreserveOriginal&#40;szDir3&#41;;
MessageBox&#40;NULL, &#34;Preparing to patch UXTHEME.DLL.&#092;n&#092;nThe original has been saved as &#092;&#092;system32&#092;&#092;UXTHEME_ORIGINAL.DLL.&#34;, &#34;Information&#34;, MB_ICONINFORMATION&#41;;

// patch system32&#092;uxtheme_patched.dll first.
CopyFile&#40;&#34;uxtheme.dll&#34;, &#34;uxtheme_patched.dll&#34;, FALSE&#41;;
PatchFile&#40;szDir3, &#34;uxtheme_patched.dll&#34;&#41;;

// then copy it into &#092;dllcache
CopyFile&#40;&#34;uxtheme_patched.dll&#34;, &#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;, FALSE&#41;;
// &#092;system32&#39;s uxtheme is probably locked, so we need to rename it.
if &#40;&#33;MoveFile&#40;&#34;uxtheme.dll&#34;, &#34;uxtheme_locked.dll&#34;&#41;&#41;
{
&nbsp;MessageBox&#40;NULL, &#34;Please remove &#092;&#092;SYSTEM32&#092;&#092;UXTHEME_LOCKED.DLL and restart this application.&#34;, &#34;UxThemePatch Error&#33;&#34;, MB_ICONERROR&#41;;
&nbsp;return 0;
}
// then copy the patched version back in. &nbsp;WFP is a pain to work around isn&#39;t it?
CopyFile&#40;&#34;.&#092;&#092;dllcache&#092;&#092;uxtheme.dll&#34;, &#34;uxtheme.dll&#34;, FALSE&#41;;

MessageBox&#40;NULL, &#34;Patch completed. &nbsp;Reboot for changes to take effect.&#092;n&#092;nIgnore any File Protection dialogs that may come up.&#34;, &#34;UxThemePatch Information&#34;, MB_ICONINFORMATION&#41;;
return 0;
}


:01:
Who cares dude.

I like running that crappy program as well. :)

Izagaia
03-18-2004, 01:20 AM
StyleXP tends to be somewhat sensitive on systems that may have, at one time, used the freeware UXtheme.dll patch. Or if you have ever had StarSkin or even WindowBlinds installed.

Or if you recently upgraded a component to your system or modified it in any way that makes the hardware key unrecognizable to the software- you will have problems.

I suppose the first thing I would check for is to make certain that the correct box is checkmarked in the options screen (run at start up). Or if the "stylexp service.exe" process is running within your taskmanager. Version 2.0 (betas, RC and 2.01) is buggy to begin with, IMO. Users have been complaining regarding all sorts of areas; icon sets not reverting back to XP default, boot screen.ini not applying or failing to start along with a few other nuiscances.

Uninstalling the software completely from your system may wipe out a corrupted file if that were the case. Meaning to be certain that along with the uninstall itself, you remove what is ever leftover from C:&#092;Program Files&#092;TGT Soft and also within your registry. I had to do that once after using StarSkin with the "emulate theme support" option enabled while having StyleXP also installed.

If you did purchase StyleXP, though whatever the case, legitimately then I would just send an email to Thomas Dimitri "[email protected]" or to Kevin Koch "[email protected]". They are good people and almost always respond no more than a few days at worst. :)

Monkster
03-18-2004, 06:08 AM
I&#39;ve never had any problems with Style XP :)