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

Posted On: Saturday 22nd of September 2012 04:20:18 AM Total Views:  208
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




What's new in Tiburon

CodeGear has started blogging about things we will see in Tiburon: http://blogs.codegear.com/nickhodges/2008/07/15/39066 http://blogs.codegear.com/davidi/2008/07/15/38895 http://blogs.codegear.com/davidi/2008/07/15/38898 http://chrisbensen.blogspot.com/2008...of-tiburn.html http://chrisbensen.blogspot.com/2008...l-palette.html http://chrisbensen.blogspot.com/2008...-peek-com.html http://chrisbensen.blogspot.com/2008...m-wizards.html http://blogs.codegear.com/ao/2008/07/16/38938 http://blogs.codegear.com/abauer/2008/07/16/38864 --
VIEWS ON THIS POST

145

Posted on:

Wednesday 19th September 2012
View Replies!

Multicast Events for Win32, in my (new-ish) blog

Not strictly speaking "non-technical" at all, aside from the fact that my blog was a breeze to get up and running. A visitor to my blog (www.deltics.co.nz/blog) kindly pointed out that a post I made via google groups wasn't showing up here on the official servers and suggested I re-post directly.
VIEWS ON THIS POST

122

Posted on:

Wednesday 19th September 2012
View Replies!

Save desktop not works

I use D2007 with an application I've create. Few days ago the IDE stop saving the desktop configuration (the .dsk file remains unchanged with older date). If I delete the .dsk file, the IDE recreates it but after this, makes no other changes. How can I solve this please
VIEWS ON THIS POST

137

Posted on:

Thursday 20th September 2012
View Replies!

[Delphi 2007] How can i set that delphi start form # from 1(after starting a new VCL project)?

Ahmadi wrote: > After starting new VCL Form Project, my form and unit #(postfix number) is 5 > , sometime is 4! It uses the lowest number that's higher than any of the forms or units that are already in your project folder. > Its wonderful that if my first form # is 5 and i create new form its number > is 7 !!! > [Delphi 2007] How can i set that delphi start form # from 1(after starting a > new VCL project) Delete the other form or unit files from your default project folder. Better yet, give your forms and units meaningful names. The numbers don't tell you or anyone else what your forms or units are for. -- Rob
VIEWS ON THIS POST

303

Posted on:

Friday 21st September 2012
View Replies!

Auto-Alphabetizing on new event

, I am migrating a large project from Delphi 5 to Delphi 2007 and am a little annoyed at one of the new features. In our code set we have a very specific way of laying out PAS files: {create constructor} {destroy constructor} {private methods} {protected methods} {public methods} {delphi managed events} This has worked well for our company for the last 10 years. Now that we are moving to D2007, the editor wants to put all new events in alpha order. While this might have been cool back had we done this from the start, it really causes a big mess with our current code-set. Is there a way to keep the editor from automatically adding new events in alphabetical order and add them at the end like it use to
VIEWS ON THIS POST

101

Posted on:

Friday 21st September 2012
View Replies!

Technology Partner news group / Partner portal inaccessible

Newsgroup server answers: Authentivication error Partner Portal answers: Unknown e-mail address I used: http://tp.codegear.com Helmuth J.H. Adolph
VIEWS ON THIS POST

144

Posted on:

Friday 21st September 2012
View Replies!

Sending internet forms!

Hi! I need to send form from Delphi to a php script. Thus far this was done using POST command and ASP. Another option is this: http://secretgeek.net/XMLSendReceive.shtml Which component set, technology in Delphi would allow me to do that My form has only two text fields and I would generate the form only for the purpose of sending data to another web server.
VIEWS ON THIS POST

135

Posted on:

Saturday 22nd September 2012
View Replies!

Tiburon and the "new" DataSnap framework

Will that feature be available in the Professional SKU Does anyone know Cheers A
VIEWS ON THIS POST

92

Posted on:

Saturday 22nd September 2012
View Replies!