So if you want to be totally up-beat or perhaps are testing out Boxee then you will want to install the latest Adobe Flash Player (Boxee actually seem to require this), but no worries you can get it right here;
http://labs.adobe.com/downloads/flashplayer10.html
Among other things this version will add HW acceleration, neat for Netbooks as compatible GFX cards now can assist in playing video and thus perhaps adding HD playback to your otherwise slow Atom processor (however this DO require a compatible GFX card to work like the Nvidia ION and others).
Here is how to start and stop a service via WMI calls from a .vbs;
'Start Service
strServiceName = "Alerter"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery ("Select * from Win32_Service Where Name ='" & strServiceName & "'")
For Each objService in colListOfServices
objService.StartService()
Next
'Stop Service
strServiceName = "Alerter"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery("Select * from Win32_Service Where Name ='" & strServiceName & "'")
For Each objService in colListOfServices
objService.StopService()
Next
If you are still creating Delphi 7 applications, then you may have had problems with UAC in Windows Vista, 7 and 2008, your application launches but is unable to eg. access the HKEY-LOCAL-MACHINE hive of the registry, what you need is to have the application launch with Administrative rights.
You could just rightclick on the application icon and choose “Run as administrator” however this is hardly professional for a program you distribute to others.
Well, it took a bit of Googling and a bit of experimenting, but here’s the recipe to creating UAC aware applications in Delphi 7.
First, create a new application and save the project.
In the project directory you just created create 2 files;
.
The first file “UAC.MANIFEST” should look like this;
—————————————————————————–
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<assembly xmlns=”urn:schemas-microsoft-com:asm.v1″ manifestVersion=”1.0″>
<assemblyIdentity version=”1.0.0.0″ processorArchitecture=”*” name=”UACAwareApplication” type=”win32″/>
<trustInfo xmlns=”urn:schemas-microsoft-com:asm.v3″>
<security>
<requestedPrivileges>
<requestedExecutionLevel level=”requireAdministrator”/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
—————————————————————————–
.
Second file “vistaprog.rc” should look like this;
—————————————————————————–
1 24 uac.manifest
—————————————————————————–
(yes it’s only one line)
.
Now you need to compile the “vistaprog.rc” file.
you do this by running the “brcc32.exe” (found in the Delphi Bin directory) with this parameter “brcc32.exe vistaprog.rc“, this will compile a “vistaprog.res” file (this is a bit different/easier on Delphi 2007 etc, see links at the bottom for more details).
.
Now you will need to modify your Delphi project.
In the “unit1.pas” file find {$R *.dfm} and insert {$R ‘vistaprog.res’} just below it, save the project and compile it.
You application is now Vista/Windows 7/2008 UAC aware, you will also notice that a small shield is added to the application icon.
When you run your application it will look aimilar to this;
https://readmydamnblog.com/wp-content/uploads/2015/02/toplogo4.png00Mikehttps://readmydamnblog.com/wp-content/uploads/2015/02/toplogo4.pngMike2010-02-12 20:37:222010-02-12 20:49:07Creating a Delphi 7 application that triggers UAC
Adobe Flash Player v.10.1 beta download
Drivers, Graphics, TV, Video, WebStart / Stop services via WMI vbs
ScriptingHere is how to start and stop a service via WMI calls from a .vbs;
'Start Service strServiceName = "Alerter" Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set colListOfServices = objWMIService.ExecQuery ("Select * from Win32_Service Where Name ='" & strServiceName & "'") For Each objService in colListOfServices objService.StartService() Next'Stop Service strServiceName = "Alerter" Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set colListOfServices = objWMIService.ExecQuery("Select * from Win32_Service Where Name ='" & strServiceName & "'") For Each objService in colListOfServices objService.StopService() NextCreating a Delphi 7 application that triggers UAC
Devlopment, OSYou could just rightclick on the application icon and choose “Run as administrator” however this is hardly professional for a program you distribute to others.
Well, it took a bit of Googling and a bit of experimenting, but here’s the recipe to creating UAC aware applications in Delphi 7.
In the project directory you just created create 2 files;
.
—————————————————————————–
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<assembly xmlns=”urn:schemas-microsoft-com:asm.v1″ manifestVersion=”1.0″>
<assemblyIdentity version=”1.0.0.0″ processorArchitecture=”*” name=”UACAwareApplication” type=”win32″/>
<trustInfo xmlns=”urn:schemas-microsoft-com:asm.v3″>
<security>
<requestedPrivileges>
<requestedExecutionLevel level=”requireAdministrator”/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
—————————————————————————–
.
—————————————————————————–
1 24 uac.manifest
—————————————————————————–
(yes it’s only one line)
.
you do this by running the “brcc32.exe” (found in the Delphi Bin directory) with this parameter “brcc32.exe vistaprog.rc“, this will compile a “vistaprog.res” file (this is a bit different/easier on Delphi 2007 etc, see links at the bottom for more details).
.
In the “unit1.pas” file find {$R *.dfm} and insert {$R ‘vistaprog.res’} just below it, save the project and compile it.
You application is now Vista/Windows 7/2008 UAC aware, you will also notice that a small shield is added to the application icon.
When you run your application it will look aimilar to this;
Read more here;
http://www.zhou73.cn/index.php/article/zhou73/2009-02-18/195.html
http://www.zhou73.cn/index.php/article/zhou73/2009-02-18/196.html
http://ruminatedrumblings.blogspot.com/2008/03/vista-uac-manifest.html
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22755023.html