nobby Posted September 7, 2004 Share Posted September 7, 2004 Hey, When running the following script, notepad is hidden: RunWait("notepad.exe","",@SW_HIDE) But if I use the same line with RunAsSet, notepad is visible: RunAsSet("administrator", "domain", "password", 0) RunWait("notepad.exe","",@SW_HIDE) RunAsSet() Is there a way of hiding notepad (or any other programs) when running as? CheersNobby Link to comment Share on other sites More sharing options...
sugi Posted September 7, 2004 Share Posted September 7, 2004 Hey, When running the following script, notepad is hidden: RunWait("notepad.exe","",@SW_HIDE) But if I use the same line with RunAsSet, notepad is visible: RunAsSet("administrator", "domain", "password", 0) RunWait("notepad.exe","",@SW_HIDE) RunAsSet() Is there a way of hiding notepad (or any other programs) when running as? <{POST_SNAPBACK}>Rerun your own script with specific parameters and in the beginning of your script check if the specific parameters were passed and then run notepad with @SW_HIDE. Link to comment Share on other sites More sharing options...
nobby Posted September 8, 2004 Author Share Posted September 8, 2004 Here is a way of getting around it, not very pretty but it works. Split the script in 2, use the first to call the second as Admin Script1RunAsSet("administrator", "domain", "password", 0) Run("script2.exe","",@SW_HIDE) RunAsSet() Script2RunWait("notepad.exe","",@SW_HIDE) CheersNobby Link to comment Share on other sites More sharing options...
Andre Posted September 8, 2004 Share Posted September 8, 2004 Hi, Tried it here also, Looks like an bug to me ? Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
sugi Posted September 8, 2004 Share Posted September 8, 2004 Looks like an bug to me ?Yes it is a bug in windows. I don't think AutoIt can work around it. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 8, 2004 Developers Share Posted September 8, 2004 Yes it is a bug in windows. I don't think AutoIt can work around it. <{POST_SNAPBACK}>Here a workaround posted a while ago... its a script example which restars itself .. 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 More sharing options...
sugi Posted September 9, 2004 Share Posted September 9, 2004 Here a workaround posted a while ago... its a script example which restars itself .. <{POST_SNAPBACK}>Yep, that's what I said. You can work around it. But I don't think AutoIt should have a workaround for this. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now