2

I made a backup tool for MS SQL Express that -daily- backs up, 7zips and uploads the zipped files via FTP. It is a program made in VB.net, built as an .EXE with a .config file. One of the functions calls a file "7zip.exe". Anyway, on Win2003 (20 webservers) this works perfect. Small databases, big databases, slow servers, powerstations... The 'daily basis' is created by launching a scheduled task at night.

Now in Win2008 R1 I also created a 'basic task' and set it up. When I launch it, I see it working except the 7 zip does nothing. It has something to do with the scheduled task because when I run the .EXE normally (double clicking...) it 7zips, as it should be.

Thanks in advance!

6 Answers 6

3

Are you using 7za.exe? It's the command line executable for 7zip, which we find works best for scripting.

1

I'm having a similar problem with Cron on Linux.

1) Are you using a FULL Path to the 7zip program within your VB Script?

2) Are you running the VB Script with the correct permissions (as the right user)?

4
  • Thx. I guess so, I'm logged in as administrator with admin permissions. When I choose "Run whether user is logged on or not" and then run the task it doesn't do anything at all. It starts but there is nothing happening, no new BAK files are written, no 7zip. I start to hate the new task scheduler...
    – laurens
    Dec 30, 2009 at 16:48
  • possibly modify the script to start doing some logging. return code from the 7zip call would be especially interesting. Dec 30, 2009 at 16:53
  • 1
    Adding to my comment above - make sure that the task itself is assigned a user in the task properties. Being logged in as a specific user has no effect.
    – Carl C
    Dec 30, 2009 at 17:26
  • it was the path that was the problem!! Thx! In win2003 is simply used: (Process.Start("7za.exe", "a " & pathToZip & ...) For win2008 I need to change that to the full path: Process.Start("D:\MSSQL\MSSQLExpressBackupAdv\7za.exe", "a "...
    – laurens
    Jan 28, 2010 at 11:39
0

Windows Server 2008 made some changes to Scheduled Tasks, but I don't remember the specifics. I do remember having to update some tasks when I went from 2003 to 2008. You might need to assign a user to the task, even if it's a local job. If a regular user doesn't work, try a local admin user.

0

You may need to check the "Run with Highest Privileges" checkbox in addition to assigning a user/password to the task. This enables your application to start another process outside of itself.

1
  • Thx. I did that and also assigned the task to a user with administrator privileges. This runs several parts of the tasks (the .exe that it starts) but not the 7zip :s And it does work by double clicking the .exe itself, not the 7zip.exe but the sqlbackup.exe that for one of the steps calls the 7zip.exe...! :s
    – laurens
    Dec 30, 2009 at 23:14
0

Thanks resolove my issue. becuase on windows server 2008 need full path while raring: On my scenario i schediled a batch script to zip one file everyday,but it didnt work as below my old script: "C:\Program Files\WinRAR\WinRAR.exe" a test.rar test.txt : this didnt work

and i added the full path on my batch file and the below script works for me on windows 2008 server; "C:\Program Files\WinRAR\WinRAR.exe" a F:\ziptest\test.RAR F:\ziptest\test.txt : this works fine

Hope this wil help some one using Winrar on windows 2008 server and calling a batch script

Joseph

0

Make sure you also the Fully qualified path name, for network paths: full hostname or IP. As mostly in Win2008 R2..., also run the task with highest privileges or admin.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .