Sign in to follow this  
Followers 0
banjoman

running a 'power point show' file

7 posts in this topic

:P

how can I run a Power Point show file (*.pps) with an Auto-it script?

the Run command only runs certain files (*.exe, *.bat etc)

thanks

Share this post


Link to post
Share on other sites



This tested ok

$fullpath = @MyDocumentsDir & '\Backups\Mail\Attachments\Chat rieur.pps'
RunWait(@ComSpec & ' /c ' & '"' & $fullpath & '"', '', @SW_HIDE)

:P

Share this post


Link to post
Share on other sites

I think that Run() can run any file type that is already registered in your Windows system (i.e. *.pps are registered to Microsoft Powerpoint, *.txt to Notepad and so on).

If you change the program you want to open each file type with, Run's behaviour should also change automatically.

Share this post


Link to post
Share on other sites

I think that Run() can run any file type that is already registered in your Windows system (i.e. *.pps are registered to Microsoft Powerpoint, *.txt to Notepad and so on).

If you change the program you want to open each file type with, Run's behaviour should also change automatically.

AFAIK, Run() does not check associations in the registry. :lmao:

I receive a Unable to execute the external program error for even trying. :P

Share this post


Link to post
Share on other sites

AFAIK, Run() does not check associations in the registry. :lmao:

I receive a Unable to execute the external program error for even trying. :P

I receive an error too - Unable to execute external program,

the help file lists EXE, BAT, COM, or PIF only to use with the Run command

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

i use start in the run command

RunWait(@COMSPEC & " /c Start Powerpnt.exe", "", @SW_HIDE  )

i believe this searches "registered" programs

also help stats this

6. Why can I only use Run() to execute .exe files? What about .msi / .txt and others?

Only a few file extensions are usually "runable" - these are .exe, .bat, .com, .pif. Other file types like .txt and .msi are actually executed with another program. When you double click on a "myfile.msi" file what actually happens in the background is that "msiexec.exe myfile.msi" is executed. So to run a .msi file from AutoIt you would do:

RunWait("msiexec myfile.msi")

Or, an even simpler way is to run the command "start" which will automatically work out how to execute the file for you:

RunWait(@COMSPEC & " /c Start myfile.msi")

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0