Empty Excel 2013 when opening an Excel File in SandBox [SOLVED]

Please post your problem description here

Moderator: Barb@Invincea

Post Reply
SiDi
Posts: 14
Joined: Mon Sep 04, 2017 6:53 am

Empty Excel 2013 when opening an Excel File in SandBox [SOLVED]

Post by SiDi » Mon Sep 04, 2017 7:25 am

Hello,

we are using Sandboxie 5.20 64 Bit on Windows 7 Pro x64 SP1 and have trouble with Excel 2013 (Office Home and Business 15.0.4953.1000 32 Bit, not Office 365 Version! ).

When we try to open an Excel File in Sandboxie only an emtpy excel window will open. To open the File you have to open the Excel File again with the empty Excel Window still opened. I tested it also with an default Sandboxie config. Same Problem.

I searched the board for a similar problem but i can´t find anything. Is this a known Problem and is there any solution?

Thanks in advance

SiDi

JimC@invincea
Sandboxie Support
Sandboxie Support
Posts: 67
Joined: Mon Oct 20, 2014 12:58 pm

Re: Empty Excel 2013 when opening an Excel File in SandBox

Post by JimC@invincea » Tue Sep 05, 2017 12:53 pm

SiDi-

Check out the following post: viewtopic.php?f=11&t=20680&p=107089&hilit=excel#p107089

This looks to be the same issue but with Word.

SiDi
Posts: 14
Joined: Mon Sep 04, 2017 6:53 am

Re: Empty Excel 2013 when opening an Excel File in SandBox

Post by SiDi » Mon Sep 11, 2017 4:51 am

Hi JimC,

thx for the answer. I tried the suggestions in the post but with no success.

- The Admin Drop Rights are already deactivated
- Word Files are opening correctly without any problem its only an Excel Problem.
- Office 2013 Home and Business (no 365) is activated and the setup completed long time ago
- No Error Message comes from Excel or Sandboxie
- Its an licensed sandboxie version
- the problem occurs on all our computers
- adding excel to the forced programs doesn't work either

I could try it with Excel 2010 and 2016, maybe its only an 2013 Problem.

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2337
Joined: Mon Nov 07, 2016 3:10 pm

Re: Empty Excel 2013 when opening an Excel File in SandBox

Post by Barb@Invincea » Tue Sep 12, 2017 10:48 am

Hello SiDi,

This is a known issue caused by DDE. Here's a related post with a workaround provided at the end by one of our gurus:
viewtopic.php?p=120417#p120417

See if that helps. Otherwise, you will have to use the workaround you have already provided (opening Excel first, then opening files within it).

Regards,
Barb.-

SiDi
Posts: 14
Joined: Mon Sep 04, 2017 6:53 am

Re: Empty Excel 2013 when opening an Excel File in SandBox

Post by SiDi » Wed Sep 13, 2017 6:54 am

Thx Barb! The following registry tweak works with Office 2013 on Windows 7x64:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec]

[HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command]
@="\"C:\\Program Files\\Microsoft Office 15\\root\\Office15\\EXCEL.EXE\" \"%1\""

[-HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\ddeexec]

[HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\command]
@="\"C:\\Program Files\\Microsoft Office 15\\root\\Office15\\EXCEL.EXE\" \"%1\""

shmu26
Posts: 68
Joined: Thu Mar 31, 2016 9:36 am

Re: Empty Excel 2013 when opening an Excel File in SandBox [SOLVED]

Post by shmu26 » Wed Sep 27, 2017 9:04 am

What would be the right text to save as a reg file to fix this problem for Excel 2016 x64, running on Windows 10 x64 ?

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2337
Joined: Mon Nov 07, 2016 3:10 pm

Re: Empty Excel 2013 when opening an Excel File in SandBox [SOLVED]

Post by Barb@Invincea » Wed Sep 27, 2017 10:56 am

Hello shmu26,

See if Syrinx's post works for you:
viewtopic.php?p=120441#p120441

Regards,
Barb.-

Syrinx
Sandboxie Guru
Sandboxie Guru
Posts: 620
Joined: Fri Nov 13, 2015 4:11 pm

Re: Empty Excel 2013 when opening an Excel File in SandBox [SOLVED]

Post by Syrinx » Wed Sep 27, 2017 7:36 pm

I'd suggest you try starting with this one instead of from the start of that thread as it was something of a mess in the beginning:
viewtopic.php?f=22&t=22829&start=15#p122570

Full .bat

Code: Select all

@ECHO OFF
TITLE EULA: Don^'t blame me!

SET DONE=0
IF EXIST "%~DP0Office\EULA.txt" GOTO INIT
IF EXIST "%~DP0\EULA.txt" GOTO INIT
:PROMPT
ECHO This bat will modify your registry! [Office Related]
ECHO.
ECHO This bat was made by a user in an effort to aid other users.
ECHO.
ECHO The author does NOT make any warranty of any kind,
ECHO either express or implied. In no event shall the author of this
ECHO bat be liable for any consequential, direct, incidental
ECHO or indirect damages ^(including, without limitation,
ECHO damages for loss of business profits, business interruption,
ECHO loss of business information, destruction of the universe
ECHO or any other loss^) arising from the use of this bat.
ECHO.
ECHO Do you agree to these terms?
ECHO ^(Y for Yes, N for No^)
ECHO.
SET /P CHOICE=    ^   Make your Choice: 
SET CHOICE=%CHOICE:~0,1%
IF /I "%CHOICE%"=="Y" GOTO INIT
IF /I "%CHOICE%"=="N" EXIT
CLS
ECHO Oops, please try again!
ECHO.
GOTO PROMPT

:INIT
CLS
ECHO Checking Access Level...
reg QUERY "HKEY_USERS\S-1-5-18" 1>NUL 2>NUL
IF %ERRORLEVEL%==5 GOTO SECURITY
IF EXIST %WINDIR%\AdminTest RMDIR %WINDIR%\AdminTest  /Q /S 1>NUL 2>NUL
IF NOT EXIST %WINDIR%\AdminTest MD %WINDIR%\AdminTest 1>NUL 2>NUL
IF %ERRORLEVEL%==0 (
	IF EXIST %WINDIR%\AdminTest RMDIR %WINDIR%\AdminTest  /Q /S 1>NUL 2>NUL
	ECHO Seems to be running as Admin, continuing...
	GOTO SELECTION
)
ECHO.
ECHO Sorry, it won't work if you don't ^(Right click the bat and^)
ECHO Run as administrator
GOTO END

:SELECTION
SET /A "ROUNDNORM=6"
SET /A "ROUNDLAST=%ROUNDNORM%+1"
SET /A "ROUNDREST=%ROUNDNORM%+2"
SET /A "ROUNDERR=%ROUNDNORM%+3"
TITLE What are you doing?
ECHO.
ECHO **This bat will modify Office related registry entries!**
ECHO.
ECHO Choose 1 to Backup and Replace /dde
ECHO Choose 2 to Restore /dde using Backups
ECHO Choose 3 to Cancel and Exit.
ECHO.
ECHO **This bat will modify Office related registry entries!**
ECHO.
SET /P SELECTION=    ^   Which option number would you like to try?: 
SET SELECTION=%SELECTION:~0,1%
IF /I "%SELECTION%"=="1" GOTO ROUND_1
IF /I "%SELECTION%"=="2" GOTO ROUND_%ROUNDREST%
IF /I "%SELECTION%"=="3" EXIT
CLS
ECHO Oops, please try again!
ECHO.
GOTO SELECTION

:CYCLE
IF %NUMBER%==1 SET CURRENTTARGET=Excel.Backup
IF %NUMBER%==2 SET CURRENTTARGET=Excel.Chart
IF %NUMBER%==3 SET CURRENTTARGET=Excel.CSV
IF %NUMBER%==4 SET CURRENTTARGET=Excel.Macrosheet
IF %NUMBER%==5 SET CURRENTTARGET=Excel.OpenDocumentSpreadsheet.12
IF %NUMBER%==6 SET CURRENTTARGET=Excel.Sheet.12
IF %NUMBER%==7 SET CURRENTTARGET=Excel.Sheet.8
IF %NUMBER%==8 SET CURRENTTARGET=Excel.SheetBinaryMacroEnabled.12
IF %NUMBER%==9 SET CURRENTTARGET=Excel.SheetMacroEnabled.12
IF %NUMBER%==10 SET CURRENTTARGET=Excel.Template
IF %NUMBER%==11 SET CURRENTTARGET=Excel.Template.8
IF %NUMBER%==12 SET CURRENTTARGET=Excel.TemplateMacroEnabled
IF %NUMBER%==13 SET CURRENTTARGET=Word.Backup.8
IF %NUMBER%==14 SET CURRENTTARGET=Word.Document.12
IF %NUMBER%==15 SET CURRENTTARGET=Word.Document.8
IF %NUMBER%==16 SET CURRENTTARGET=Word.DocumentMacroEnabled.12
IF %NUMBER%==17 SET CURRENTTARGET=Word.DocumentMacroEnabled.8
IF %NUMBER%==18 SET CURRENTTARGET=Word.RTF.8
IF %NUMBER%==19 SET CURRENTTARGET=Word.Template.12
IF %NUMBER%==20 SET CURRENTTARGET=Word.Template.8
IF %NUMBER%==21 SET CURRENTTARGET=Word.TemplateMacroEnabled.12
IF %NUMBER%==22 SET CURRENTTARGET=Word.TemplateMacroEnabled.8
IF %NUMBER% GEQ 23 GOTO CHECKROUND
SET /A NUMBER=NUMBER+1
IF DEFINED AUTORESTORE GOTO RESTORE
GOTO FILES

:FILES
SET /A ROUNDPREV=%ROUNDNUM%-1
reg QUERY "HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\Print\ddeexec" 1>NUL 2>NUL
IF %ERRORLEVEL%==5 GOTO SECURITY
IF %ERRORLEVEL%==1 GOTO CYCLE
IF NOT EXIST "%~DP0Office\%CURRENTTARGET%.reg" regedit /A "%~DP0Office\%CURRENTTARGET%.reg" "HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell"
IF %ERRORLEVEL%==5 GOTO SECURITY
IF NOT EXIST "%~DP0Office\%CURRENTTARGET%.reg" GOTO CYCLE
IF %ROUNDNUM%==1 (
	IF EXIST "%~DP0Office\%CURRENTTARGET%.reg" (
		SET "SOURCE=%~DP0Office\%CURRENTTARGET%.reg"
		SET "TARGET=%~DP0Office\Temp\%CURRENTTARGET%.Fixing.%ROUNDNUM%.reg"
		GOTO REPLACE
	)
)
IF NOT EXIST "%~DP0Office\Temp\%CURRENTTARGET%.Fixing.%ROUNDPREV%.reg" GOTO CYCLE
SET "SOURCE=%~DP0Office\Temp\%CURRENTTARGET%.Fixing.%ROUNDPREV%.reg"
IF %ROUNDNUM% LEQ %ROUNDNORM% (
	SET "TARGET=%~DP0Office\Temp\%CURRENTTARGET%.Fixing.%ROUNDNUM%.reg"
	IF %DONOTFIX% EQU 1 GOTO CHECKREG
	GOTO REPLACE
)
IF %ROUNDNUM% EQU %ROUNDLAST% (
	SET "TARGET=%~DP0Office\Fix\%CURRENTTARGET%.Fixed.reg"
	GOTO REPLACE
)
GOTO CYCLE

:CHECKROUND
SET /A ROUNDNUM=ROUNDNUM+1
IF %ROUNDNUM% LEQ %ROUNDLAST% (
	SET /A NUMBER=1
	GOTO Round_%ROUNDNUM%
)
IF %ROUNDNUM% GEQ %ROUNDREST% (
	IF %ROUNDNUM% LEQ %ROUNDERR% GOTO END
)
GOTO ERROR

:REPLACE
SETLOCAL ENABLEDELAYEDEXPANSION
(
	FOR /F "tokens=1* delims=:" %%A IN ('findstr /N "^" "%SOURCE%"') DO (
		SET "LINE=%%B"
		IF DEFINED LINE SET "LINE=!LINE:%ORIGINAL%=%FIX%!"
		ECHO(!LINE!
		)
	) > "%TARGET%"
)
ENDLOCAL
IF EXIST "%~DP0Office\Fix\%CURRENTTARGET%.Fixed.reg" (
	regedit /S "%~DP0Office\Fix\%CURRENTTARGET%.Fixed.reg"
	reg DELETE HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\Edit\ddeexec /f 1>NUL 2>NUL
	reg DELETE HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\New\ddeexec /f 1>NUL 2>NUL
	reg DELETE HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\OnenotePrintto\ddeexec /f 1>NUL 2>NUL
	reg DELETE HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\Open\ddeexec /f 1>NUL 2>NUL
	reg DELETE HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\OpenAsReadOnly\ddeexec /f 1>NUL 2>NUL
	reg DELETE HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\Print\ddeexec /f 1>NUL 2>NUL
	reg DELETE HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\Printto\ddeexec /f 1>NUL 2>NUL
	reg DELETE HKEY_CLASSES_ROOT\%CURRENTTARGET%\shell\ViewProtected\ddeexec /f 1>NUL 2>NUL
	SET /A DONE=DONE+1
)
GOTO CYCLE

:CHECKREG
findstr /C:"  64,64,65,00,00" "%SOURCE%" 1>NUL 2>NUL
IF NOT ERRORLEVEL==1 (
	ECHO.
	ECHO *****************************************************************************
	ECHO ***ALERT*ALERT*ALERT*ALERT*ALERT*ALERT*ALERT*ALERT*ALERT*ALERT*ALERT*ALERT***
	ECHO.
	ECHO   %CURRENTTARGET% contains an entry the bat does not alter!
	ECHO   %CURRENTTARGET% may still result in the same command error as before.
	ECHO *****************************************************************************
)
COPY /Y "%SOURCE%" "%TARGET%" 1>NUL 2>NUL
GOTO CYCLE

:ROUND_1
TITLE Replace /dde
CLS
ECHO.
ECHO Starting Pass 1 ^(This should be quick^)
IF NOT EXIST "%~DP0Office" MD "%~DP0Office" 1>NUL
IF NOT EXIST "%~DP0Office\Fix" MD "%~DP0Office\Fix" 1>NUL
IF NOT EXIST "%~DP0Office\Temp" MD "%~DP0Office\Temp" 1>NUL
IF NOT EXIST "%~DP0Office\EULA.txt" (
	IF NOT EXIST "%~DP0\EULA.txt" (
		TYPE NUL > "%~DP0Office\EULA.txt"
	)
)
SET /A DONOTFIX=0
SET /A ROUNDNUM=1
SET /A NUMBER=1
SET "ORIGINAL= /dde"
SET "FIX= \"%%1\""
GOTO CYCLE

:ROUND_2
SET /A DONOTFIX=1
GOTO CYCLE

:ROUND_3
ECHO.
ECHO Starting Pass 2 ^(This may take a bit^)
COPY /Y "%~0" "%~DP0Office\BACKUP.bat" 1>NUL 2>NUL
SET /A DONOTFIX=0
SET "ORIGINAL=2f,64,64,65"
SET "FIX=22,25,31,22"
GOTO CYCLE

:ROUND_4
ECHO .
SET "ORIGINAL=2f,64,64"
SET "FIX=22,25,31"
GOTO CYCLE

:ROUND_5
ECHO ..
SET "ORIGINAL=  65,00,00"
SET "FIX=  22,00,00"
GOTO CYCLE

:ROUND_6
ECHO ...
SET "ORIGINAL=2f,64"
SET "FIX=22,25"
GOTO CYCLE

:ROUND_7
ECHO ....
SET "ORIGINAL=  64,65,00,00"
SET "FIX=  31,22,00,00"
GOTO CYCLE

:ROUND_8
CLS
ECHO.
ECHO Attempting to restore Original registry backups.
SET AUTORESTORE=1
SET /A ROUNDNUM=7
SET /A NUMBER=1
GOTO CYCLE

:RESTORE
IF EXIST "%~DP0Office\%CURRENTTARGET%.reg" (
	regedit /S "%~DP0Office\%CURRENTTARGET%.reg"
	SET /A DONE=DONE+1
)
IF EXIST "%~DP0%CURRENTTARGET%.reg" (
	regedit /S "%~DP0%CURRENTTARGET%.reg"
	SET /A DONE=DONE+1
)
GOTO CYCLE

:SECURITY
ECHO.
ECHO Sorry, it looks like some security program is preventing
ECHO access to needed programs or locations
ECHO ^(eg %WINDIR%\System32\reg.exe or regedit.exe etc or HKCR^)
ECHO.
ECHO Please try disabling the product and run the bat again!
IF NOT EXIST "%~DP0Office\%CURRENTTARGET%.reg" RMDIR "%~DP0Office" /Q /S
GOTO END

:ERROR
ECHO :^( Oops Your PC ran into a problem that it couldn't
ECHO handle, then it asked a question.
ECHO.
ECHO "Shall we play a game?"
ECHO.
ECHO I told it NO for you but then it got mad and broke this BAT.
ECHO.
ECHO Better go and complain now!
ECHO http://forums.sandboxie.com/phpBB3/viewtopic.php?f=22^&t=22829
ECHO.
GOTO END

:END
TITLE !!KEEP OFFICE FOLDER!!
ECHO.
ECHO -----------------------------------------------------------------------------
RMDIR "%~DP0Office\Fix" /Q /S 1>NUL 2>NUL
RMDIR "%~DP0Office\Temp" /Q /S 1>NUL 2>NUL
ECHO %DONE% registry locations processed.
IF %DONE%==0 (
	ECHO.
	ECHO Oops! It looks like nothing changed.
	GOTO NOFOLDER
)
ECHO.
ECHO !KEEP a copy of the new "Office" folder!
ECHO It contains the files needed to restore the original entries.
ECHO.
ECHO This new "Office" folder will be in the same location as the bat.
:NOFOLDER
ECHO -----------------------------------------------------------------------------
ECHO.
ECHO Press any key to exit...
PAUSE 1>NUL
EXIT
I did see one instance where someone said this did more harm than good (related to macro versions of excel documents I beleive) but I wasn't able to reproduce or verify it and so never updated the bat.
It has a restore option so hopefully while nothing goes wrong to start with you can revert the original state so long as you don't delete the backups the .bat makes.

Lemme know if you encounter any issues or if it just plain doesn't help in your scenario.
Goo.gl/p8qFCf

shmu26
Posts: 68
Joined: Thu Mar 31, 2016 9:36 am

Re: Empty Excel 2013 when opening an Excel File in SandBox [SOLVED]

Post by shmu26 » Sun Oct 01, 2017 2:36 pm

Thanks much, I will have to try this out, when I get back to that place...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest