Cpqlocfg.exe

1 view
Skip to first unread message

Janne Evers

unread,
Aug 4, 2024, 2:31:43 PM8/4/24
to biokronibmis
Iwant to be able to execute a command in DOS-Prompt (CMD) from Windows 7 but I could not figure out how. I've already read the Macros File, Run, and a bunch of other threads which brought me to think AutoIT simply doesn't work with DOS command. Maybe Powershell will work? I know it's a blasphemy but I'm hoping someone can prove me wrong.

The script would run with no errors but no changes have been made when I logged into the server. The old password still works. One thing to note is that cpqlocfg.exe can only be executed through command in DOS. If I just run the code below, I'll just get a DOS splash screen.


Second, have you tried running the program from AutoIt without hiding everything to see of there's an error? You are hiding the console window with @SW_HIDE, and then you're immediately closing the console window with the /c parameter, yet you haven't gotten it working so you have no idea if you have an error condition that needs to be fixed or not.


Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator


Trying your suggestion I get cricket chirping. Nothing shows up and no errors. By the way, the IPs are mismatched from this post to my original post but I can assure you that I have the right IP address. You'll just have to trust me.


You are God! This works but is there a way to keep the DOS prompt open so I can see whether it executed successfully? If I remove the " /c " that BrewMan mentioned to keep the window open, the script stopped at the current directory.


One last question: Can you actually detect the line below in the command prompt? It's to confirm that it actually did succeed as a part of my error detection measure. Sorry for having so many questions. I don't see too many example on this subject. I'm willing to learn it if you can show me where. Thanks again!


when you use /K the CMD.exe will keep alive, but if you also use I/O redirection at the same time, then is better to hide the dos window with @sw_hide, becouse with I/O redirection the cmd.exe will work in "background" and nothing will be visible on the black dos screen also if you use @sw_show to see the black dos window on the screen, instead you will comunicate with it only via I/O streams with StdinWrite() to send commands and StdoutRead() to read the output.


That's just a ploy to create a closed loop (infinite ) in order to continually perform a piece of code and carry out checks on the fulfillment of certain conditions ( since 1 > 1 will never occur , then the cycle would continue indefinitely )

3a8082e126
Reply all
Reply to author
Forward
0 new messages