• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 754
  • Last Modified:

Startup Script not working Windows 7, but working XP.

Hi,

I'm kinda at a loss, I am testing a logon script for uninstalling office 2003/2007 and installing 2010, and it working great on XP machines, but does nothing on Windows 7 machines. No errors or anything else.

Anyone got any ideas?
0
sarasotamac
Asked:
sarasotamac
  • 3
  • 2
  • 2
  • +1
3 Solutions
 
Justin YeungCommented:
can you post the script?
0
 
pony10usCommented:
One thing to keep in mind is that windows 7 may have the program installed in Programs Files (x86) instead of just Program Files.
0
 
sarasotamacAuthor Commented:
setlocal

REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************

REM Get ProductName from the Office product's core Setup.xml file, and then add "office14." as a prefix.
set ProductName=Office14.PROPLUS

REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=\\xxx\office2010

REM Set ConfigFile to the configuration file to be used for deployment (required) set ConfigFile=\\xxx\office2010\ProPlus.WW\config.xml

REM Set LogLocation to a central directory to collect log files.
set LogLocation=\\xxx\office2010\logs
REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************

IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)

REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
:ARP64
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if NOT %errorlevel%==1 (goto End)

REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS)
:ARP86
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
if %errorlevel%==1 (goto DeployOffice) else (goto End)

REM If 1 returned, the product was not found. Run setup here.
:DeployOffice
start /wait %DeployServer%\setup.exe /config %ConfigFile% echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt

REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
:End

Endlocal
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
Justin YeungCommented:
UAC?
0
 
Kevin HaysIT AnalystCommented:
Agree, UAC perhaps.
0
 
sarasotamacAuthor Commented:
I fixed it. Not sure why, but when I changed it from a startup script to a shutdown script it started working.
0
 
sarasotamacAuthor Commented:
Although I figured it out myself, I still like to award points. Thanks for everyone's ideas!
0
 
Kevin HaysIT AnalystCommented:
Thanks sarasotamac,
Glad you got it figured out. I'll have to remember that in the future :)
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now