VB startup script not running on Win7

Hi,
my startup VB script not working on Windows 7. The script should install or uninstall office 2010 based on group membership. 
I tested scipt on Windows XP and everything works. When I run script manually, it works.
Quite similiar batch file works, office are installed but not same functionality for me.
I turn UAC off, bot not working.. Also add dword EnableLinkedConnections  but nothing change.
Batch file works but VBScript not!
Any advice? Thx

Hi Tomas Cink,
Based on my understanding, the start VB script which is deployed via GPO could not works fine on Windows 7 clients, although it can works fine on Windows XP clients and it can
run sucessfully if manually. Right?
Firstly, please run the following command on the problematic workstation.
      Gpresult /h > C:\temp\gpresult.html  (“C:\temp\” is the path of the gpresult.html, you can set it by yourself)
This file is used for checking the result of Group Policy information. Open the file to check if the GPO has applied.
If the GPO has applied, please follow the following step to narrow down the issue:
Change the script to the following command: add  > %SystemDrive%\Users\test.txt
to the script.
Log on to a client with a regular user account, run
gpupdate/force, and then re-log on to this client.
Check if the test.txt file exists in this location
%SystemDrive%\Users.
If the
test.txt file exists, the GPO with startup script is applied successfully. But the result of running logon script achieves the goal we excepted or not which is still not sure.
Regards,
Lany Zhang

Similar Messages

  • Gpo computer startup scripts not running

    Hi,
    I´m making some test with a windows 7 pro 64 bit computer and a 2008 r2 domain controller where I have created a computer startup script. I give you more info:
    Domain functional level: 2008 R2
    DC: 2008 R2
    Client: Windows 7 pro x64
    Gpo: Computer configuration -> Windows configuration -> Script -> Startup
    Type of script: bat file copied on \\domain_name\SysVol\domain_name\Policies\{461E688A-E8F8-4C9B-8419-FE83DCDD4C26}\Machine\Scripts\Startup
    The windows 7 machine is full updated, windows firewall disabled, uac disabled, windows defender disabled.
    The bat file works and the gpo is applying, i have seen it via gpresult, another gpo which is in a top level works fine.
    I need some help please, because I don´t know what to try.
    Thanks in advance.

    Hello Egoitz28,
    Do you mean that you add the bat file in the startup group policy and gpresult shows that it is applied, but the bat is not run?
    Please share us the bat file to test.
    Logon/Logoff scripts could only be applied to users, whereas Start-up/Shutdown scripts applies to computers.
    I create a test.bat start %windir%\system32\notepad.exe, and add it to the User Configuration->Policies->windows Settings->Scripts->Logon in the Default domain policy. And it works.
    If I create in the startup policy in Computer configuration, I can see it in the gpresult, but it doesn’t work.
    Please test if the bat works in the Logon policy.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Startup script not running on windows xp machines

    i'm trying to apply a simple startup script 
    -it worked on windows 7 and 8 machines, but not windows xp
    -i can access the folder where the script located, double click it and its working
    - i tested the same script as a logon script, it worked
    many threads about this topic but couldn't fine any answer

    Hi,
    Below thread might be helpful,
    http://social.technet.microsoft.com/Forums/en-US/4ec21389-b6c1-4818-9482-06dc72fc77bb/windows-xp-sp3-not-showing-running-startup-scripts?forum=winserverGP
    Regards,
    Gopi
    JiJi
    Technologies

  • Adobe Reader XI does not run using Win7 Pro

    Trying to run Adobe Reader XI on a PC running Win7 Pro, but it starts, gives gray screen, then shuts down.  However, I can read pdf docs within Google Chrome.
    I was running Reader version 10 with no problem, went to upgrade to 11, and now no versions work, as I've tried to uninstall and reinstall ver 9,10,11 but none work.  Help!

    I ran the script but does not fix issue.
    When I run Adobe Reader or click on a .pdf file on my drive, the Adobe reader program starts, but gives a gray screen while my hard drive spins, then program closes.
    any ideas?
    Thanks,
    Ken
    Pat Willener <[email protected]> wrote:
    =============
    Pat Willener http://forums.adobe.com/people/pwillener created the discussion
    "Re: Adobe Reader XI does not run using Win7 Pro"
    To view the discussion, visit: http://forums.adobe.com/message/5211526#5211526

  • Firefox is taking a long time to open. When it does open, I get a pop up box with "Script not running". Bookmarks on my tool bar don't load. Scrolling is unreliable--it will stop in the middle of a page

    What is causing the "script not running"? Why so long to open? Etc.

    Hi Donekes,
    First off I need a little more information to help with troubleshooting.  You say that an error occurs when you "try to re-open the same problem app before the old session completely exits".  Does the error have an error code or dialog display?  It may also be possible to receive an error log.  Here is a knowledge base that explains how to retrieve error logs.
    http://digital.ni.com/public.nsf/websearch/54E361E3FF477EC186256C320068184F?OpenDocument
    If you are able to get that information then please post.  Have a good day.
    Brian K.

  • GPO Startup/Shutdown scripts not running

    I am running server 2003 SBS with windows 8.1 Pro workstations.
    My workstations run 1 start-up script and 2 shutdown scripts. All are BAT files.
    They were all working fine last week before I ran the update for 8.1.1, now they do not run at the appropriate time on any of those systems. However, if I execute them manually they work as expected.
    I have checked to see if the BAT files are still located in the GPO and they are there. They are stored locally on each machine, I have even tried to delete and re-add them and then run GPUPDATE to no avail. 
    Any help here would be great, as they deal with local encrypted containers and are specific to each workstation.

    Hi Sebastian,
    Thanks for posting.
    Whether the GPO with start-up/shutdown scripts are linked to the OU containing computers?
    FYI -  Logon/Logoff scripts could only be applied to users, whereas Start-up/Shutdown scripts applies to computers.
    Also, checkout the below thread on similar discussion,
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/b193e8a9-9b2a-4993-bd74-836c65c51dc3/gpo-with-a-startup-script-is-not-working
    Regards,
    Gopi
    www.jijitechnologies.com

  • Managed server startup script not reading login info from boot.properties

    To encrypt the username and password in weblogic admin server, I used a boot.properties file and setting some properties like StoreBootIdentity=true. This works as expected.
    Now, I have a weblogic managed server within the same folder i.e.
    under /bea/user_projects/domains/mydomain
    To get the similar behaviour on this managed server, I created a boot1.properties file and set the following in the startup script
    java -Djava.compiler=NONE -ms200m -mx200m $HOTSPOT_OPTIONS -classpath $CLASSPATH -Dweblogic.Domain=mydomain -Dweblogic.Name=$SERVER_NAME -Dweblogic.management.server=$ADMIN_URL -Djava.security.policy==$WL_HOME/server/lib/weblogic.policy -DRCP_PROPS=/data/css/adixit/samsung/scc612/server/cfg/RCP.props -Dlog4j.configuration=log4j.xml -Dweblogic.system.BootIdentityFile=/bea/user_projects/domains/mydomain/boot1.properties -Dweblogic.RootDirectory=/bea/user_projects/domains/mydomain weblogic.Server
    When I run the script I get the following :-
    <Jan 24, 2005 3:41:44 PM GMT+05:30> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
    Enter username to boot WebLogic server:
    Why is it not able to pick the username and password from the boot1.properties file ? Any clues ? What settings can I change to make it work ?
    Thanks in advance.

    Being that you posted this problem a few months ago, I am assuming you found the cause of your problem. I too experienced this same symptom (boot.properties not being read) when trying to start a managed server on a different server than the admin JVM. I found the resolution in the following documentation:
    http://e-docs.bea.com/wls/docs81/ConsoleHelp/startstop.html#BootIdentityFiles
    Basically, you have to copy the SerializedSystemIni.dat from the server that the admin JVM is on to the secondary server where the managed JVM is going to run. I was able to do as the link says (add the boot.properties file with plain text passwords and have it encrypted). Hope this helps you or someone else down the road.

  • Server side script not running on stand-alone XE

    Hello,
    In my application I created a Server side script (AJAX) which presents a select-list based on other fields on the page. The very same application runs on a 10g+APEX3.0.1 database AND on a standard XE+APEX2.1 database, which are both accessed via a HTTP-server. The application with the script runs fine on this platform (XP).
    I have two other XP-machines on which I also installed XE+APEX2.1. Both are stand-alone versions NOT accessed via a HTTP-server. I installed exactly the same application which runs on the platform with HTTP server on both of the machines. While testing the correct functioning, I noticed that everything works ok, EXCEPT the server side script which gives me a better select list. Instead of this I get the old-fashioned version of the select-list which is not able to use the value elsewhere on the page.
    I found a similar problem on the XE forum (Re: Server side scripts features ) but it doesn't answer my question how to get the script working on a standalone version of XE (= without access via a HTTP-server).
    Can anybody please help me?
    Thanks & regards,
    Jan.
    Message was edited by: Jan
    J. Hulsing

    Carl,
    Thanks for your suggestion to install FireFox and the Firebug tool (which I wasn't aware of).
    After having looked at the problem for hours, I found what I think is the problem: the htmldb_html_elements.js script.
    As already mentioned, the properly functioning XE on my local PC is accessed via a HTTP-server, as well as the 10gR2+APEX3.0.1 version also running on that PC.
    On the laptop, not running HTTP-server, I get the message: <br>
    <FONT COLOR="RED">$x is not defined <BR>
    <FONT COLOR="BLUE"> f_21_select_kpn<FONT COLOR="RED">(<FONT COLOR="BLUE">input<FONT COLOR="BLACK">#P21_GBREKNR 405<FONT COLOR="RED">, "P21_KOSTENPOST") <BR>
    <FONT COLOR="BLUE">onblur<FONT COLOR="RED">(<FONT COLOR="BLACK">blur <FONT COLOR="RED">)
    </FONT><BR>
    That is in the 'Console' of Firebug.
    When changing to Script I do see a remarkable difference.
    On the PC there the following text is found in the first lines of htmldb_html_elements.js:
    /*htmld_elements will contain the lower level html access js*/<br>
    var gDebug = true;<br>
    var gkeyPressTime;<br>
    var gLastTab=false;<br>
    var gRegex=false;<br>
    var ie=(document.all)?true:false;<br>
    if(ie){document.expando=true;}<br>
    var gDebugWindow = false;<br>
    /*<br>
    $x functions have to do with either single elements or array of elements<br>
    $v functions have to have to do with manipulating values or interaction based off a value<br>
    $xml function have to do with manipulating xml values<br>
    $a functions are based on ajax<br>
    $d functions are specific dhtml constructs<br>
    */<br>
    /* begin $x functions */<br>
    function $x(pNd){<br>
    try{<br>
    var node;<br>
    ...<br><br>
    On the laptop however the first few lines are:<br><br>
    /*htmld_elements will contain the lower level html access js*/<br>
    <br>
    var gDebug = true;<br>
    var gkeyPressTime;<br>
    var gLastTab=false;<br>
    var gRegex=false;<br>
    if(document.all){document.expando = true;}<br>
    // Elements //<br>
    <br>
    function html_GetElement(pNd){<br>
    try{<br>
    var node;<br>
    switch(typeof (pNd)){<br>
    ...<br><br>
    I think that the difference is in these two scripts.
    But why are the scripts different: it is the same XE that is installed on the laptop and the PC.<br>The answer I found in the images/javascript directory of APEX3.0.1 which is located in the APACHE directory-tree (you have to copy the images to APACHE when you use the HTTP-server). And indeed: the htmldb_html_elements.js has exactly the same text as what I see in Firebug on the PC. So XE on the PC is using the javascripts in the image-directory of APACHE on the PC and not the XE-version of the scripts, embedded in XE.
    <br><br>
    So the answer seems to be: copy the APEX3.0.1 versions of the script over to the PC and try to get them into the database. Or...???
    <br>
    Can it be loaded into the database? Will XE accept it?
    <BR><br>
    Would be nice to have answers if the conclusion I found is the right one and if it can be fixed by loading the js into XE.
    <br>
    Best regards and thanks for your help so far.
    <br>
    Jan.

  • WMI Scripts not Running Across VPN

    Hi
    I have a strange problem where i have 2 sites connected  using  a VPN on 2  CISCO877.  But WMI scripts are not running across the link. if i pull these out an replace them with a Draytek, the scripts run fine.
    Broad Lane LAN ----- Cisco 877 ========= Internet & VPN Tunnel ============== Cisco 877 ---- Southam LAN1.0.39.0/8                      1.0.39.253                                                                                                              192.168.55.1   192.168.55.0/24 The server at Broad Lane is  GIMILI (1.0.39.109) and at Southam is FRODO (192.168.55.4). The following will not work through the tunnel from Broad Lane LAN. Set objWMIService = GetObject("winmgmts:\\192.168.55.4\root\cimv2") if err.number=0 then serverexist=true else serverexist=falsemsgbox(server.exist)
    Is is possible for the  CISCO877 to block WMI traffic?
    Any suggestions please?
    Rgds
    Phil

    Phil,
    Thank you for your question.  This community is for Cisco Small Business products and your question is in reference to a Cisco Elite/Classic product.  Please post your question in the Cisco NetPro forums located here: http://forums.cisco.com/eforum/servlet/NetProf?page=main  This forum has subject matter experts on Cisco Elite/Classic products that may be able to answer your question.
    Bill

  • Sunstudio startup script not working

    The environment is Ubuntu Linux 5.04 with Java 1.5.0_01 installed.
    The awk script that checks the Java Version has some problems on this distribution.
    Enabled set -x in the sunstudio shell script, here are the relevant lines:
    +++ '[' -x /shares/free/opt/jdk1.5.0_01/bin/java ']'
    +++ /shares/free/opt/jdk1.5.0_01/bin/java -version
    +++ /usr/bin/awk -f /opt/sun/sunstudio10u1/prod/scripts/ver.awk
    awk: run time error: regular expression compile failed (missing operand)
    "| |(|)|,|
            FILENAME="" FNR=0 NR=0
    ++ ver=
    +++ /opt/sun/sunstudio10u1/prod/scripts/jdk_compare 1.3.9 ''
    ++ gettext -e 'Warning: Ignoring JDK_HOME. Sun Studio does not run with this\nversion of the J2SE.\n'
    +++ '[' -x /shares/free/opt/jdk1.5.0_01/bin/java ']'
    +++ /usr/bin/awk -f /opt/sun/sunstudio10u1/prod/scripts/ver.awk
    +++ /shares/free/opt/jdk1.5.0_01/bin/java -version
    awk: run time error: regular expression compile failed (missing operand)
    "| |(|)|,|
            FILENAME="" FNR=0 NR=0
    ++ ver=
    +++ /opt/sun/sunstudio10u1/prod/scripts/jdk_compare 1.3.9 ''
    ++ for d in '"${JDKLIST[@]}"'
    ++ '[' -x /usr/j2se/bin/java -a -x /usr/j2se/bin/javac ']'The rest of the utilities seem to work correctly, netbeans starts up correctly.

    The awk script was written and tested on various
    platforms, both
    Linux and Solaris. I'm not familiar with Ubuntu Linux
    and thats not
    one of the platforms we tested on.=====
    www.ubuntulinux.org
    Could you do several things for me?
    First, could you do some sanity testing on
    /usr/bin/awk. Just
    enough to make sure its working in other uses. If it
    does, can
    you see if its a symlink to gawk? If so, what version
    of gawk
    (you can do "awk --version" if it is). On the Linux
    platform I have
    (SuSE Linux Enterprise System 9), I get "GNU Awk
    3.1.3". If you
    can send me the exact version of awk, I might be able
    to come
    up with an alternative.=====
    The installed awk was a symlink to mawk.
    I installed also the GNU awk and that fixed it.
    You might also be able to fix this. Do you have write
    permissions
    on your sunstudio install? If you look at the ver.awk
    script it has
    a comment giving an alternate value of the FS which
    is easier
    to read, but doesn't work on Solaris (where
    /usr/bin/awk isn't
    GNU awk). Since we have to work with both GNU and
    Solaris
    awk, I didn't use this alternate. But if that works
    on your system
    its a simple way of getting you going.
    Of course, you're still not on a supported Linux
    platform, so there
    are still no guarantees you won't run into other
    problems. These
    would most likely be in some of the native
    executables the IDE
    uses (such as dbx and dmake). The core parts of the
    IDE (all
    Java parts), should work fine on most any Linux
    platform.=====
    Encountered the problem with dbx dependency to libc:
    $ dbx
    dbx: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.3.4' not found (required by dbx)
    $ ldd -v /lib/tls/i686/cmov/libc.so.6
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
    Version information:
    /lib/tls/i686/cmov/libc.so.6:
    ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
    ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
    ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
    ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
    $ ldd /opt/sun/sunstudio10u1/bin/dbx
    /opt/sun/sunstudio10u1/bin/dbx: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.3.4' not found (required by /opt/sun/sunstudio10u1/bin/dbx)
    libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7fce000)
    libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb7f14000)
    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7ef3000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ee7000)
    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7dba000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7feb000)
    Was there a reason why this version of GNU libc was chosen as minimal requirementl!?

  • Powershell script not running in the task scheduler...

    I've created a .ps1 script to transfer a file using WinSCP can run it in the ISE environment, in the PS window, and with the run command. I've transferred the command I used in the run prompt to the task scheduler but it is not running. It is running everywhere
    else just not in the scheduler. It says that it completes okay and gives a return code of OpCode=2
    The action is set to run this: c:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe
    The Arguments: -ExecutionPolicy Bypass -file "C:\Users\me\scriptsWCP\FileTransferPS.ps1"
    Also have it running with the highest permission and as SYSTEM

    Hi,
    To run a powershell script with parameters in the Task Scheduler:
    Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add argument (optional): -Command "& c:\scripts\test.ps1 -par1 2 -par2 3"
    Hope the below two articles be helpful for you:
    Schedule PowerShell Scripts that Require Input Values
    https://blogs.technet.com/b/heyscriptingguy/archive/2011/01/12/schedule-powershell-scripts-that-require-input-values.aspx
    How to Schedule a PowerShell Script
    http://dmitrysotnikov.wordpress.com/2011/02/03/how-to-schedule-a-powershell-script/
    Regards,
    Yan Li
    Regards, Yan Li

  • Maintenance Scripts not running

    Purchased a mac mini a few days ago. Noticed in my system log: Recent contents: that it doesn't seem to be running the overnight maintenance. It reads:
    Nov 20. 03: 15: 02 - geoff powells computer: mac - mini. cp: error processing extended attributes. Operation not permitted.
    This is updated daily with the same result. Mini is left running 24/7.
    Phoned Apple Tech Support who said their G4s syslogs said the same.
    But couldn't say if the scripts were running or not.
    Anyone any clues.
    The sys log of my G5 running 10.3.8 shows a restart everyday.

    Hi Geoff,
    Welcome to Discussions!
    Your system works perfectly well and the Periodic maintenance runs.
    - That a system log starts precisely at 3:15 shows alone that your computer is left on all night and the Daily script runs at its default scheduled time.
    --> Open Console again and see the three Periodic maintenance logs. They are daily.out, monthly.out and weekly.out.
    If your computer never sleeps, you should find that they were run at 3:15am every day (daily task), 3:15am on Saturdays (weekly task), and 5:30am on the first day of each month (monthly task).
    Note that since 10.4.2 they are able to run "delayed" in case your computer was sleeping during the night. This enhancement works perfectly well with the Daily Task, but not very reliably with the Weekly and the Monthly.
    Still no running at all if computer shut down at night.
    HTH
    Axl

  • Saproot.sh script not running

    Hi All
    1)I upgraded kernel 700 to patch 185.its solaris machine.and then i tried to run saproot.sh script,but it is saying like
    ./saproot.sh SID
    ./saproot.sh: whoami: not found
    ./saproot.sh: test: argument expected
    i gave full permission to saproot.sh and saposcol
    2)I run a command 'cleanipc 00 remove' from then it is giving dump 'PXA_NO_SHARED_MEMORY'
    i increased buffersize also but of no use.
    when i go  to st06 it is giving err 'SAPOSCOL not running?(shared memory not available)'
    manually itried to run saposcol but it is saying no shared memory.
    appreciate the responses.
    Thank you

    >
    Santosh Kulkarni wrote:
    > Hi All
    >
    > 1)I upgraded kernel 700 to patch 185.its solaris machine.and then i tried to run saproot.sh script,but it is saying like
    >
    > # ./saproot.sh SID
    > ./saproot.sh: whoami: not found
    > ./saproot.sh: test: argument expected
    >
    ./saproot.sh SID needs to be execute from root user
    > i gave full permission to saproot.sh and saposcol
    >
    > 2)I run a command 'cleanipc 00 remove' from then it is giving dump 'PXA_NO_SHARED_MEMORY'
    > i increased buffersize also but of no use.
    > when i go  to st06 it is giving err 'SAPOSCOL not running?(shared memory not available)'
    > manually itried to run saposcol but it is saying no shared memory.
    >
    > appreciate the responses.
    >
    > Thank you
    Check this link
    http://help.sap.com/saphelp_bw30b/helpdata/en/95/df4002597211d3b473006094b910d9/content.htm
    http://www.saptechies.com/os-collector-saposcol/
    Regards,
    Subhash

  • WLST script not running in CRON...

    i have written a WLST scrit to connect to WLS and find the DS driver Information ....the script runs pretty good when i manulay run it ...however when i added the script to CRON it just invokes WLST and fails...I have the shell script (.sh) first set the env by invokin <WLS-HOME>/server/bin/setWLSEnv and then execute the WLST script....like i said everything is fine when run manually but the cron job fails......
    when i chek the log file for the output i just see this
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    but when run manually its connecting....
    There is no ownership issue as such coz other cron jobs with the same owner run succesfully....!!!
    Please advise......
    Thanks in advance....
    Edited by: user10620079 on Feb 6, 2009 11:42 AM

    Thnaks for all your replies....
    I actually just made this change ...
    instead of setWLSEnv...i invoked setDomainEnv.sh and then cd to the dir where i have the .py script and the rest as it is and now it works...!!!!!!
    This tells me that may be setWLSEnv doesnt set all the required env variables for the .py script to run in cron....correct me if am still doing something wrong!!!!
    Thanks all for your help really appreciate it!!!!
    Edited by: user10620079 on Mar 16, 2009 1:20 PM

  • OpenVPN - up/down scripts not run correctly

    Hi,
    I have a OpenVPN client on my computer which connects to a remote server at startup (launched by systemd). The connection i primarily used to set up a network drive. To make this process as smooth as possible I'm trying to mount with an up script and unmount with an down script. This is my config:
    client
    dev tun
    proto udp
    remote site.xxx 1194
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    ca site.crt
    cert site.crt
    key site.key
    comp-lzo
    verb 3
    reneg-sec 0
    script-security 3
    route-up /etc/openvpn/up.sh
    route-pre-down /etc/openvpn/down.sh
    (last two lines)
    In theory, up.sh should execute when the connection is initialized and the routes are in place. And down.sh should run when the connection is still active just before the routes are removed. This seems to be the case in the log:
    Sat Mar 22 08:37:50 2014 OpenVPN 2.3.2 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [eurephia] [MH] [IPv6] built on Nov 13 2013
    Sat Mar 22 08:37:50 2014 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
    Sat Mar 22 08:37:50 2014 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
    Sat Mar 22 08:37:50 2014 WARNING: file 'site.key' is group or others accessible
    Sat Mar 22 08:37:50 2014 Socket Buffers: R=[212992->131072] S=[212992->131072]
    Sat Mar 22 08:37:50 2014 UDPv4 link local: [undef]
    Sat Mar 22 08:37:50 2014 UDPv4 link remote: [AF_INET]xxx:1194
    Sat Mar 22 08:37:50 2014 TLS: Initial packet from [AF_INET]xxx:1194, sid=cc55bb26 51a6f522
    Sat Mar 22 08:37:50 2014 VERIFY OK: depth=1, C=SE, ST=Stockholm, L=Stockholm, O=xxx, CN=xxx CA, emailAddress=xxx
    Sat Mar 22 08:37:50 2014 VERIFY OK: depth=0, C=SE, ST=Stockholm, L=Stockholm, O=xxx, CN=xxx, emailAddress=xxx
    Sat Mar 22 08:37:50 2014 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
    Sat Mar 22 08:37:50 2014 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
    Sat Mar 22 08:37:50 2014 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
    Sat Mar 22 08:37:50 2014 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
    Sat Mar 22 08:37:50 2014 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
    Sat Mar 22 08:37:50 2014 [xxx] Peer Connection Initiated with [AF_INET]xxx:1194
    Sat Mar 22 08:37:52 2014 SENT CONTROL [xxx]: 'PUSH_REQUEST' (status=1)
    Sat Mar 22 08:37:52 2014 PUSH: Received control message: 'PUSH_REPLY,route xxx 255.255.255.0,route xxx 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig xxx xxx'
    Sat Mar 22 08:37:52 2014 OPTIONS IMPORT: timers and/or timeouts modified
    Sat Mar 22 08:37:52 2014 OPTIONS IMPORT: --ifconfig/up options modified
    Sat Mar 22 08:37:52 2014 OPTIONS IMPORT: route options modified
    Sat Mar 22 08:37:52 2014 ROUTE_GATEWAY 192.168.0.1/255.255.255.0 IFACE=eth0 HWADDR=ec:a8:6b:ff:de:31
    Sat Mar 22 08:37:52 2014 TUN/TAP device tun0 opened
    Sat Mar 22 08:37:52 2014 TUN/TAP TX queue length set to 100
    Sat Mar 22 08:37:52 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
    Sat Mar 22 08:37:52 2014 /usr/bin/ip link set dev tun0 up mtu 1500
    Sat Mar 22 08:37:52 2014 /usr/bin/ip addr add dev tun0 local xxxpeer xxx
    Sat Mar 22 08:37:52 2014 /usr/bin/ip route add xxx via xxx
    Sat Mar 22 08:37:52 2014 /usr/bin/ip route add xxx via xxx
    Mounting network drives...
    mount error(115): Operation now in progress
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    mount error(115): Operation now in progress
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    Sat Mar 22 08:38:12 2014 Initialization Sequence Completed
    ^CSat Mar 22 08:38:18 2014 event_wait : Interrupted system call (code=4)
    Sat Mar 22 08:38:18 2014 /etc/openvpn/down.sh tun0 1500 1542 xxx xxx init
    Unmounting network drives...
    Sat Mar 22 08:40:22 2014 /usr/bin/ip route del xxx
    Sat Mar 22 08:40:22 2014 /usr/bin/ip route del xxx
    Sat Mar 22 08:40:22 2014 Closing TUN/TAP interface
    Sat Mar 22 08:40:22 2014 /usr/bin/ip addr del dev tun0 local xxx peer xxx
    Sat Mar 22 08:40:22 2014 SIGINT[hard,] received, process exiting
    But here's the problem. The up script will not mount because it doesn't seem to be able to reach the network. The routes ARE there (checked via netstat -rn in the up script) but it will not work. It works perfectly if I run the script maually diretly after OpenVPN is done. And the down script (which unmounts the drives) just hangs because the connections seems to be interrupted.
    So, how can make it work so that mount and umount is handled by OpenVPN? Am i missing something?

    Managed to get around the problem using systemd:
    [Unit]
    Description=OpenVPN connection to %i
    [Service]
    Type=forking
    ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i
    ExecStartPost=/root/scripts/mount.sh
    ExecStop=/root/scripts/umount.sh
    [Install]
    WantedBy=multi-user.target
    ...but I think it's cleaner to do it in the openVPN config, so I still like some help there :-)
    Last edited by twarkie (2014-03-22 15:37:49)

Maybe you are looking for