Sign in to follow this  
Followers 0
speedi

script works in XP not Vista

3 posts in this topic

#1 ·  Posted (edited)

The following script works correctly on a winxp system, but does not work correctly on a Vista home premium 32 bit SP1 system...

The ini file is not created in the c:\ root directory as it does on the winxp system... The ini file will look like the one in comments below... Thanks for any help... - Both systems users are administrators

***************************************

; this is done prior to using the backupmydocs macro

; it creates the required ini file and the backup folders

; in the root folder of the source computer (C:\)

#comments-start

[sETTINGS]

username=jimbo

dirnumber=1

where= c:\

howmany=4

#comments-end

While 1

$username = InputBox("Question", "What is the user name", "", "")

If MsgBox(4, "CONFIRM", "You entered: " & $username & " is that correct") = 6 Then

MsgBox(64, "Yes!", "Yes!", 2)

ExitLoop

Else

MsgBox(16, "No!", "No!", 2)

EndIf

WEnd

While 1

$destination = InputBox("Question", "What is the destination folder", "", "")

If MsgBox(4, "CONFIRM", "You entered: " & $destination & " is that correct") = 6 Then

MsgBox(64, "Yes!", "Yes!", 2)

ExitLoop

Else

MsgBox(16, "No!", "No!", 2)

EndIf

WEnd

If FileExists($destination) Then

MsgBox(4096, "Folder check" , $destination & " Exists")

Else

MsgBox(4096, "Folder check" , $destination & " Does NOT exist")

exit

EndIf

$settings = " username=" & $username & @LF & " dirnumber=1" & @LF & " where= " & $destination & @LF & " howmany=4"

IniWriteSection ( "c:\userbackup.ini", "settings", $settings)

; now create four folders at the specified destination

$user = IniRead("c:\userbackup.ini", "settings", "username", "")

$dirno = IniRead("c:\userbackup.ini", "settings", "dirnumber", "")

$where = IniRead("c:\userbackup.ini", "settings", "where", "")

$howmany = IniRead("c:\userbackup.ini", "settings", "howmany", "")

$thedir = $where & "\" & "backup\" & $user & "-" & $dirno

MsgBox(4096, "Test", "This is the destination folder " & $thedir, 10)

For $dirno = 1 to 4

$thedir = $where & "\" & "backup\" & $user & "-" & $dirno

DirCreate($thedir)

Next

Exit

***************************************

Edited by speedi

Share this post


Link to post
Share on other sites



Just a quick tip before i leave office:

- disable UAC on your vista

- take a look at the helpfile for #RequireAdmin

Share this post


Link to post
Share on other sites

I agree with gkrapp, #RequireAdmin will fix it. Vista doesn't allow creating files in root even as admin, I had that issue before.

Ian


My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0