Jump to content
Skysnake

Win10 suppresses Run() with @SW_HIDE option

Recommended Posts

Skysnake

Hi

Only on some Windows 10 PCs do I get the issue that the Run() fails with the   @SW_HIDE = Hidden window (or Default keyword) option.  Not all Win10 machines, only some, but then consistently.  I have put UAC to lowest level, no joy.  As if the OS does not allow the hidden window to be created...

Seems that @SW_MINIMIZE = Minimized window or  @SW_MAXIMIZE = Maximized window does not suffer the same fate.

I will have more info in a day or so.

Anybody else with similar experience?

Skysnake


Skysnake

Why is the snake in the sky?

Share this post


Link to post
Share on other sites
SadBunny

Whay do you mean "fails" and what do you execute? If I execute "cmd.exe" It works dfine for me with all three possible flags, although with the @SW_HIDE it looks like nothing happens, but the process is created and I can see it and kill it through the task manager. Is your @error set after execution?

My system info (found out my machine was still called w8-home :) ):

EJ9WnYB.png

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
Skysnake

I use the Run to launch a batch file

I have had another look.  It does not fail. What I meant originally was that the process does not start.  I was wrong.

However, the batch file seems limited to local resources.

For instance, I execute lines like these:

net use f: \\myshare s0m3t1n /P:yes
start f: /max
c:
cd\
md textfilefolder
copy F:\*.txt c:\textfilefolder

note that the local commands all work.  The "net use" is executed, the local folder is created.  

The command "start f: /max" shows a Windows msgbox stating that the resource is not available and blocks the rest of the batch.

The copy from the mapped shared does not work.

And, yes, the remote PC is on an available for browsing in Explorer at this time.

I am guessing that this has something to do with privileges for the batch process... but not sure where to look.  

@SadBunny, I will look at the @error, good suggestion. Thx

 


Skysnake

Why is the snake in the sky?

Share this post


Link to post
Share on other sites
Skysnake

Hi @Danp2, I may do that in due course.  How do I know the "net use " command works? Coz I see the mapped drive appear...

I have since learned about DACL :)

I believe the solutions to my problem lies here:

https://technet.microsoft.com/en-us/library/cc783530(v=ws.10).aspx#w2k3tr_randp_how_xgvr

https://www.autoitscript.com/forum/topic/134508-set-acl-permissions-udf/?page=7

I am first going to see if I can change the share settings manually, if I know that solves the problem, I can start looking at scripting the solution. WinXP was so much simpler... :)

Thanks, will revert


Skysnake

Why is the snake in the sky?

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

  • Similar Content

    • PramodR
      By PramodR
      Hello,
      I have to execute below block of code in elevated previllage, as that particular wmic class will work only with admin previlage.
      i am getting out put when i launch autoit as administrator,  but i will not be able to launch autoit as admin in this particular case but my user have admin rights.
      is there any better way i can run those command as administrator.?
      tried below steps:
      i have tried #RequireAdmin but that creates a user prompt  Tried using Runas command but gives error as wrong username or password , stuck with that step.  
       
    • dwaynek
      By dwaynek
      traytip isn't working in windows 10. nothing happens when i use the Traytip command.
      here's a simple script i used:
      TrayTip("I'm a title", "I'm the message", 5) i tried changing the registry setting HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced ( which didn't have EnableBalloonTips) and creating a DWORD entry called EnableBalloonTips and setting it to 1 and logging off then back in. that did not resolve the problem.
      i'm running Windows 10 v1709 b16299.431
    • antonioj84
      By antonioj84
      Hi all to the forum guru and expert I am trying to  automate this. in the registry  I have the network profile name network 2 and network   I want to  change their  CATEGORY  to Private .  Can someone lead me in the right direction.
      Private is 1 and Public is 0
      #RequireAdmin Global $sHKLMRoot = @OSArch = "x64" ? "HKLM64" : "HKLM" RegWrite($sHKLMRoot &"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" ,'/v NetworkList /t REG_MULTI_SZ /d 00000000 /f') see  attached picture below
      Much appreaciate
       

    • PhoenixPRO
      By PhoenixPRO
      When I try to automate this install program I can not get any of the buttons to click with the "ControlClick" function or any mouse movement to move the mouse to the and click it.  My OS is Windows 10 64Bit.  I have tried both 32bit and 64bit installs of Autoit V3 to no avail.
      I could not even get the run command to start the program until I used the variation of the command below in the script.
      With the script below the install program starts but will not click the "Next" button no matter what I do.
      Any help will be greatly appreciated.
      Thanks in advance.
       
      #include <MsgBoxConstants.au3>
      Opt("MouseCoordMode", 0) ;1=absolute, 0=relative to active window, 2=client
      Local $Success
      Run(@ComSpec & " /c " & 'C:\PhoenixPro_Install\RDXUtil\RDX_Tools_setup.exe', "C:\PhoenixPro_Install\RDXUtil", @SW_HIDE )

      WinWait("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62")
      WinActivate("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62")
      ControlClick ("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62", 1639, "left", 1) ;Next Button
    • TheWizEd
      By TheWizEd
      How do I work with 2D arrays.  I've tried this but get errors.
      Local $aTest[4][4] = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]
      ;$aTest[0][] = [10,11,12]  ; Error at []
      Local $sTest = ""
      For $i = 0 To UBound($aTest)-1
        Local $aExtract = _ArrayExtract($aTest,$i,$i)
        $sTest = $sTest & MyTest($aExtract)
      Next
      Func MyTest($aTemp)
        _ArrayDisplay($aTemp)
        ; Error at    v $aTemp
        Return String($aTemp[0]) & " - " & String($aTemp[1]) & " - " & String($aTemp[2]) & @CRLF
      EndFunc
       
       
×