Sign in to follow this  
Followers 0
nergmlam

GPL error 193 in script using C:\windows\system32\appwiz.cpl

1 post in this topic

I'm using the latest version 3.3.8.1 using a RunAs() function, but it's the same problem with RunAsWait(), and I use my domain administrators credentials in RunAs(), and a workindir, that any user have write access to. And I don't load any profile ( using 0 ).

It works in Windows XP SP2, but not in Windows 7 Home Edition or Windows 7 Enterprise.

Using my script this command doesn't work in Windows XP SP2:

%SystemRoot%\system32\appwiz.cpl

I don't know why, but using my script this command works in Windows XP SP2:

%ComSpec% /C %SystemRoot%\system32\appwiz.cpl

But no one of the above works in Windows 7, where I get an 193 error about not having the needed credentials.

If I in Wndows 7 change my command to:

%ComSpec% /K %SystemRoot%\system32\appwiz.cpl

I get the same error, but I can now use the command line box, and if I type SET, I am told, that my domain and username is my domain administrators credentials.

I also tried this one with no luck:

%ComSpec% /C %SystemRoot%\system32\control.exe %SystemRoot%\system32\appwiz.cpl

If I use the Start button and just type appwiz.cpl it works.

If I use the Start button and types cmd.exe, and in the command lne box just types appwiz.cpl it works.

I've found out that RunAs() needs that the seconday logon service is running. and it is. If I run my script from my own computer using e.g. pseexec.exe to get access to a remote computer, both computers must run the secondary logon service. And the secondary logon service needs the workstation service and netlogon service. The netlogon service only runs on domain computers, not on workgroup computers. And I am working on a domain computer, and all 3 services is running. But if I was working on a workgroup computer, my script wouldn't work, because the netlogon service would only start and immidiately stop again (because of the workgroup).

Please note, that my problem isn't about the autoit3 script I use, it's a general problem using appwiz.cpl in Windows 7, maybe using Windows builtin runas.exe commad, or e.g. sysinternals pseexec.exe, or using a .cmd, .bat or .vbs script

It's strange because I just examined all the *.cpl I have in C:\Windows\System32, and some other cpl commands works when using my script, but the appwiz.cpl doesn't work.

I don't know why, but these one works on Windows 7 using my script with %ComSpec% /C %SystemRoot%\system32 in front of it

collab.cpl

FlashPlayerCPLApp.cpl

Hdwwiz.cpl

Inetcpl.cpl

Joy.cpl

Main.cpl

Mmsys.cpl

Sysdm.cpl

Tabletpc.cpl

Telephon.cpl

Timedate.cpl

But these ones doesn't work with my script on Windows 7:

Appwiz.cpl

Bthprops.cpl

Desk.cpl

Firewall.cpl

Infocardcpl.cpl

Intl.cpl

Irprops.cpl

Ncpa.cpl

Powercfg.cpl

Wscui.cpl

Any help or suggestions would be appreciated.

Sincerely

Jorgen Malmgren

IT-Programmer

Denmark - UTC+1

www.tryware.dk

;o) Your brain is like a parachute. It works best when it's open


Sincerely

J. Malmgren

IT-Programmer

http://www.tryware.dk

 

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