Jump to content

Weird problem with simple RunAsSet script


ROcHE
 Share

Recommended Posts

I am using a very simple RunAsSet script to execute some older application in administrator mode. Everything works perfectly except for one thing.

When the user tries to save a document and want to create a new folder (using the create folder button in the save as dialog box) nothing happens. You cannot name the new folder. If you go back in the directory tree (from \test\test to \test for example) and then return to \test\test (using the back and forward button of the save as dialog) then you see "New Folder".

If you try to erase it nothing happens, but if you do the same (going back one level and then forward) the folder is deleted. I tried with a couple computers and it's always the same. Windows XP or 2000, same problem. I just tried it on my home computer with MS Paint and I have the exact same behavior.

Here is the script I'm using:

; Set the RunAs parameters to use local adminstrator account

RunAsSet("Administrator", @Computername, "password")

; Run cadkey as admin

RunWait("c:\windows\system32\paint.exe")

; Reset user's permissions

RunAsSet()

Any idea? Thanks!

Link to comment
Share on other sites

Some views but no reply.. Am I the only one with that problem?

Anyone feels like trying my simple script and see if they get the same behavior?

It made the folders on mine after I closed the application and it made them in the C:\Documents and Settings\Administrators\My Documents\My Pictures folder. But like I said it happenend after I closed the application.

If all else fails you could use

RunWait('runas /user:administrator "mspain.ext"')

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Link to comment
Share on other sites

Some views but no reply.. Am I the only one with that problem?

Anyone feels like trying my simple script and see if they get the same behavior?

Okay, this is the deal. It isn't that the folders or files aren't being created because they are it is just that when you are creating the the thumbs.db isn't being updated for your user. If you were to go out of that folder and then back into it is then updated for you and then you can see the information that was just created. AutoIT doesn't handel the same way as the RUNAS command does. Just use the RunWait() like I told you to and all will be good.

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Link to comment
Share on other sites

Okay, this is the deal. It isn't that the folders or files aren't being created because they are it is just that when you are creating the the thumbs.db isn't being updated for your user. If you were to go out of that folder and then back into it is then updated for you and then you can see the information that was just created. AutoIT doesn't handel the same way as the RUNAS command does. Just use the RunWait() like I told you to and all will be good.

I will try that tonight and come back with results.

Thanks!

Link to comment
Share on other sites

Well I get the same results with runas. Even if I try to use runas manually from the command prompt.

It seems my problem resides in the thumb file as you said. If anyone has another idea that would be appreciated. In the mean time I will look around if this is a known issue with runas.

Link to comment
Share on other sites

Well I get the same results with runas. Even if I try to use runas manually from the command prompt.

It seems my problem resides in the thumb file as you said. If anyone has another idea that would be appreciated. In the mean time I will look around if this is a known issue with runas.

Yeah, I wonder if Microsoft is aware of this. What is the real application you are trying to do this with? Is this for some type of image deoplyment with new user right policys? Let me know.

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Link to comment
Share on other sites

Yeah, I wonder if Microsoft is aware of this. What is the real application you are trying to do this with? Is this for some type of image deoplyment with new user right policys? Let me know.

Sorry for the delay.

It's an old CAD application (Cadkey 19). It won't work without admin privileges.

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...