Jump to content

Run("optionalfeatures.exe") shows up blank?


comp9
 Share

Go to solution Solved by Jos,

Recommended Posts

In Windows 7 x64 when I use:

#RequireAdmin

Run("optionalfeatures.exe")

The Windows Features (Turn Windows features on or off) control panel displays but area that is supposed to display what is installed and what can be changed is blank, nothing ever loads in the blank space. I have also tried using RunAs and running it as the current user with the same results.

 

If I manually launch optionalfeatures.exe myself (through Task Manager, Command Prompt, Run) it shows up fine. There only seems to be a problem if AutoIT launches it.

Link to comment
Share on other sites

  • Developers

Assume you have an x64 windows and running the script with the x86 version of AutoIt3.

Run the script with the x64 version of AutoIt3.

When you have the full SciTE4AutoIt3 installed you just add  this to the top:

#AutoIt3Wrapper_UseX64=y

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Thank you Jos that gets me further.

I changed the script to read:

#AutoIt3Wrapper_UseX64=y
#RequireAdmin
Run("OptionalFeatures.exe")
 
I also tried using ShellExecute("OptionalFeatures.exe") in place of Run
 
When I double click on the script and say yes to the UAC prompt the script opens up OptionalFeatures but it is still blank. If I choose Compile Script the compiled script does the same. Your x64 comment gave me an idea though. If I right-click on the script and choose "Run Script (x64)" it works, although all of the little folder icons change to an icon of a tv for some reason.
 
If I take out #AutoIt3Wrapper_UseX64=y and choose "Run Script (x64)" from the context menu again the script still works.
 
Am I missing something to get the script to run automatically as x64 when I put your suggested line? Any idea why all the Optional Feature selection icons (to the right of the checkboxes) change to a TV icon instead of the usual folder icon?
 
I have been using tab and keyboard arrows/space bar to select features. Is there a way I select the features based on location in the list or name?
 
Edit: I do have the full SciTE4AutoIt3 installed.
Edited by comp9
Link to comment
Share on other sites

Okay the full version is already downloaded and installed. I reinstalled it now for good measure. I'm still having the same results.

This is where I got the full version https://www.autoitscript.com/site/autoit-script-editor/downloads/

SciTE4AutoIt3.exe 8/1/2014 Installer containing SciTE and all configuration files plus utilities.

Do I have the full version you are talking about? When I edit scripts it appears to have all the features the full version should have, based on when I was using AutoIT and SciTE a few years ago.

Link to comment
Share on other sites

  • Developers

Show me the scite output pane information when you run your script with F5 so i can see what is happening.

Also show the script you test with.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I appreciate your help Jos, in my research on Google as I've been making scripts I've come across posts with helpful replies from you all over the place. I didn't expect to see you here on my post, it was a pleasant surprise.

The script is shown in my above post. I'm keeping it simple until I figure out how to get the first part working. I'll post it again here for easy reference:

#AutoIt3Wrapper_UseX64=y
#RequireAdmin
Run("OptionalFeatures.exe")
 
I went to View - Output
Then I went to Tools - "Compile"   |  Changed nothing and pressed Compile Script.
For some reason it worked this time. I guess that "Compile" is different than right-clicking on the script and choosing "Compile Script"
 
Do I have to compile the script every time or is there a way to make it so I can double-click the script on my desktop and it will see the line you had me and run as x64? Perhaps I have to right-click and choose run as x64 each time (without making it run ALL my scripts as x64 all the time)?
 
There is still something puzzling. When I run the compiled script it pulls up OptionalFeatures alright but all the icons appear they may be corrupt because they are not the correct icons. Should I be worried that going foward and manipulating these options with the incorrect icon could have adverse consequences?
 
Not sure how to post a picture so that you can see what I mean but you likely have x64 Windows 7 and it likely happens on Windows 8.1 as well so you can see it on your end fairly easily.
Link to comment
Share on other sites

  • Developers
  • Solution

Understand your problem now.

The rightclick compile simply compiles the script with the default aut2exe, which is the x86 version likely.

The #autoit3wrapper directives are only valid when you do this from scite F7 as that shells the autoit3wrapper script and performs anything being told to perform through these directives.

Jos :)

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Why don't you use the command line to (un)install features?

pkgmgr /iu:"TelnetClient"

/uu to disable.

Windows 7 Packages

Windows 8 Packages

If you have some other Windows, just do a search with that pattern, Windows Something Packages, and you can't miss 'em.

Link to comment
Share on other sites

Why don't you use the command line to (un)install features?

pkgmgr /iu:"TelnetClient"

/uu to disable.

Windows 7 Packages

Windows 8 Packages

If you have some other Windows, just do a search with that pattern, Windows Something Packages, and you can't miss 'em.

 

I will definitely be using that! Sometimes you just have to know what terms to look for, I wasn't aware of the pkgmgr tool but it does exactly what I'd like.

Link to comment
Share on other sites

I will definitely be using that! Sometimes you just have to know what terms to look for, I wasn't aware of the pkgmgr tool but it does exactly what I'd like.

 

That's true. I didn't know about it either until I was going to install Telnet on a server last week. :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...