Vista and the registry, does this look ok to you?


I'm after any feedback on how I'm doing things (I'm just a home programmer, so please be forgiving ;-) On vista I found that I'd broken some of the rules about accessing the registry and my programs either died ...
Posted On: Tuesday 27th of November 2012 12:57:17 AM Total Views:  278
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




Can't execute internet explorer and inkball on new desktop in vista

Hi all, I tried to execute internet explorer and inkball on new desktop in vista,but it didn't work with error messages 'You must be an administrator to open Internet Explorer on this desktop. To open Internet Explorer, right-click the Internet Explorer icon, and the click "Run as administrator"' for internet explorer and 'InkBall is not working on your computer right now. Restart your computer and then try again. If the problem persists, contact your system administrator.' for InkBall. I could execute both programs normally on default desktop. Here's my code : program launcher; {$APPTYPE CONSOLE} uses SysUtils, windows; var hOriginalThread : HDesk; hOriginalInput : HDesk; hNewDesktop : HDesk; ProcessInfo : TProcessInformation; aAppName : string; StartupInfo : TStartupInfo; sa : TSecurityAttributes; begin hOriginalThread := GetThreadDesktop(GetCurrentThreadId()); hOriginalInput := OpenInputDesktop(0, FALSE,GENERIC_ALL); hNewDesktop := CreateDesktop('vstDesktop', nil, nil, 0, GENERIC_ALL, nil); SetThreadDesktop(hNewDesktop); SwitchDesktop(hNewDesktop); FillChar(StartupInfo,Sizeof(StartupInfo),#0); StartupInfo.cb := Sizeof(StartupInfo); StartupInfo.dwFlags := STARTF_USESHOWWINDOW; StartupInfo.wShowWindow := SW_SHOW; StartupInfo.lpDesktop := 'vstDesktop'; CreateProcess(nil, 'c:\Program Files\Internet Explorer\iexplore.exe', nil, nil, false, NORMAL_PRIORITY_CLASS, nil, nil,StartupInfo, ProcessInfo); if ProcessInfo.hProcess 0 then begin WaitForSingleObject(ProcessInfo.hProcess, INFINITE); CloseHandle(ProcessInfo.hProcess); ProcessInfo.hProcess := 0; end; FillChar(StartupInfo,Sizeof(StartupInfo),#0); StartupInfo.cb := Sizeof(StartupInfo); StartupInfo.dwFlags := STARTF_USESHOWWINDOW; StartupInfo.wShowWindow := SW_SHOW; StartupInfo.lpDesktop := 'vstDesktop'; CreateProcess(nil, 'c:\Program Files\Microsoft Games\inkball\inkball.exe', nil, nil, false, NORMAL_PRIORITY_CLASS, nil, nil,StartupInfo, ProcessInfo); if ProcessInfo.hProcess 0 then begin WaitForSingleObject(ProcessInfo.hProcess, INFINITE); CloseHandle(ProcessInfo.hProcess); ProcessInfo.hProcess := 0; end; // Restore original desktop SwitchDesktop(hOriginalInput); SetThreadDesktop(hOriginalThread); // Close the Desktop CloseDesktop(hNewDesktop); end. What could be wrong
VIEWS ON THIS POST

287

Posted on:

Saturday 22nd September 2012
View Replies!

How to embed a vista manifest in EXE?

anyone know how to embed a vista manifest in an existing exe
VIEWS ON THIS POST

234

Posted on:

Saturday 22nd September 2012
View Replies!

Font.color don't change on d2007/vista

What's happening is very strange. On my Delphi 2007 enterprise registered version (updated to the last) installed on Vista Business sp1 I can't change the font color of many standard vcls like TRadioGroup, TCheckBox and others. Anyone who have experienced something like this Suggestions
VIEWS ON THIS POST

309

Posted on:

Tuesday 25th September 2012
View Replies!

2007 vista aeroglass support? something missing...

, Ok... I played with doing some glass forms over the weekend and while its easy to extend glass beyond the border of a frame.. what good is it... if you place buttons, labels, etc on the form they dont draw correctly. Searching the internet for solutions i read that it has something to do with delphi not using gdi+ or having support for WPF for drawing on the forms correctly. Will D2008 correct this or am i missing something obvious.
VIEWS ON THIS POST

368

Posted on:

Tuesday 25th September 2012
View Replies!

Reading a different computer's registry file

I have a user.dat registry file from a dead Win98 machine. What is the best way for me to open the file and extract out bits of data that I need I'm assuming the registry api's only work with the machine you are on and with the LIVE registry files. -- Best regards, Harold , "Remy Lebeau (TeamB)" wrote in message > Then you only have a portion of the Registry. You need system.dat as well. Yes I have that one too. > From a programming standpoint (since you did post this to a programming > newsgroup), you would have to open and parse the file manually. Or use a Yeah I wanted to write a program to read the keys out I wanted. the registry components I've seen seem to work only on the machine's registry where I am running the program. Can't get it to open another file, like one of the .dat files.
VIEWS ON THIS POST

278

Posted on:

Thursday 27th September 2012
View Replies!

delphi application on vista

Hi I have application made in Delphi 2007 on XP and on XP is working perfectly but on vista it wont start I get the error message Project1.exe has stopped working what should I do
VIEWS ON THIS POST

436

Posted on:

Saturday 29th September 2012
View Replies!

turbo delphi and vista64

stevel I have recently bought a new notebook from Dell with Vista (should have taken the XP option) for 645 inv VAT and have installed both D6 & D2006 on it. Things seem to work OK. Roy Lambert
VIEWS ON THIS POST

379

Posted on:

Saturday 6th October 2012
View Replies!

2007 vista aeroglass support? something missing...

, Ok... I played with doing some glass forms over the weekend and while its easy to extend glass beyond the border of a frame.. what good is it... if you place buttons, labels, etc on the form they dont draw correctly. Searching the internet for solutions i read that it has something to do with delphi not using gdi+ or having support for WPF for drawing on the forms correctly. Will D2008 correct this or am i missing something obvious.
VIEWS ON THIS POST

199

Posted on:

Tuesday 16th October 2012
View Replies!

Reading a different computer's registry file

I have a user.dat registry file from a dead Win98 machine. What is the best way for me to open the file and extract out bits of data that I need I'm assuming the registry api's only work with the machine you are on and with the LIVE registry files. -- Best regards, Harold , "Remy Lebeau (TeamB)" wrote in message > Then you only have a portion of the Registry. You need system.dat as well. Yes I have that one too. > From a programming standpoint (since you did post this to a programming > newsgroup), you would have to open and parse the file manually. Or use a Yeah I wanted to write a program to read the keys out I wanted. the registry components I've seen seem to work only on the machine's registry where I am running the program. Can't get it to open another file, like one of the .dat files.
VIEWS ON THIS POST

144

Posted on:

Tuesday 16th October 2012
View Replies!

Saving list box values to the registry

Hi , whats the best way to save a list boxes values to the registry. I know I could cycle through each one, but i think there's a better way. Any ideas Cheers, Paul...
VIEWS ON THIS POST

168

Posted on:

Saturday 10th November 2012
View Replies!

How does Windows read the size given to the form?

I believe my display problem with D2006 (See D2006 always show small in borland.public.attachement) due to the Position property of D2006 not 'read' or 'passed' to windows. None of the settings for 'size' or 'position' having any effect on the ...
VIEWS ON THIS POST

143

Posted on:

Saturday 10th November 2012
View Replies!

What does $DF mean?

In this line of code from the Delphi 5 Mastapp demo program; what does $DF mean case Chr(Ord(DateFormat[I]) and $DF) of When I set a break and run the program the value of #DF is 223. Thank you so much, ...
VIEWS ON THIS POST

91

Posted on:

Thursday 15th November 2012
View Replies!

developing on vista machine

Because it can take two to three hours to install delphi and the upgrades and 3rd party components on vista, I'm hoping someone who is doing it can answer a couple of questions. 1. When working on vista, does uac ...
VIEWS ON THIS POST

144

Posted on:

Thursday 15th November 2012
View Replies!

Error: "The root-element does not exists"

Hi! After a Bluescreen while launching RAD Studio I get only the errormessage "The root-element does not exists" while launching RAD Studio again. After starting bds.exe the Splash-Screen appears, some modules were loaded and then this error appears. Since I ...
VIEWS ON THIS POST

111

Posted on:

Thursday 15th November 2012
View Replies!

Canvas Font doesn't match font.

Consider measuring text width for display on a status bar: var szText: string; nWidth: Integer; begin szText := 'www.borland.com'; nWidth := StatusBar1.Canvas.TextWidth(szText); end; You'll get a value, e.g. 85px for a 8pt (12px) font. Then we scale the status bar, ...
VIEWS ON THIS POST

101

Posted on:

Thursday 22nd November 2012
View Replies!

Can't rename a registry key

Can somebody tell me why this does not work: begin //save settings to relevent registry key Reg := TRegistry.Create; try Reg.RootKey := HKEY_CURRENT_USER; if CurrentPlace <> PlaceNames.Text then begin //key has been renamed if Reg.OpenKey(PROGKEY, False) then begin Reg.RenameValue(CurrentPlace, PlaceNames.Text); ...
VIEWS ON THIS POST

113

Posted on:

Thursday 22nd November 2012
View Replies!

Remote Debugger (september 2007 version) doesn't work at all.

I can't even get rmtdbg105.exe launch, with or without the -listen command line parameter. The previous version of rmtdbg105 would actually launch and sit there, but there was no way to get a connection via the IDE, and I have ...
VIEWS ON THIS POST

90

Posted on:

Thursday 22nd November 2012
View Replies!

Programatically set Vista registry

Everyone, How do you programatically set permissions in Vista's registry I am attempting to give Users full control of a particular key in the registry. Andre...
VIEWS ON THIS POST

120

Posted on:

Thursday 22nd November 2012
View Replies!

D2007 compiler messages window does not remember state.

Dennis Cote wrote: > I'm still using BDS 2006 and I wish it worked as you say D2007 does. > > I often have several search result tabs displayed in the Messages > window. If I compile a unit after ...
VIEWS ON THIS POST

103

Posted on:

Thursday 22nd November 2012
View Replies!

Why would this code fail on Vista? (Open file for read using SYstem.Resetraises error 104 on vista)

Warren Postma wrote: > What on EARTH is happening when you call Reset() that causes it to > raise a permission exception on Vista Wild guess: probably a sharing lock. Use SysInternals FileMon to be sure. -- Craig Stuntz [TeamB] ...
VIEWS ON THIS POST

381

Posted on:

Tuesday 27th November 2012
View Replies!