harlandmct
09-09-2009, 10:39 AM
Hi, I'm new here. I tried searching for an answer to my question, but either the answer isn't here or I just don't know enough to ask the right question.
I created an installer to update some files in a video game. The installer backs up the files, and installs correctly. The weird part, is that on anyone else's computer, when the uninstaller is run, the new files are removed but the original files are not put back in place, rendering the game unplayable. This doesn't happen on either of my computers at home. I'm running Server 2003, while the testers are running XP and/or Windows 7.
I found the following code online:
tFiles = UninstallData.GetItemList(UNINDATA_FILES);
for nIndex, sName in tFiles do
iData = UninstallData.GetItem(UNINDATA_FILES, sName);
if iData.BackupFile ~= "" then
File.Copy(iData.BackupFile, iData.Filename, false, true, false, true, nil);
File.Delete(iData.BackupFile, false, false, true, nil);
end
end
The last bit of my uninstall log looks like this.
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial13.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial12.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial11Hide.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial11.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial08.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial07.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial06.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial05.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial04.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial03.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial02.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial01.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial00b.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial00.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\READ ME FIRST.htm
[08/24/2009 01:04:41] Success Remove shortcut: C:\Documents and Settings\Administrator\Start Menu\Programs\TAyalewT3MOD\Uninstall TAyalewT3MOD.lnk
[08/24/2009 01:04:41] Success Run uninstall event: On Post Uninstall
[08/24/2009 01:04:41] Success Display screen: Finished Uninstall
[08/24/2009 01:04:42] Success Run uninstall event: On Shutdown
[08/24/2009 01:04:42] Success Remove uninstall data file: D:\TDS\Uninstall\uninstall.dat
[08/24/2009 01:04:42] Success Remove uninstall config file: D:\TDS\Uninstall\uninstall.xml
[08/24/2009 01:04:42] Success Remove uninstall CP entry from Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\TAyalewT3MODTAyalewT3MOD.exe 1.0
[08/24/2009 01:04:42] Success Remove uninstall support file: D:\TDS\Uninstall\IRIMG1.JPG
[08/24/2009 01:04:42] Success Remove uninstall support file: D:\TDS\Uninstall\IRIMG2.JPG
[08/24/2009 01:04:42] Success Remove folder: D:\TDS\CONTENT\T3\Sounds\T.W.Ayalew
[08/24/2009 01:04:42] Success Remove folder: D:\TDS\READ ME FIRST_files
[08/24/2009 01:04:42] Success Remove folder: D:\TDS\System\Shaders
[08/24/2009 01:04:42] Success Remove folder: D:\TDS\Uninstall
[08/24/2009 01:04:42] Notice Exit uninstall process (Return code: 0)
[09/08/2009 22:54:49] Success Uninstall started: C:\WINDOWS\TAyalewT3MOD\uninstall.exe
[09/08/2009 22:54:49] Notice Setup engine version: 8.1.1006.0
[09/08/2009 22:54:49] Notice Product: TAyalewT3MOD, version TAyalewT3MOD.exe 1.0
[09/08/2009 22:54:49] Success Language set: Primary = 9, Secondary = 1
[09/08/2009 22:54:49] Success Include script: _SUF70_Global_Functions.lua
[09/08/2009 22:54:49] Notice Start project event: Global Functions
[09/08/2009 22:54:49] Success Run project event: Global Functions
[09/08/2009 22:54:49] Success Run uninstall event: On Startup
[09/08/2009 22:54:49] Success Display screen: Welcome to Uninstall
[09/08/2009 22:54:50] Success Run uninstall event: On Pre Uninstall
[09/08/2009 22:54:50] Success Display screen: One Progress Bar (While Uninstalling)
[09/08/2009 22:54:50] Success Remove shortcut: C:\Documents and Settings\Administrator\Start Menu\Programs\TAyalewT3MOD\Uninstall TAyalewT3MOD.lnk
[09/08/2009 22:54:50] Success Run uninstall event: On Post Uninstall
[09/08/2009 22:54:50] Success Display screen: Finished Uninstall
[09/08/2009 22:54:51] Success Run uninstall event: On Shutdown
[09/08/2009 22:54:51] Success Remove uninstall data file: D:\TDS\Uninstall\uninstall.dat
[09/08/2009 22:54:51] Success Remove uninstall config file: D:\TDS\Uninstall\uninstall.xml
[09/08/2009 22:54:51] Success Remove uninstall CP entry from Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\TAyalewT3MODTAyalewT3MOD.exe 1.0
[09/08/2009 22:54:51] Success Remove uninstall support file: D:\TDS\Uninstall\IRIMG1.JPG
[09/08/2009 22:54:51] Success Remove uninstall support file: D:\TDS\Uninstall\IRIMG2.JPG
[09/08/2009 22:54:51] Notice Exit uninstall process (Return code: 0)
While the last bit of uninstall log from other users looks like this:
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l13.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l12.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l11Hide.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l11.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l08.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l07.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l06.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l05.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l04.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l03.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l02.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l01.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l00b.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l00.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\READ ME FIRST.htm
[08/30/2009 14:57:56] Success Remove shortcut: C:\Users\b1k3rdude\AppData\Roaming\Microsoft\Windo ws\Start Menu\Programs\TAyalewT3MOD\Uninstall TAyalewT3MOD.lnk
[08/30/2009 14:57:56] Success Run uninstall event: On Post Uninstall
[08/30/2009 14:57:56] Success Display screen: Finished Uninstall
[08/30/2009 14:57:57] Success Run uninstall event: On Shutdown
[08/30/2009 14:57:57] Success Remove uninstall data file: D:\Games\Thief\T3\Uninstall\uninstall.dat
[08/30/2009 14:57:57] Success Remove uninstall config file: D:\Games\Thief\T3\Uninstall\uninstall.xml
[08/30/2009 14:57:57] Success Remove uninstall CP entry from Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\TAyalewT3MODTAyalewT3MOD.exe 1.0
[08/30/2009 14:57:57] Success Remove uninstall support file: D:\Games\Thief\T3\Uninstall\IRIMG1.JPG
[08/30/2009 14:57:57] Success Remove uninstall support file: D:\Games\Thief\T3\Uninstall\IRIMG2.JPG
[08/30/2009 14:57:57] Success Remove folder: C:\Users\b1k3rdude\AppData\Roaming\Microsoft\Windo ws\Start Menu\Programs\TAyalewT3MOD
[08/30/2009 14:57:57] Success Remove folder: D:\Games\Thief\T3\CONTENT\T3\Sounds\T.W.Ayalew
[08/30/2009 14:57:57] Success Remove folder: D:\Games\Thief\T3\READ ME FIRST_files
[08/30/2009 14:57:57] Success Remove folder: D:\Games\Thief\T3\System\Shaders
[08/30/2009 14:57:57] Success Remove folder: D:\Games\Thief\T3\Uninstall
[08/30/2009 14:57:57] Notice Exit uninstall process (Return code: 0)
I don't understand why the code is firing on server 2003 but not xp and windows 7. Any suggestions or improvement to the code? I'm not a coder, so I have no idea what any of it means. At a quick glance, it looks like the difference is that the global functions .lua script isn't being run on the other systems.
I created an installer to update some files in a video game. The installer backs up the files, and installs correctly. The weird part, is that on anyone else's computer, when the uninstaller is run, the new files are removed but the original files are not put back in place, rendering the game unplayable. This doesn't happen on either of my computers at home. I'm running Server 2003, while the testers are running XP and/or Windows 7.
I found the following code online:
tFiles = UninstallData.GetItemList(UNINDATA_FILES);
for nIndex, sName in tFiles do
iData = UninstallData.GetItem(UNINDATA_FILES, sName);
if iData.BackupFile ~= "" then
File.Copy(iData.BackupFile, iData.Filename, false, true, false, true, nil);
File.Delete(iData.BackupFile, false, false, true, nil);
end
end
The last bit of my uninstall log looks like this.
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial13.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial12.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial11Hide.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial11.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial08.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial07.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial06.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial05.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial04.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial03.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial02.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial01.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial00b.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\CONTENT\T3\Books\English\Tutorial00.sch
[08/24/2009 01:04:41] Success Remove file: D:\TDS\READ ME FIRST.htm
[08/24/2009 01:04:41] Success Remove shortcut: C:\Documents and Settings\Administrator\Start Menu\Programs\TAyalewT3MOD\Uninstall TAyalewT3MOD.lnk
[08/24/2009 01:04:41] Success Run uninstall event: On Post Uninstall
[08/24/2009 01:04:41] Success Display screen: Finished Uninstall
[08/24/2009 01:04:42] Success Run uninstall event: On Shutdown
[08/24/2009 01:04:42] Success Remove uninstall data file: D:\TDS\Uninstall\uninstall.dat
[08/24/2009 01:04:42] Success Remove uninstall config file: D:\TDS\Uninstall\uninstall.xml
[08/24/2009 01:04:42] Success Remove uninstall CP entry from Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\TAyalewT3MODTAyalewT3MOD.exe 1.0
[08/24/2009 01:04:42] Success Remove uninstall support file: D:\TDS\Uninstall\IRIMG1.JPG
[08/24/2009 01:04:42] Success Remove uninstall support file: D:\TDS\Uninstall\IRIMG2.JPG
[08/24/2009 01:04:42] Success Remove folder: D:\TDS\CONTENT\T3\Sounds\T.W.Ayalew
[08/24/2009 01:04:42] Success Remove folder: D:\TDS\READ ME FIRST_files
[08/24/2009 01:04:42] Success Remove folder: D:\TDS\System\Shaders
[08/24/2009 01:04:42] Success Remove folder: D:\TDS\Uninstall
[08/24/2009 01:04:42] Notice Exit uninstall process (Return code: 0)
[09/08/2009 22:54:49] Success Uninstall started: C:\WINDOWS\TAyalewT3MOD\uninstall.exe
[09/08/2009 22:54:49] Notice Setup engine version: 8.1.1006.0
[09/08/2009 22:54:49] Notice Product: TAyalewT3MOD, version TAyalewT3MOD.exe 1.0
[09/08/2009 22:54:49] Success Language set: Primary = 9, Secondary = 1
[09/08/2009 22:54:49] Success Include script: _SUF70_Global_Functions.lua
[09/08/2009 22:54:49] Notice Start project event: Global Functions
[09/08/2009 22:54:49] Success Run project event: Global Functions
[09/08/2009 22:54:49] Success Run uninstall event: On Startup
[09/08/2009 22:54:49] Success Display screen: Welcome to Uninstall
[09/08/2009 22:54:50] Success Run uninstall event: On Pre Uninstall
[09/08/2009 22:54:50] Success Display screen: One Progress Bar (While Uninstalling)
[09/08/2009 22:54:50] Success Remove shortcut: C:\Documents and Settings\Administrator\Start Menu\Programs\TAyalewT3MOD\Uninstall TAyalewT3MOD.lnk
[09/08/2009 22:54:50] Success Run uninstall event: On Post Uninstall
[09/08/2009 22:54:50] Success Display screen: Finished Uninstall
[09/08/2009 22:54:51] Success Run uninstall event: On Shutdown
[09/08/2009 22:54:51] Success Remove uninstall data file: D:\TDS\Uninstall\uninstall.dat
[09/08/2009 22:54:51] Success Remove uninstall config file: D:\TDS\Uninstall\uninstall.xml
[09/08/2009 22:54:51] Success Remove uninstall CP entry from Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\TAyalewT3MODTAyalewT3MOD.exe 1.0
[09/08/2009 22:54:51] Success Remove uninstall support file: D:\TDS\Uninstall\IRIMG1.JPG
[09/08/2009 22:54:51] Success Remove uninstall support file: D:\TDS\Uninstall\IRIMG2.JPG
[09/08/2009 22:54:51] Notice Exit uninstall process (Return code: 0)
While the last bit of uninstall log from other users looks like this:
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l13.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l12.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l11Hide.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l11.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l08.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l07.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l06.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l05.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l04.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l03.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l02.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l01.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l00b.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\CONTENT\T3\Books\English\Tutoria l00.sch
[08/30/2009 14:57:56] Success Remove file: D:\Games\Thief\T3\READ ME FIRST.htm
[08/30/2009 14:57:56] Success Remove shortcut: C:\Users\b1k3rdude\AppData\Roaming\Microsoft\Windo ws\Start Menu\Programs\TAyalewT3MOD\Uninstall TAyalewT3MOD.lnk
[08/30/2009 14:57:56] Success Run uninstall event: On Post Uninstall
[08/30/2009 14:57:56] Success Display screen: Finished Uninstall
[08/30/2009 14:57:57] Success Run uninstall event: On Shutdown
[08/30/2009 14:57:57] Success Remove uninstall data file: D:\Games\Thief\T3\Uninstall\uninstall.dat
[08/30/2009 14:57:57] Success Remove uninstall config file: D:\Games\Thief\T3\Uninstall\uninstall.xml
[08/30/2009 14:57:57] Success Remove uninstall CP entry from Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall\TAyalewT3MODTAyalewT3MOD.exe 1.0
[08/30/2009 14:57:57] Success Remove uninstall support file: D:\Games\Thief\T3\Uninstall\IRIMG1.JPG
[08/30/2009 14:57:57] Success Remove uninstall support file: D:\Games\Thief\T3\Uninstall\IRIMG2.JPG
[08/30/2009 14:57:57] Success Remove folder: C:\Users\b1k3rdude\AppData\Roaming\Microsoft\Windo ws\Start Menu\Programs\TAyalewT3MOD
[08/30/2009 14:57:57] Success Remove folder: D:\Games\Thief\T3\CONTENT\T3\Sounds\T.W.Ayalew
[08/30/2009 14:57:57] Success Remove folder: D:\Games\Thief\T3\READ ME FIRST_files
[08/30/2009 14:57:57] Success Remove folder: D:\Games\Thief\T3\System\Shaders
[08/30/2009 14:57:57] Success Remove folder: D:\Games\Thief\T3\Uninstall
[08/30/2009 14:57:57] Notice Exit uninstall process (Return code: 0)
I don't understand why the code is firing on server 2003 but not xp and windows 7. Any suggestions or improvement to the code? I'm not a coder, so I have no idea what any of it means. At a quick glance, it looks like the difference is that the global functions .lua script isn't being run on the other systems.